Skip to content

Commit

Permalink
fix fail test and exclude one test
Browse files Browse the repository at this point in the history
  • Loading branch information
akashrathod28 committed Oct 3, 2023
1 parent 20d0b2f commit 2c41392
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
18 changes: 6 additions & 12 deletions e2e/playwright/navigation/src/tests/single-click.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test.describe('Single click on item name', () => {
});

test.afterAll(async ({ nodesApiAction }) => {
await nodesApiAction.deleteNodes([deletedFolder1Id, deletedFile1Id], true);
await nodesApiAction.deleteNodes([deletedFolder1Id, deletedFile1Id, folder1Id, folderSearchId], true);
});

test('[C284899] Hyperlink does not appear for items in the Trash', async ({ trashPage }) => {
Expand All @@ -65,17 +65,11 @@ test.describe('Single click on item name', () => {
expect(await trashPage.dataTable.getCellLinkByName(deletedFolder1).isVisible(), 'Link on name is present').toBe(false);
});

test.describe('on Personal Files', () => {
test.afterAll(async ({ nodesApiAction }) => {
await nodesApiAction.deleteNodes([folder1Id, folderSearchId], true);
});

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

test('[C284902] Navigate inside the library when clicking the hyperlink on File Libraries', async ({ myLibrariesPage }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class DataTableComponent extends BaseComponent {
*
* @returns reference to cell element which contains link.
*/
getCellLinkByName = (name: string): Locator => this.getChild('.adf-datatable-cell-value[role="link"]', { hasText: name });
getCellLinkByName = (name: string): Locator => this.getChild('.adf-cell-value span', { hasText: name });

/**
* Method used in cases where we want to localize the element by [aria-label]
Expand Down

0 comments on commit 2c41392

Please sign in to comment.