feat(e2e): plan-detail test suite for CUJ lifecycle + BYT-9158 regressions by zchpeter · Pull Request #19981 · bytebase/bytebase · GitHub
Skip to content

feat(e2e): plan-detail test suite for CUJ lifecycle + BYT-9158 regressions - #19981

Merged
zchpeter merged 11 commits into
mainfrom
feat/cicd-tests
Apr 14, 2026
Merged

zchpeter merged 11 commits into
mainfrom
feat/cicd-tests

Conversation

@zchpeter

Copy link
Copy Markdown
Collaborator

Summary

  • Extends the e2e API client with plan/sheet/issue/rollout/project-settings CRUD methods
  • Adds plan-detail Page Object Model with locators for phases, sections, checks, sidebar
  • 6 spec files, 31 tests covering plan detail + rollout page

Test Coverage

Spec Tests Covers
plan-detail-lifecycle 8 Full happy path: create plan → rollout → run tasks → done + section preservation
plan-detail-approval-blocker 4 Approval pending blocks rollout; approve via API and verify UI updates
plan-detail-checks-blocker 6 Approved + checks failed (BYT-9159 regression); toggle requirePlanCheckNoError
plan-detail-task-failure 6 Task execution failure → Failed state + Retry button visible
plan-detail-byt9160-check-consistency 2 Multi-spec plan with overlapping DBs — sidebar check count scoping (BYT-9160 lock, test.fixme)
plan-detail-byt9161-section-preservation 5 Section expand/collapse preserved across rollout creation, detail panel, navigation

All tests create their own data via API — no dependency on demo seed data.

Test plan

  • pnpm exec playwright test plan-detail --project=chromium — 31 passed, 1 skipped (test.fixme for BYT-9160)
  • Verify in CI

🤖 Generated with Claude Code

zchpeter and others added 3 commits April 13, 2026 05:00
… methods

Adds createSheet, createPlan, getPlan, runPlanChecks, getPlanCheckRun,
createIssue, getIssue, approveIssue, updateProjectSettings, getProject,
getReviewConfig, updateReviewConfigRuleLevel, and asUser static helper.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… helper

Rewrites plan-detail.page.ts with new locators for spec tabs, inline/sidebar
check counts, sidebar status label, retry button, deploy phase badge, and a
waitForApprovalStatus helper that polls BytebaseApiClient. Removes four stub
spec files that are superseded by future task-specific specs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…approval, checks, task failure

6 spec files + 1 POM covering:
- CUJ 1: Full plan lifecycle (create → rollout → run → done)
- CUJ 2: Approved + checks failed — BYT-9159 regression guard
- CUJ 3: Approval pending blocks rollout creation
- CUJ 4: Task failure shows error state + retry button
- BYT-9160: Sidebar check count scoping lock test (test.fixme — unfixed)
- BYT-9161: Section expansion preserved across interactions

All tests self-contained — create own plans/issues via API, no dependency on demo seed data.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@zchpeter
zchpeter requested a review from a team as a code owner April 13, 2026 09:08
@cla-bot cla-bot Bot added the cla-signed label Apr 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 787068ec5e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread frontend/tests/e2e/plan-detail/plan-detail.page.ts Outdated
Comment thread frontend/tests/e2e/plan-detail/plan-detail-checks-blocker.spec.ts
…n SKIPPED approval

- POM runTask(): use CSS `button:not([disabled])` instead of Playwright
  `filter({ has })` which checks descendants, not the element's own attribute
- checks-blocker: skip suite gracefully when approval resolves to SKIPPED
  (no matching rule) instead of hard-failing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6b4b7a9ce6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread frontend/tests/e2e/plan-detail/plan-detail.page.ts Outdated
Comment thread frontend/tests/e2e/plan-detail/plan-detail-checks-blocker.spec.ts Outdated
- POM: remove 8 unused members (sidebarStatus, deployBadge, runTasksButton,
  refreshButton, sidebarStatusLabel, getTaskRunButton, getRunDialogConfirm,
  stageProgress, waitForApprovalStatus)
- POM: fix sidebarCheckCount to filter by status param (was ignoring it)
- POM: remove BytebaseApiClient import (no longer needed)
- approval-blocker, checks-blocker, byt9160: replace test.skip() in
  beforeAll with module-level shouldSkip flag + test.skip(shouldSkip) in
  each test body (test.skip in beforeAll has undefined Playwright behavior)
- lifecycle, task-failure: use planPage.runTask() instead of inline
  duplicate logic

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 228dbc56ee

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread frontend/tests/e2e/plan-detail/plan-detail-approval-blocker.spec.ts Outdated
Comment thread frontend/tests/e2e/plan-detail/plan-detail-byt9160-check-consistency.spec.ts Outdated
zchpeter and others added 2 commits April 13, 2026 05:41
…rule restore

- POM createRolloutWithBypass: arm waitForResponse BEFORE clicking Confirm
  to prevent race where fast backend response is missed (P1)
- byt9160: throw if plan checks never reach DONE within timeout instead of
  silently proceeding with partial data (P2)
- checks-blocker: capture original COLUMN_NO_NULL rule level in beforeAll
  and restore it in afterAll instead of hardcoding "WARNING" (P2)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… tab locator

- approval-blocker: treat APPROVED as terminal in poll loop (auto-approval
  policy can skip PENDING entirely)
- byt9160: use exact-match getByText("#2") instead of broken POM specTab
  to avoid matching "Issue #..." text elsewhere on page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f36007c4b8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread frontend/tests/e2e/plan-detail/plan-detail-checks-blocker.spec.ts Outdated
… defaults

All 4 spec files that mutate project settings (lifecycle, approval-blocker,
checks-blocker, task-failure) now capture the original values in beforeAll
and restore them in afterAll, preventing order-dependent failures in
environments with non-default project policies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 793697b9c8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread frontend/tests/e2e/plan-detail/plan-detail-approval-blocker.spec.ts Outdated
approval-blocker: restore both requireIssueApproval and requirePlanCheckNoError
  (was only restoring approval)
byt9160, byt9161: add settings capture in beforeAll + restore in afterAll
  (were missing entirely)

All 6 spec files now follow the same pattern: getProject → capture →
mutate → test → restore in afterAll.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a6e3bf91e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread frontend/tests/e2e/plan-detail/plan-detail.page.ts Outdated
Comment thread frontend/tests/e2e/plan-detail/plan-detail-byt9161-section-preservation.spec.ts Outdated
zchpeter and others added 2 commits April 13, 2026 06:47
…lose

- POM runTask(): use getByRole with exact name "Run" + CSS :not([disabled])
  to avoid matching "Run check" sidebar button (P1)
- byt9161: replace swallowed .catch() on drawer-close assertion with
  explicit fallback — reload page if drawer doesn't close instead of
  silently proceeding (P2)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0c96d0a6f1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread frontend/tests/e2e/framework/api-client.ts
@zchpeter
zchpeter enabled auto-merge (squash) April 14, 2026 11:30
@zchpeter
zchpeter merged commit f50117e into main Apr 14, 2026
16 checks passed
@zchpeter
zchpeter deleted the feat/cicd-tests branch April 14, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants