Skip to content

Commit c2437b4

Browse files
committed
test(e2e): fix tests to be not bnlocked by the onboarding screen
re #RI-7432 #RI-7275
1 parent d0cc07c commit c2437b4

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/playwright/pageObjects/pages/vector-search/vector-search-page.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,17 @@ export class VectorSearchPage extends BasePage {
133133
this.startWizardButton = page.getByTestId('start-wizard-button')
134134
}
135135

136-
async navigateToVectorSearchPage(): Promise<void> {
136+
async navigateToVectorSearchPage({
137+
forceOnboarding = false,
138+
}: { forceOnboarding?: boolean } = {}): Promise<void> {
139+
// Toggle the visibility of the onboarding screen, based on the locaStorage flag
140+
await this.page.evaluate((vectorSearchOnboarding: boolean) => {
141+
localStorage.setItem(
142+
'vectorSearchOnboarding', // BrowserStorageItem.vectorSearchOnboarding,
143+
(!vectorSearchOnboarding).toString(),
144+
)
145+
}, forceOnboarding)
146+
137147
await this.searchTab.getByRole('paragraph').click()
138148
await this.waitForLocatorVisible(this.vectorSearchPage)
139149
}

0 commit comments

Comments
 (0)