Skip to content

Intitial playwright tests with workflow #169

Open
NethmikaKekuu wants to merge 21 commits into
LDFLK:mainfrom
NethmikaKekuu:feathure/playwright-tests-workflows
Open

Intitial playwright tests with workflow #169
NethmikaKekuu wants to merge 21 commits into
LDFLK:mainfrom
NethmikaKekuu:feathure/playwright-tests-workflows

Conversation

@NethmikaKekuu

@NethmikaKekuu NethmikaKekuu commented Jun 24, 2026

Copy link
Copy Markdown
Member

Playwright E2E Test Suite with Responsiveness & Coverage


This pr closes #167

Overview

Adds a comprehensive Playwright end-to-end test suite for the person profile flow, including cross-browser testing, responsive viewport testing, and code coverage reporting.

closes #166

What's Tested

Full User Flow (tests/view-profile.spec.js)

  1. Navigate to the organization cabinet-structure page
  2. Locate and click View Profile
  3. Verify correct profile URL is loaded
  4. Click Share button and verify clipboard content (Chromium only)
  5. Scroll to bottom and verify source link (parliament.lk) opens in a new tab
  6. Switch to Portfolios Held tab and verify it becomes active
  7. Switch to Qualifications tab and verify it becomes active
  8. Click Back button and verify navigation returns to organization page

Responsiveness Testing

The full flow above runs at 3 viewport sizes:

Size Width Height
Mobile 375px 812px
Tablet 768px 1024px
Desktop 1280px 800px

Cross-Browser Testing

All tests run across 3 browsers:

  • Chromium
  • Firefox
  • WebKit (Safari)

Clipboard assertions are Chromium-only — Firefox and WebKit do not expose the clipboard API to Playwright.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces Playwright end-to-end testing to the repository, adding a comprehensive test suite for the profile and organization flows, a detailed mocking guide, and updated configuration files. Feedback on the test implementation includes leveraging TypeScript type safety by removing the ts-nocheck directive, avoiding arbitrary timeouts and manual scrolling in favor of Playwright's automatic scrolling behaviors, using relative paths instead of hardcoded absolute URLs, and enabling parallel test execution by making the workers configuration conditional.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread tests/view-profile.spec.ts
Comment thread tests/view-profile.spec.ts
Comment thread tests/view-profile.spec.ts
Comment thread tests/view-profile.spec.ts
Comment thread playwright.config.js Outdated
@NethmikaKekuu NethmikaKekuu requested a review from ChanukaUOJ June 24, 2026 01:25

@ChanukaUOJ ChanukaUOJ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Initial Comments!

Comment thread README.md
Comment thread README.md
Comment thread README.md
Comment thread .github/workflows/playwright.yml
Comment thread .github/workflows/playwright.yml
Comment thread tests/README.md
Comment thread tests/view-profile.spec.ts
Comment thread tests/view-profile.spec.ts
Comment thread tests/view-profile.spec.ts
Comment thread tests/view-profile.spec.ts
@NethmikaKekuu NethmikaKekuu requested a review from ChanukaUOJ July 6, 2026 10:34
@NethmikaKekuu

Copy link
Copy Markdown
Member Author

I changed the workflow file to run the workflow only when pushed to the main. You could see the workflow files which ran in my branch as you said earlier

@NethmikaKekuu NethmikaKekuu requested a review from zaeema-n July 6, 2026 10:41
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.

[TEST][PLAYWRITE] Write playwrite test cases for UI components

2 participants