Skip to content

Fix : make playwright tests idempotent - #13332

Merged
asiroliu merged 3 commits into
infiniflow:mainfrom
6ba3i:playwright
Mar 4, 2026
Merged

asiroliu merged 3 commits into
infiniflow:mainfrom
6ba3i:playwright

Conversation

@6ba3i

@6ba3i 6ba3i commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Playwright tests previously depended on cross-file execution order (auth -> provider -> dataset -> chat).
This change makes setup explicit and idempotent via fixtures so tests can run independently.

  • Added/standardized prerequisite fixtures in test/playwright/conftest.py:
    • ensure_auth_context, ensure_model_provider_configured, ensure_dataset_ready, ensure_chat_ready
  • Made provisioning reusable/idempotent with RUN_ID-based resource naming.
  • Synced auth envs (E2E_ADMIN_EMAIL, E2E_ADMIN_PASSWORD) into seeded creds.
  • Fixed provider cache freshness (auth_header/page refresh on cache hit).

Also included minimal stability fixes:

  • dataset create stale-element click handling,
  • search wait logic for results/empty-state,
  • agent create-menu handling,
  • agent run-step retry when run UI doesn’t open first click.

Type of change

  • Test fix
  • Refactoring

@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. 🧪 test Pull requests that update test cases. labels Mar 3, 2026
@6ba3i
6ba3i marked this pull request as draft March 3, 2026 07:06
@6ba3i 6ba3i added the ci Continue Integration label Mar 3, 2026
@6ba3i
6ba3i marked this pull request as ready for review March 3, 2026 07:06
@codecov

codecov Bot commented Mar 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.18%. Comparing base (4f09b3e) to head (b4045d9).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13332      +/-   ##
==========================================
- Coverage   49.18%   47.18%   -2.01%     
==========================================
  Files          44       44              
  Lines        9749     9749              
  Branches      110      110              
==========================================
- Hits         4795     4600     -195     
- Misses       4946     5136     +190     
- Partials        8       13       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@asiroliu
asiroliu merged commit 2f4ca38 into infiniflow:main Mar 4, 2026
1 of 3 checks passed
guptas6est pushed a commit to Nordix/ragflow that referenced this pull request Mar 5, 2026
### What problem does this PR solve?

Playwright tests previously depended on cross-file execution order
(`auth -> provider -> dataset -> chat`).
This change makes setup explicit and idempotent via fixtures so tests
can run independently.

- Added/standardized prerequisite fixtures in
`test/playwright/conftest.py`:
- `ensure_auth_context`, `ensure_model_provider_configured`,
`ensure_dataset_ready`, `ensure_chat_ready`
- Made provisioning reusable/idempotent with `RUN_ID`-based resource
naming.
- Synced auth envs (`E2E_ADMIN_EMAIL`, `E2E_ADMIN_PASSWORD`) into seeded
creds.
- Fixed provider cache freshness (`auth_header`/`page` refresh on cache
hit).

Also included minimal stability fixes:
- dataset create stale-element click handling,
- search wait logic for results/empty-state,
- agent create-menu handling,
- agent run-step retry when run UI doesn’t open first click.

### Type of change

- [x] Test fix
- [x] Refactoring

---------

Co-authored-by: Liu An <[email protected]>
writinwaters pushed a commit to writinwaters/ragflow that referenced this pull request Apr 10, 2026
### What problem does this PR solve?

Playwright tests previously depended on cross-file execution order
(`auth -> provider -> dataset -> chat`).
This change makes setup explicit and idempotent via fixtures so tests
can run independently.

- Added/standardized prerequisite fixtures in
`test/playwright/conftest.py`:
- `ensure_auth_context`, `ensure_model_provider_configured`,
`ensure_dataset_ready`, `ensure_chat_ready`
- Made provisioning reusable/idempotent with `RUN_ID`-based resource
naming.
- Synced auth envs (`E2E_ADMIN_EMAIL`, `E2E_ADMIN_PASSWORD`) into seeded
creds.
- Fixed provider cache freshness (`auth_header`/`page` refresh on cache
hit).

Also included minimal stability fixes:
- dataset create stale-element click handling,
- search wait logic for results/empty-state,
- agent create-menu handling,
- agent run-step retry when run UI doesn’t open first click.

### Type of change

- [x] Test fix
- [x] Refactoring

---------

Co-authored-by: Liu An <[email protected]>
JasleenKaurSethi pushed a commit to stackhpc/ragflow that referenced this pull request Apr 28, 2026
### What problem does this PR solve?

Playwright tests previously depended on cross-file execution order
(`auth -> provider -> dataset -> chat`).
This change makes setup explicit and idempotent via fixtures so tests
can run independently.

- Added/standardized prerequisite fixtures in
`test/playwright/conftest.py`:
- `ensure_auth_context`, `ensure_model_provider_configured`,
`ensure_dataset_ready`, `ensure_chat_ready`
- Made provisioning reusable/idempotent with `RUN_ID`-based resource
naming.
- Synced auth envs (`E2E_ADMIN_EMAIL`, `E2E_ADMIN_PASSWORD`) into seeded
creds.
- Fixed provider cache freshness (`auth_header`/`page` refresh on cache
hit).

Also included minimal stability fixes:
- dataset create stale-element click handling,
- search wait logic for results/empty-state,
- agent create-menu handling,
- agent run-step retry when run UI doesn’t open first click.

### Type of change

- [x] Test fix
- [x] Refactoring

---------

Co-authored-by: Liu An <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:XL This PR changes 500-999 lines, ignoring generated files. 🧪 test Pull requests that update test cases.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants