|
|
@ -86,6 +86,13 @@ export class ViewSidebarPage extends BasePage { |
|
|
|
|
|
|
|
|
|
|
|
// Todo: Make selection better
|
|
|
|
// Todo: Make selection better
|
|
|
|
async verifyView({ title, index }: { title: string; index: number }) { |
|
|
|
async verifyView({ title, index }: { title: string; index: number }) { |
|
|
|
|
|
|
|
// flicker while page loading
|
|
|
|
|
|
|
|
await this.get() |
|
|
|
|
|
|
|
.locator('[data-testid="view-item"]') |
|
|
|
|
|
|
|
.nth(index) |
|
|
|
|
|
|
|
.locator('[data-testid="truncate-label"]') |
|
|
|
|
|
|
|
.waitFor({ state: 'visible' }); |
|
|
|
|
|
|
|
|
|
|
|
await expect( |
|
|
|
await expect( |
|
|
|
this.get().locator('[data-testid="view-item"]').nth(index).locator('[data-testid="truncate-label"]') |
|
|
|
this.get().locator('[data-testid="view-item"]').nth(index).locator('[data-testid="truncate-label"]') |
|
|
|
).toHaveText(title, { ignoreCase: true }); |
|
|
|
).toHaveText(title, { ignoreCase: true }); |
|
|
|