Skip to content

Commit

Permalink
[ACS-5882] Fixed one test
Browse files Browse the repository at this point in the history
  • Loading branch information
datguychen committed Feb 2, 2024
1 parent d4f1adb commit ca7c09c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions e2e/playwright/navigation/src/tests/single-click.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ test.describe('Single click on item name', () => {

test('[C280034] Navigate inside the folder when clicking the hyperlink on Personal Files', async ({ personalFiles }) => {
await personalFiles.navigate();
await personalFiles.dataTable.setPaginationTo50();
await personalFiles.dataTable.getCellLinkByName(folder1).click();
await personalFiles.dataTable.spinnerWaitForReload();
while ((await personalFiles.breadcrumb.currentItem.innerText()) === 'Personal Files') {
await personalFiles.breadcrumb.currentItem.innerText();
}
expect(await personalFiles.breadcrumb.currentItem.innerText()).toBe(folder1);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export class DataTableComponent extends BaseComponent {
emptyListSubtitle = this.getChild('.adf-empty-content__subtitle');
emptySearchText = this.getChild('.empty-search__text');
emptyListTest = this.getChild('adf-custom-empty-content-template');
paginationButton = this.page.locator('.adf-pagination__block button').nth(0);
paginationOptions = this.page.locator('#cdk-overlay-0 button');

/** Locator for row (or rows) */
getRowLocator = this.getChild(`adf-datatable-row`);
Expand Down Expand Up @@ -319,4 +321,9 @@ export class DataTableComponent extends BaseComponent {
async rightClickOnItem(itemName: string): Promise<void> {
await this.getCellByColumnNameAndRowItem(itemName, 'Name').click({ button: 'right' });
}

async setPaginationTo50(): Promise<void> {
await this.paginationButton.click();
await this.paginationOptions.getByText("50").click();
}
}

0 comments on commit ca7c09c

Please sign in to comment.