Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions tests/e2e/DigV2/LandingPages/InlineDashboard.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,26 @@ test.describe('E2E test', () => {
await expect(inlineDashboardTitle).toBeVisible();

/** Testing Complex Fields list presence */
const complexFieldsList = page.locator('span:has-text("Complex Fields - List")');
const complexFieldsList = page.locator('h3:has-text("Complex Fields - List")');
await expect(complexFieldsList).toBeVisible();

/** Testing My Work List presence */
const myworkList = page.locator('span:has-text("My Work List")');
const myworkList = page.locator('h3:has-text("My Work List")');
await expect(myworkList).toBeVisible();

await expect(page.getByRole('button', { name: ' Case ID ' })).toBeVisible();

const table = await page.locator('table[id="list-view"] >> nth=0');
const numOfRows = await table.locator('tbody >> tr').count();

const responsePromise = page.waitForResponse('**/data_views/D_ComplexFieldsList');
/* Testing the filters */
const filters = await page.locator('div[id="filters"]');
const caseIdInput = filters.getByLabel('Case ID');
await caseIdInput.click();
await caseIdInput.pressSequentially(caseID, { delay: 100 });

await responsePromise;
const pagination = page.locator('mat-paginator[id="pagination"]');
await expect(pagination.getByText('1 – 1 of 1')).toBeVisible();

await expect(table.locator(`td >> text=${caseID}`)).toBeVisible();
await expect(table.locator('td >> text="Complex Fields"')).toBeVisible();
Expand All @@ -89,13 +89,8 @@ test.describe('E2E test', () => {
const dateCol = await table.locator('td >> nth=2');
await expect(dateCol.getByText(`${new Date().getDate()}`)).toBeVisible();

const pagination = page.locator('mat-paginator[id="pagination"]');
await expect(pagination.getByText('1 – 1 of 1')).toBeVisible();

await filters.locator('button:has-text("Clear All")').click();

await responsePromise;

await expect(await caseIdInput.inputValue()).toEqual('');
await expect(await dateFilterInput.inputValue()).toEqual('');

Expand Down
Loading