Skip to content

Commit 21942b7

Browse files
Merge pull request #2118 from kyoto/tests-fix-tour-dismissal
Tests: Fix failure to dismiss guided tour when running locally
2 parents 14bcba9 + 757fb85 commit 21942b7

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

tests/support/fixtures.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,19 @@ export const interceptFeedback = async (
246246

247247
// Custom test fixture that captures browser console errors/warnings and prints
248248
// them only when the test fails, keeping passing test output clean.
249-
export const test = base.extend<{ captureConsoleLogs: void }>({
249+
export const test = base.extend<{ captureConsoleLogs: void; dismissGuidedTour: void }>({
250+
dismissGuidedTour: [
251+
async ({ page }, use) => {
252+
await page.addLocatorHandler(
253+
page.locator('[data-test="tour-step-footer-secondary"]'),
254+
async (btn) => {
255+
await btn.click();
256+
},
257+
);
258+
await use();
259+
},
260+
{ auto: true },
261+
],
250262
captureConsoleLogs: [
251263
async ({ page }, use, testInfo) => {
252264
const logs: { method: string; msg: string }[] = [];

0 commit comments

Comments
 (0)