ci: add testRigor Web E2E suite - #8970
amandassa-tR wants to merge 1 commit into
Conversation
Reviewer's GuideAdds a testRigor tests-as-code suite for major AppFlowy Web user journeys, shared reusable rules, and a GitHub Actions workflow that runs the explicitly synchronized suite on configured non-main changes or manual dispatch, with JUnit artifact reporting. Sequence diagram for synchronized testRigor suite executionsequenceDiagram
actor Contributor
participant GitHub as GitHub Actions
participant Runner as Ubuntu Runner
participant CLI as testRigor CLI
participant TestRigor as testRigor Service
participant App as AppFlowy Web
participant Artifacts as JUnit Artifact Storage
Contributor->>GitHub: Push testRigor/workflow change or dispatch workflow
GitHub->>Runner: Checkout repository and setup Node.js
Runner->>CLI: Install testrigor-cli
Runner->>CLI: testrigor test-suite run
CLI->>TestRigor: Sync explicit testcases and rules
TestRigor->>App: Execute E2E user journeys
App-->>TestRigor: Test results
TestRigor-->>CLI: Exit status and JUnit report
CLI-->>Runner: Complete synchronous run
Runner->>Artifacts: Upload report.xml
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/testrigor.yml" line_range="84-90" />
<code_context>
+
+ # Sync mode (no --async): exit code gates the job.
+ # --explicit-mutations: local testRigor/testcases (+ rules) is authoritative —
+ # only those cases are kept/updated on the suite and executed. Remote-only
+ # cases not present as files are dropped from the suite.
+ testrigor test-suite run "${TESTRIGOR_TEST_SUITE_ID}" \
+ --url "${APP_URL}" \
+ --test-cases-path "testRigor/testcases/**/*.{txt,yaml,yml}" \
+ --rules-path "testRigor/rules/**/*.{txt,yaml,yml}" \
+ --explicit-mutations \
+ --branch "${GITHUB_REF_NAME}" \
+ --commit "${GITHUB_SHA}" \
</code_context>
<issue_to_address>
**issue (bug_risk):** Concurrent runs from different feature branches use the same `TESTRIGOR_TEST_SUITE_ID` while each run treats its checked-out test cases and rules as authoritative, so one branch overwrites or removes the other branch's suite definitions and the runs execute a nondeterministic mixture of files.
**Triggers:** When multiple feature branches push changes while their workflows are running concurrently.
**Suggested fix:** Use an isolated testRigor suite per branch, or serialize mutations to the shared suite and separate synchronization from execution.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| # only those cases are kept/updated on the suite and executed. Remote-only | ||
| # cases not present as files are dropped from the suite. | ||
| testrigor test-suite run "${TESTRIGOR_TEST_SUITE_ID}" \ | ||
| --url "${APP_URL}" \ | ||
| --test-cases-path "testRigor/testcases/**/*.{txt,yaml,yml}" \ | ||
| --rules-path "testRigor/rules/**/*.{txt,yaml,yml}" \ | ||
| --explicit-mutations \ |
There was a problem hiding this comment.
issue (bug_risk): Concurrent runs from different feature branches use the same TESTRIGOR_TEST_SUITE_ID while each run treats its checked-out test cases and rules as authoritative, so one branch overwrites or removes the other branch's suite definitions and the runs execute a nondeterministic mixture of files.
Triggers: When multiple feature branches push changes while their workflows are running concurrently.
Suggested fix: Use an isolated testRigor suite per branch, or serialize mutations to the shared suite and separate synchronization from execution.
Add testRigor GitHub Actions workflow with localhost health check.
Gate the suite run on a curl probe to the local AppFlowy instance and version the testRigor cases/rules used by CI.
ci: target AppFlowy Web instead of localhost in testRigor
Remove localhost health check; run testRigor against AppFlowy Web.
Pass the AppFlowy Web URL in the retest payload so CI targets the hosted app, not a local instance.
ci: run testRigor suite via CLI in GitHub Actions
Run testRigor suite via CLI in GitHub Actions.
Install testrigor-cli, push local cases/rules, and sync-run against AppFlowy Web with a JUnit artifact.
ci: disable automatic commitlint on push and PR
Keep the workflow available via workflow_dispatch so feature-branch CI is not blocked by conventional-commit checks.
test: harden testRigor Web E2E cases and CI workflow
Restore commitlint for upstream PR checks, sync the suite from local
files with --explicit-mutations, add Global Search coverage, and align
invite/settings steps with the People nav rename.
test: fix post-login assertion in testRigor login rule
The "Login using password" rule ended with check page contains "Welcome",
which only matches the login page ("Welcome to AppFlowy"). It passed while
login failed and failed once the workspace loaded, breaking all 7
login-based cases in CI. Assert the sidebar "New page" button instead.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
test: sync testRigor suite files from the maintained suite
Replace the local testcases and rules with the current suite export
(includes the post-login "New Page" assertion), drop the three
superseded duplicate case files, and keep rule filenames space-named so
the case-level rule invocations still resolve. Adds Settings.yaml and
testdata/storedValues.yaml from the same export for reference.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
test: set page title via the Untitled placeholder in sign-up case
"generate unique name, then enter into "Title"" fails intermittently in
CI ("Failed to execute action ... Retrying the click before it") because
the title is a contenteditable that is not directly interactable. Use
the triple-click-on-"Untitled" pattern already proven in the document,
search and invite cases, and wait for the editor to render first.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
test: type page body instead of entering the editor placeholder
"enter into "Enter a / to insert a block, or start typing"" fails with
"Can't find input element by descriptor" — the editor placeholder is not
addressable as an input. Type into the focused editor instead, as the
document case already does, and apply the same Untitled-placeholder
title pattern to the workspace-management case.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
test: stop collapsing the General section before asserting its pages
click "General" toggles the sidebar section, which is already expanded
because it holds the page the case just created, so the following
"Getting started"/"To-dos" checks looked for hidden elements. Assert the
default pages directly and drop the spatial qualifier — they only exist
in that section.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
test: drop workspace switcher ordering assumption
check page contains workspaceName "roughly below" "My Workspace" fails
because the switcher does not guarantee that the newly created (active)
workspace is listed under the original one. Assert that both workspaces
are listed instead.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
test: wait for the new workspace to seed; report per-case results in CI
The "Getting started" check right after a workspace switch passed in the
previous run and failed in this one, so the workspace's default pages are
seeded too slowly for the 30s check budget. Wait before asserting.
Also print the suite status JSON after the run: the JUnit report labels
every case "Test Case UUID=" with an empty uuid, so a failing step cannot
be mapped back to a case file without it. Diagnostic only — it never
changes the job verdict.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
test: use the People settings nav in the workspace invite case
The suite status API confirms this case crashes with "Can't find button
element by descriptor 'Members'": the settings nav was renamed to
"People", as the sibling invite case already documents.
Also summarise the per-case report (name, severity, error, step) instead
of dumping each affected case's full step list, which drowned the log.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
test: close the page dialog with a precise descriptor
Both "Getting started" and "To-dos" failed at the same step while
"General" passed, i.e. the space label was visible but its children were
not — the section was collapsed. The preceding "2nd button above and on
the right of pageTitle" is loose enough to land on the space chevron.
Use the descriptor the two passing cases use instead.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
caedeba to
c0d982b
Compare
Feature Preview
Adds a testRigor plain-English E2E suite for AppFlowy Web, plus a GitHub Actions workflow to run it from CI.
Covered flows (under
testRigor/):Description
This introduces tests-as-code for AppFlowy Web using testRigor so contributors and maintainers can keep E2E coverage next to the product code.
The workflow installs
testrigor-cliand runs the suite with--explicit-mutations, so the files intestRigor/testcasesandtestRigor/rulesare the source of truth for what executes.CI setup required on the repo (or fork) that runs the workflow:
TESTRIGOR_API_KEY(PAT from testRigor → username → API Tokens); optional fallbackTESTRIGOR_AUTH_TOKENTESTRIGOR_TEST_SUITE_IDAPPFLOWY_WEB_URL(defaults tohttps://appflowy.com/app)Triggers:
workflow_dispatch, andpushto non-mainbranches whentestRigor/**or the workflow file change.PR Checklist
type: subject)Test plan
workflow_dispatch(or push a change undertestRigor/)testrigor test-suite runagainst the suite IDSummary by Sourcery
Introduce testRigor Web E2E coverage and automate its execution through GitHub Actions.
New Features:
Enhancements:
CI:
Tests: