Skip to content

Commit

Permalink
#9087 Wait for built-in integration before activating mod in e2e test (
Browse files Browse the repository at this point in the history
…#9088)

* address test flakiness in copy mod test

* refactor extract logic into helper method on activatemodpage pom
  • Loading branch information
mnholtz authored Sep 4, 2024
1 parent 91f0694 commit ad8d224
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions end-to-end-tests/pageObjects/extensionConsole/modsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ export class ActivateModPage extends BasePageObject {
});
}

async getIntegrationConfigField(index: number) {
return this.getByTestId(
`integration-auth-selector-integrationDependencies.${index}.configId`,
);
}

async selectIntegrationOption(integrationIndex: number, option: string) {
await this.page
.getByTestId(
Expand Down
1 change: 1 addition & 0 deletions end-to-end-tests/tests/extensionConsole/activation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ test("can activate a mod with built-in integration", async ({

const floatingActionButton = new FloatingActionButton(page);
const button = await floatingActionButton.getActionButton();

// Ensure the QuickBar is ready
await expect(button).toBeVisible();

Expand Down
3 changes: 3 additions & 0 deletions end-to-end-tests/tests/pageEditor/copyMod.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ test("run a copied mod with a built-in integration", async ({
sourceModId,
);
await modActivationPage.goto();
const integrationConfiguration =
await modActivationPage.getIntegrationConfigField(0);
await expect(integrationConfiguration).toHaveText("GIPHY — ✨ Built-in");
await modActivationPage.clickActivateAndWaitForModsPageRedirect();

await verifyModDefinitionSnapshot({
Expand Down

0 comments on commit ad8d224

Please sign in to comment.