-
Notifications
You must be signed in to change notification settings - Fork 34
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
SFINT-5832: Sort E2E tests migrate from Cypress to Playwright #4777
base: master
Are you sure you want to change the base?
Conversation
Pull Request ReportPR Title❌ Title should follow the conventional commit spec: Example: Live demo linksBundle Size
SSR Progress
Detailed logssearch : buildInteractiveResultsearch : buildInteractiveInstantResult search : buildInteractiveRecentResult search : buildInteractiveCitation search : buildGeneratedAnswer recommendation : missing SSR support case-assist : missing SSR support insight : missing SSR support commerce : missing SSR support |
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/sortObject.ts
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,112 @@ | |||
import {SortObject} from './sortObject'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import {SortObject} from './sortObject'; | |
import {SortObject} from './pageObject'; |
in line with my other comment
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/fixture.ts
Outdated
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/fixture.ts
Outdated
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/fixture.ts
Outdated
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/fixture.ts
Outdated
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/fixture.ts
Outdated
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/fixture.ts
Outdated
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/fixture.ts
Outdated
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/quanticSort.e2e.ts
Show resolved
Hide resolved
}); | ||
|
||
test.describe('when testing accessibility', () => { | ||
test('should be accessible to keyboard', async ({sort}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we test selecting with SPACE key here?
what about navigating with TAB or left/right arrow keys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added test using Space to open Dropdown
Tab is not necessary as it wont trigger anything
await this.sortButton(buttonName).click(); | ||
} | ||
|
||
async selectSortButtonKeyboard(): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In line with my suggestion to test with space, you could probably modify this to take the key you want to use as argument (ENTER || SPACE)
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/quanticSort.e2e.ts
Outdated
Show resolved
Hide resolved
return this.page.getByRole('combobox', {name: 'Sort by'}); | ||
} | ||
|
||
get sortPreviewHeader(): Locator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get sortPreviewHeader(): Locator { | |
get sortPreviewButton(): Locator { |
@erocheleau I will integrate the content from this PR: #4782 in this PR as well, to have more unit tests to test the component rather going E2E only. |
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/fixture.ts
Outdated
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/fixture.ts
Outdated
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/fixture.ts
Outdated
Show resolved
Hide resolved
packages/quantic/force-app/main/default/lwc/quanticSort/e2e/fixture.ts
Outdated
Show resolved
Hide resolved
urlHash: string; | ||
}; | ||
|
||
type QuanticSortE2EInsightFixtures = QuanticSortE2ESearchFixtures & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Insight Fixture should contain QuanticSortE2EFixtures
+ insightSteup
and not QuanticSortE2ESearchFixtures
+ insightSetup
You can follow the following example:
ui-kit/packages/quantic/force-app/main/default/lwc/quanticTab/e2e/fixture.ts
Lines 15 to 27 in 7a21e86
type QuanticTabE2EFixtures = { | |
tab: TabObject; | |
search: SearchObject; | |
options: Partial<TabOptions>; | |
}; | |
type QuanticTabE2ESearchFixtures = QuanticTabE2EFixtures & { | |
urlHash: string; | |
}; | |
type QuanticTabE2EInsightFixtures = QuanticTabE2EFixtures & { | |
insightSetup: InsightSetupObject; | |
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will update this. Do you want I update pager too? as I followed your example on Pager component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to be cleaned out according to the new unit tests that test the invalid sort options and custom sort sort options, no need for example for the invalidMessage
selector.
https://coveord.atlassian.net/browse/SFINT-5832
IN THIS PR:
UNIT TESTS:
E2E PLAYWRIGHT TESTS: