Skip to content

Commit

Permalink
Fix flaky e2e preferences test
Browse files Browse the repository at this point in the history
  • Loading branch information
obulat committed Oct 18, 2024
1 parent 86b17a5 commit 75630ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/pages/preferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const doneHydrating = computed(() => useHydrating())
@change="handleChange"
>
<div>
<strong>{{ flag.name }}</strong>
<strong>{{ flag.name }}{{ `: ${flag.state}` }}</strong>
<br />
{{ flag.description }}
</div>
Expand Down
6 changes: 5 additions & 1 deletion frontend/test/playwright/e2e/preferences.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Page, test } from "@playwright/test"
import { type Page, expect, test } from "@playwright/test"

import { preparePageForTests } from "~~/test/playwright/utils/navigation"

Expand Down Expand Up @@ -104,6 +104,10 @@ const toggleChecked = async (
},
[name, !originalChecked ? "bg-tertiary" : "bg-default"] as const
)

await expect(
page.getByText(`${name}: ${!originalChecked ? "on" : "off"}`).first()
).toBeVisible()
}

test.describe("switchable features", () => {
Expand Down

0 comments on commit 75630ac

Please sign in to comment.