Skip to content

Commit

Permalink
e2e: fix selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan committed Feb 24, 2022
1 parent 2a59f87 commit 3cdf9bf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/e2e/support/page/files/allFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export class AllFilesPage {
async navigate(): Promise<void> {
const { page } = this.actor

const allFilesBtn = page.locator('a[href="#/files/spaces/personal/home"] .text')
const allFilesBtn = page.locator(
'//a[@href="#/files/spaces/personal/home" or @href="/files/spaces/personal/home"]//span[contains(@class, "text")]'
)
await allFilesBtn.click()
}

Expand Down
4 changes: 3 additions & 1 deletion tests/e2e/support/page/files/sharedWithMe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export class SharedWithMePage {

async navigate(): Promise<void> {
const { page } = this.actor
await page.locator('a[href="#/files/shares/with-me"]').click()
await page
.locator('//a[@href="#/files/shares/with-me" or @href="/files/shares/with-me"]')
.click()
}

async acceptShare({ name }: { name: string }): Promise<void> {
Expand Down
6 changes: 5 additions & 1 deletion tests/e2e/support/page/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ export class RuntimePage {
async navigateToApp({ name }: { name: string }): Promise<void> {
const { page } = this.actor
await page.locator('#_appSwitcherButton').click()
await page.locator(`a[href="#/${name}"]`).click()
await page
.locator(
`//ul[contains(@class, "applications-list")]//a[@href="#/${name}" or @href="/${name}"]`
)
.click()
}

async logout(): Promise<void> {
Expand Down

0 comments on commit 3cdf9bf

Please sign in to comment.