Skip to content

test(e2e): port public_project_gallery_signed_out to Playwright#73614

Open
stephenliang wants to merge 5 commits into
stagingfrom
stephen/playwright-public-project-gallery
Open

test(e2e): port public_project_gallery_signed_out to Playwright#73614
stephenliang wants to merge 5 commits into
stagingfrom
stephen/playwright-public-project-gallery

Conversation

@stephenliang

@stephenliang stephenliang commented Jul 1, 2026

Copy link
Copy Markdown
Member

Ports public_project_gallery_signed_out.feature (2 Cucumber scenarios) to a Playwright spec at frontend/packages/e2e-tests/tests/projects/public-project-gallery.spec.ts with a POM at tests/pages/public-project-gallery.ts.

What changed

  • New POM (PublicProjectGallery): extends BasePage, exposes locators for the page heading, #uitest-public-projects gallery container, .ui-project-app-type-area wrappers, and .ui-featured section. Navigation via goto() to /projects/public.
  • New spec (public-project-gallery.spec.ts): two tests mirroring the Cucumber scenarios — "Public Gallery Shows Expected Elements" (heading visible, gallery container visible) and "Public Gallery Shows Expected Project Types" (exactly 1 project type area, featured section contains "Featured Projects").
  • @playwright tag added to the original .feature file to mark it as ported.

Links

Testing story

Stress-tested locally: 30/30 runs passed (5 repeats × 3 browsers — chromium, firefox, webkit — with --retries=0). Code-reviewed at xhigh effort; two redundant assertions trimmed post-review (redundant toContainText subsumed by locator name filter, redundant toBeAttached subsumed by toHaveCount).

Deployment notes

No deployment impact — test-only change.

stephenliang and others added 4 commits July 1, 2026 11:42
…out to playwright

Port 2 scenarios from dashboard/test/ui/features/teacher_tools/projects/public_project_gallery_signed_out.feature.
Green under the 5x/all-browser stress gate; original Cucumber feature tagged @playwright so the Cucumber suite skips it.

Source: dashboard/test/ui/features/teacher_tools/projects/public_project_gallery_signed_out.feature
The locator `getByRole('heading', {level: 1, name: 'Projects'})` already
guarantees the accessible name; replace tautological `toContainText` with
`toBeVisible`. Drop `toBeAttached` subsumed by the following `toHaveCount(1)`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Strip verbose docstring and per-field comments (homedir rule)
- Rename PublicProjectGallery → PublicProjectGalleryPage (Page suffix)
- Replace .ui-featured CSS selector with getByRole heading a11y locator
- Drop migration-status comments from spec

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… spec

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@stephenliang stephenliang marked this pull request as ready for review July 1, 2026 20:30
@stephenliang stephenliang requested review from a team and Nokondi and removed request for a team July 1, 2026 20:30
Scoped axe scan on #uitest-public-projects; currently zero violations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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