-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Migrate navigation tests to playwright #4294
Conversation
🦋 Changeset detectedLatest commit: ae97dab The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
this.permissionGroupsButton = page.locator( | ||
"[data-test-id*='permission-groups']", | ||
); | ||
this.staffMembersButton = page.locator("[data-test-id*='staff members']"); |
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.
this.staffMembersButton = page.locator("[data-test-id*='staff members']"); | |
this.staffMembersButton = page.locator("[data-test-id*='staff-members']"); |
ddeb5c9
playwright/tests/auth.setup.ts
Outdated
setup("authenticate as user with discount permissions", async ({ page }) => { | ||
const loginPage = new LoginPage(page); | ||
await loginPage.setupLogin( | ||
USER_PERMISSION.discount, | ||
process.env.CYPRESS_PERMISSIONS_USERS_PASSWORD!, | ||
); | ||
const homePage = new HomePage(page); | ||
await expect(homePage.welcomeMessage).toContainText("Hello there,"); | ||
// End of authentication steps. | ||
await page.context().storageState({ path: discountPermissionsFile }); | ||
}); | ||
|
||
setup("authenticate as user with orders permissions", async ({ page }) => { | ||
const loginPage = new LoginPage(page); | ||
await loginPage.setupLogin( | ||
USER_PERMISSION.order, | ||
process.env.CYPRESS_PERMISSIONS_USERS_PASSWORD!, | ||
); | ||
const homePage = new HomePage(page); | ||
await expect(homePage.welcomeMessage).toContainText("Hello there,"); | ||
// End of authentication steps. | ||
await page.context().storageState({ path: ordersPermissionsFile }); | ||
}); |
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.
This code is almost same for all setups, cant we create the function loginAndSetStorageState(esername, pastowrd, pathtostorageStateFile)
closes #4274
Screenshots
Pull Request Checklist
data-test-id
are added for new elementsTest environment config
API_URI=https://master.staging.saleor.cloud/graphql/
APPS_MARKETPLACE_API_URI=https://apps.staging.saleor.io/api/v2/saleor-apps
Do you want to run more stable tests?
To run all tests, just select the stable checkbox. To speed up tests, increase the number of containers. Tests will be re-run only when the "run e2e" label is added.
CONTAINERS=6