Skip to content

[MWPW-189268] Add Nala E2E tests for Floodgate for DA#5912

Merged
milo-pr-merge[bot] merged 1 commit into
adobecom:stagefrom
JackySun9:nala-floodgate-da-tests
May 13, 2026
Merged

[MWPW-189268] Add Nala E2E tests for Floodgate for DA#5912
milo-pr-merge[bot] merged 1 commit into
adobecom:stagefrom
JackySun9:nala-floodgate-da-tests

Conversation

@JackySun9
Copy link
Copy Markdown
Contributor

@JackySun9 JackySun9 commented May 7, 2026

Summary

Adds comprehensive Nala end-to-end test coverage for the Floodgate for DA tool (MWPW-189268), running against da.live with the da-floodgate branch.

  • 51 test cases across 7 suites: Page Load, Path Validation, Copy (Simple + Real Events), Content Integrity, Promote, Delete, Cancel/Retry, E2E Smoke Chain
  • 49 pass, 2 intentional skips, 0 failures at workers=1 (~7 min runtime)
  • Real-content seed script pulls 5 production event pages + their fragments into a /drafts/nala-fg-test/ sandbox
  • Byte-level content integrity comparator verifies source vs FG copies (with URL-rewrite normalization), including preservation of CaaS-encoded payloads
  • Self-healing test data hooks (ensureFileInFg) so delete tests recover from prior-test state changes
  • Full English TEST-PLAN.md with execution instructions, prerequisites, and risk register

Test Architecture

File Purpose
nala/utils/da-login.js One-time DA login → saves auth.json storageState
nala/features/dafloodgate/floodgate.page.js Page Object with iframe + shadow DOM traversal + DA admin API helpers
nala/features/dafloodgate/floodgate.spec.js 51 test case definitions with metadata
nala/features/dafloodgate/floodgate.test.js Playwright test implementations
nala/features/dafloodgate/seed-real-content.js Seed real event pages + fragments into the sandbox
nala/features/dafloodgate/setup-test-data.js Verify sandbox state
nala/features/dafloodgate/TEST-PLAN.md Full test plan documentation

Bugs Surfaced & Fixed (pre-GA)

This test suite caught 2 product bugs which were subsequently fixed on the da-floodgate branch:

  1. HIGH — Runtime-loaded fragments not copied (chrono-box dynamic paths missed by Find step)
  2. MEDIUM.link files silently skipped (not in SUPPORTED_FILES)

Both are verified fixed in the latest test run.

How to Run

# One-time setup
node nala/utils/da-login.js                                      # log in to DA
node nala/features/dafloodgate/seed-real-content.js seed         # populate sandbox
node nala/features/dafloodgate/setup-test-data.js                # verify state

# Smoke (~2 min)
npx playwright test nala/features/dafloodgate/ --grep "@smoke" --project=milo-live-chromium --workers=1

# Full suite (~7 min)
npx playwright test nala/features/dafloodgate/ --project=milo-live-chromium --workers=1

# Copy-only (~4 min)
npx playwright test nala/features/dafloodgate/ --grep "@fg-copy" --project=milo-live-chromium --workers=1

Notes

  • Tests must run with --workers=1; parallel execution causes race conditions on shared FG repo state.
  • auth.json is gitignored — each contributor runs da-login.js once locally.
  • Test sandbox: /adobecom/da-events/drafts/nala-fg-test/
  • Tool URL: https://da.live/#/adobecom/da-events/tools/floodgate?ref=da-floodgate

Test plan

  • Smoke (10/10 pass)
  • Full regression (49/49 pass, 2 intentional skips)
  • Bugs Add recommendations #1 + Coverage #2 verified fixed
  • Reviewed for hardcoded credentials → none found

🤖 Generated with Claude Code

@JackySun9 JackySun9 force-pushed the nala-floodgate-da-tests branch 4 times, most recently from 021502c to bedafa8 Compare May 7, 2026 17:52
Copy link
Copy Markdown
Contributor

@skumar09 skumar09 left a comment

Choose a reason for hiding this comment

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

@JackySun9 we need to remove these test execution from every PR?

cc: @narcis-radu , @SilviuLCF

@JackySun9 JackySun9 force-pushed the nala-floodgate-da-tests branch from bedafa8 to 3df2eea Compare May 12, 2026 16:09
Adds comprehensive end-to-end test coverage for the Floodgate for DA tool
(MWPW-189268) running against da.live with the da-floodgate branch.

What's included:
- Page Object Model with iframe + shadow DOM traversal (floodgate.page.js)
- 51 test cases across 7 suites: Page Load, Path Validation, Copy (Simple +
  Real Events), Content Integrity, Promote, Delete, Cancel/Retry, E2E
  Smoke Chain
- Real-content seed script that pulls 5 production event pages + their
  fragments into a sandbox at /drafts/nala-fg-test/
- DA login helper that saves a Playwright storageState for test reuse
- Self-healing test data hooks via DA admin API (ensureFileInFg) so
  delete tests don't break each other
- Byte-level source-vs-FG content comparator that normalizes URL rewrites
  and verifies CaaS-encoded payload preservation
- Full English TEST-PLAN.md with execution instructions and risk register

Test execution:
- 51 tests, 49 pass, 2 intentional skips, 0 failures
- ~7 min runtime at workers=1
- Verified Bugs #1 (runtime fragment discovery) and #2 (.link file
  handling) are now fixed in the da-floodgate branch

Auth setup:
- Run `node nala/utils/da-login.js` once to create auth.json (gitignored)
- Tests reuse the storageState; no credentials in code

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JackySun9 JackySun9 force-pushed the nala-floodgate-da-tests branch from 3df2eea to 9ceb481 Compare May 12, 2026 16:19
@github-actions
Copy link
Copy Markdown
Contributor

This PR does not qualify for the zero-impact label as it touches code outside of the allowed areas. The label is auto applied, do not manually apply the label.

Copy link
Copy Markdown
Contributor

@skumar09 skumar09 left a comment

Choose a reason for hiding this comment

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

@JackySun9 ,

  • As discussed in the offline Slack chat, thanks for updating the path features/dafloodgate/** to the ignore list so that Floodgate tests are not triggered on PR push/commit commands.
  • removing the do-not-merge label

cc: @narcis-radu , @SilviuLCF , @mokimo

@JackySun9 JackySun9 added verified PR has been E2E tested by a reviewer Ready for Stage labels May 12, 2026
@milo-pr-merge milo-pr-merge Bot merged commit d2ded09 into adobecom:stage May 13, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for Stage verified PR has been E2E tested by a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants