Browse Source

test: kanban

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5363/head
Raju Udava 2 years ago
parent
commit
86a26b1c82
  1. 7
      tests/playwright/pages/Dashboard/ViewSidebar/index.ts
  2. 6
      tests/playwright/pages/Dashboard/common/Toolbar/ShareView.ts

7
tests/playwright/pages/Dashboard/ViewSidebar/index.ts

@ -86,6 +86,13 @@ export class ViewSidebarPage extends BasePage {
// Todo: Make selection better
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(
this.get().locator('[data-testid="view-item"]').nth(index).locator('[data-testid="truncate-label"]')
).toHaveText(title, { ignoreCase: true });

6
tests/playwright/pages/Dashboard/common/Toolbar/ShareView.ts

@ -1,5 +1,6 @@
import BasePage from '../../../Base';
import { ToolbarPage } from './index';
import { getTextExcludeIconText } from '../../../../tests/utils/general';
export class ToolbarShareViewPage extends BasePage {
readonly toolbar: ToolbarPage;
@ -29,8 +30,9 @@ export class ToolbarShareViewPage extends BasePage {
}
async getShareLink() {
// http://localhost:3000/#/nc/view/35231cff-05c5-49ab-9045-f410db79ba5a
return (await this.get().locator(`[data-testid="nc-modal-share-view__link"]`).innerText()).slice(0, 68);
const locator = this.get().locator(`[data-testid="nc-modal-share-view__link"]`);
const linkText = getTextExcludeIconText(locator);
return linkText;
}
async close() {

Loading…
Cancel
Save