Skip to content

E2e/add spmis tests - #474

Open
anthonymarkQA wants to merge 7 commits into
19.0from
e2e/add-spmis-tests
Open

E2e/add spmis tests#474
anthonymarkQA wants to merge 7 commits into
19.0from
e2e/add-spmis-tests

Conversation

@anthonymarkQA

@anthonymarkQA anthonymarkQA commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Why is this change needed?

Add additional tests for SPMIS:

  • Create and management of change requests
  • Import of groups and individuals
  • Fix discord webhook message formatting

How was the change implemented?

New unit tests

Unit tests executed by the author

How to test manually

pull this branch
cd into e2e
npx playwright test 01-spp-starter-spmis.spec.ts

for discord webhook , it will be tested once this PR successfully merged to 19.0

Related links

anthonymarkQA and others added 7 commits August 27, 2026 11:48
- playwright.config.ts: global test timeout down to 1 min so a frozen/
  broken step in a non-install test fails fast instead of waiting out
  the old 10-minute ceiling. The two install-heavy operations (the
  beforeAll docker teardown/rebuild, and the app-install test itself
  in both spec files) explicitly override via test.setTimeout(300_000)
  since they legitimately need more room.
- Test 18 (Update ID Document CR): removed a leftover unconditional
  page.pause() from the original codegen authoring — it blocked
  indefinitely with nobody there to resume it, guaranteed to hit any
  reasonably short timeout. Replaced a waitForLoadState("networkidle")
  wait with a targeted visibility check (Odoo's persistent long-poll
  connection means the network may never go fully idle). Swapped the
  registrant-row locator from getByRole("cell", ...) — which silently
  matched 0 elements, likely due to a CSS display override breaking
  the implicit ARIA "cell" role on that specific table — to a plain
  CSS class + text-content locator (tr.o_cr_search_result with
  hasText), which doesn't depend on ARIA role computation at all.
- Test 19 (HQ validator user): removed two brittle whole-row-name
  assertions built from concatenated column text
  ("Name  Login  Roles ", "Role  Center Areas Role Type",
  "CR HQ Validator Delete row") — exact-string-with-double-spaces
  matches like this break on any minor layout difference and aren't
  needed; the flow already fails naturally if the real elements
  aren't there.

Confirmed passing end-to-end after these fixes.
Keep 19.0's flat 10-minute default (already proven in real CI) instead
of the shorter global default + per-test overrides explored on this
branch. Keeps the unrelated afterAll page guard and all the new test
content.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Each matrix job wrote its result to the same status/result.json name
before uploading, so the notify job's merge-multiple download silently
overwrote one job's result with the other. Give each job's result file
a unique name and add the Repository/Ref/Spec-files fields the
notification was originally designed to include.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
These spec files can't run in parallel workers anyway (each is one
serial browser session sharing a single Docker stack), so Playwright's
"slow test file, consider running in parallel" note is just noise here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- login() now handles Odoo's avatar-picker login screen, which appears
  once 2+ accounts have logged in during the browser session (from
  test 20 onward), instead of only the plain form
- import tests (22, 23) set files via input[type="file"] directly
  instead of clicking "Upload Data File" first, which was triggering a
  real OS file dialog Playwright can't control
- test 23 drops a fragile "tags_ids" row wait in favor of the actual
  post-import success alert
- CI's Discord notification now lists each test step with a pass/fail
  mark per spec file, via a new Playwright JSON reporter

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.93%. Comparing base (380b045) to head (94019fd).
⚠️ Report is 7 commits behind head on 19.0.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             19.0     #474   +/-   ##
=======================================
  Coverage   75.93%   75.93%           
=======================================
  Files         627      627           
  Lines       43000    43000           
=======================================
  Hits        32654    32654           
  Misses      10346    10346           
Flag Coverage Δ
spp_base_common 91.07% <ø> (ø)
spp_programs 66.97% <ø> (ø)
spp_registry 87.79% <ø> (ø)
spp_security 69.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant