Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only] add e2e test for progress bars #132

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nabim777
Copy link
Member

@nabim777 nabim777 commented Jan 21, 2025

Description

In this PR, an e2e test is added for the web-app-progress-bar extension.
And currently there is only one web-app-progress-bar named Nyan Cat progress bar, so there is only a test for it.

steps added:

  • go to account manage page
  • select the option Nyan Cat progress bar

Test run command

pnpm test:e2e --project='progress-bars-chromium'

Related Issue

Screenshots (if appropriate):

Following video shows what's automated in the E2E test for web-app-progress-bar extension (added in this PR)

Screencast.from.01-22-2025.04.50.54.PM.webm

How Has This Been Tested?

  • test environment:
  • CI
  • locally
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@CLAassistant
Copy link

CLAassistant commented Jan 21, 2025

CLA assistant check
All committers have signed the CLA.

@nabim777 nabim777 self-assigned this Jan 21, 2025
@nabim777 nabim777 force-pushed the tests/app-progress-bar branch 10 times, most recently from 6375fd9 to 012bb0e Compare January 21, 2025 10:57
@nabim777 nabim777 marked this pull request as ready for review January 21, 2025 11:14
@nabim777 nabim777 force-pushed the tests/app-progress-bar branch 2 times, most recently from 5a70aa9 to 2b7121c Compare January 22, 2025 10:20
Signed-off-by: nabim777 <[email protected]>
@nabim777 nabim777 force-pushed the tests/app-progress-bar branch from 2b7121c to 59e6483 Compare January 22, 2025 11:28
support/pages/accountPage.ts Outdated Show resolved Hide resolved
support/pages/accountPage.ts Outdated Show resolved Hide resolved
@amrita-shrestha
Copy link

amrita-shrestha commented Jan 23, 2025

i can see multiple extension in one pipeline just want to know how they run, parallel or turn-by-turn ?
Screenshot from 2025-01-23 11-31-53

Could you describe about hooks and running process in PR description (like hooks run separately for each extension or all extension have same hooks used). So that it will be easy for everyone to review your PR.

Add link to doc to web-extension .
If there is no doc available to run tests for web-extension, how about adding that?

Please keep in mind, while working on QA task, about your team members involvement? If you are working on new task in which most of the staff has not worked before, adding background in description is useful for everyone.

await logout(adminPage)
})

test('select the progressBarOption from the web-app-progress-bars extension', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
test('select the progressBarOption from the web-app-progress-bars extension', async () => {
test('select the progressBarOption on the account page', async () => {

this only tests if the dropdown shows the Nyan Cat option and if its selectable, nothing more

Signed-off-by: nabim777 <[email protected]>
await logout(adminPage)
})

test('select the progressBarOption on the account page', async () => {

Choose a reason for hiding this comment

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

Suggested change
test('select the progressBarOption on the account page', async () => {
test('select NyanCat progressBarOption on the account page', async () => {

await this.accountManageBtn.click()
}

async selectProgressBarExtension(){

Choose a reason for hiding this comment

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

Suggested change
async selectProgressBarExtension(){
async selectNyanCatProgressBarExtension(){


this.progressBarSelector = this.page.locator('.extension-preference .vs__search')
this.progressBarCurrent = this.page.locator('.extension-preference .vs__selected span')
this.progressBarOption = this.page.getByText('Nyan Cat progress bar')

Choose a reason for hiding this comment

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

Suggested change
this.progressBarOption = this.page.getByText('Nyan Cat progress bar')
this.nyanCatProgressBarOption = this.page.getByText('Nyan Cat progress bar')

Comment on lines +27 to +28
await this.progressBarSelector.waitFor()
await this.progressBarSelector.click()

Choose a reason for hiding this comment

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

IMO click wait for selector to be visibile https://playwright.dev/docs/api/class-locator#locator-click why to add expicit waitfor ?

Suggested change
await this.progressBarSelector.waitFor()
await this.progressBarSelector.click()
await this.progressBarSelector.click()

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.

4 participants