Skip to content

Commit

Permalink
fix e2e test for interactions addon
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Jun 20, 2023
1 parent e3f7ff1 commit 63df870
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions code/e2e-tests/addon-interactions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ test.describe('addon-interactions', () => {
const panel = sbPage.panelContent();
const runStatusBadge = await panel.locator('[aria-label="Status of the test run"]');
await expect(runStatusBadge).toContainText(/Pass/);
await expect(panel).toContainText(/value: "initial value"/);
await expect(panel).toContainText(/value: ""/);
await expect(panel).toContainText(/value: "final value"/);
await expect(panel).toContainText(/"initial value"/);
await expect(panel).toContainText(/clear/);
await expect(panel).toContainText(/"final value"/);
await expect(panel).toBeVisible();

// Test interactions debugger - Stepping through works, count is correct and values are as expected
Expand All @@ -94,6 +94,9 @@ test.describe('addon-interactions', () => {
// Test rerun state (from addon panel) - Interactions have rerun, count is correct and values are as expected
const rerunInteractionButton = await panel.locator('[aria-label="Rerun"]');
await rerunInteractionButton.click();

await expect(formInput).toHaveValue('final value');

await interactionsRow.first().isVisible();
await interactionsRow.nth(1).isVisible();
await interactionsRow.nth(2).isVisible();
Expand All @@ -108,5 +111,6 @@ test.describe('addon-interactions', () => {
await interactionsRow.nth(2).isVisible();
await expect(interactionsTab).toContainText(/(3)/);
await expect(interactionsTab).toBeVisible();
await expect(formInput).toHaveValue('final value');
});
});

0 comments on commit 63df870

Please sign in to comment.