-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SALEOR_119] Increase timeouts on app install (#5147)
* increase timeouts * extract timeout values to variables
- Loading branch information
Showing
2 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"saleor-dashboard": patch | ||
--- | ||
|
||
SALEOR_119 now has increased timeouts for app instalation. This means the test should fail less. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,11 @@ test.beforeEach(({ page }) => { | |
appPage = new AppPage(page); | ||
}); | ||
|
||
const PRE_INSTALLATION_TIMEOUT = 20 * 1000; | ||
const INSTALLATION_PENDING_TIMEOUT = 50 * 1000; | ||
const APP_LISTED_TIMEOUT = 15 * 1000; | ||
const APP_INSTALLED_TIMEOUT = 50 * 1000; | ||
|
||
test("TC: SALEOR_119 User should be able to install and configure app from manifest @e2e", async ({ | ||
page, | ||
}) => { | ||
|
@@ -25,21 +30,28 @@ test("TC: SALEOR_119 User should be able to install and configure app from manif | |
await appsPage.installExternalAppButton.click(); | ||
await appsPage.typeManifestUrl("https://klaviyo.saleor.app/api/manifest"); | ||
await appsPage.installAppFromManifestButton.click(); | ||
// Klaviyo app can take a while to respond with manifest if it's | ||
// cold-starting | ||
await expect(installationPage.appInstallationPageHeader).toHaveText( | ||
Check failure on line 35 in playwright/tests/apps.spec.ts GitHub Actions / run-tests-on-release / run-pw-tests (2/2)[apps-e2e] › apps.spec.ts:24:5 › TC: SALEOR_119 User should be able to install and configure app from manifest @e2e
Check failure on line 35 in playwright/tests/apps.spec.ts GitHub Actions / run-tests-on-release / run-pw-tests (2/2)[apps-e2e] › apps.spec.ts:24:5 › TC: SALEOR_119 User should be able to install and configure app from manifest @e2e
|
||
"You are about to install Klaviyo", | ||
{ | ||
timeout: PRE_INSTALLATION_TIMEOUT, | ||
}, | ||
); | ||
await installationPage.installAppButton.click(); | ||
await appsPage.expectSuccessBanner(); | ||
await expect(appsPage.installedAppRow.first()).toBeVisible(); | ||
await appsPage.installationPendingLabel.waitFor({ | ||
state: "hidden", | ||
timeout: 50000, | ||
timeout: INSTALLATION_PENDING_TIMEOUT, | ||
}); | ||
await expect(appsPage.appKlaviyo).toContainText("Klaviyo", { | ||
timeout: APP_LISTED_TIMEOUT, | ||
}); | ||
await expect(appsPage.appKlaviyo).toContainText("Klaviyo"); | ||
await appsPage.installedAppRow | ||
.filter({ hasText: "Klaviyo" }) | ||
.first() | ||
.waitFor({ state: "visible", timeout: 50000 }); | ||
.waitFor({ state: "visible", timeout: APP_INSTALLED_TIMEOUT }); | ||
await appsPage.appKlaviyo.click(); | ||
|
||
const iframeLocator = page.frameLocator("iframe"); | ||
|