[ACS-6066 ] playwright e2e other permissions (#3510)

* ACS-6066 other permissions test

* ACS-6066 other permissions test remove protractor

* ACS-6066 other permissions test remove protracto

* ACS-6066 other permissions remove code Duplicate

* ACS-6066 other permissions rebase

* ACS-6066 other permissions code cleanup

* code fix and remove protractor test

* review code fix

* review code fix

* fail test code fix
This commit is contained in:
Akash Rathod
2023-11-14 12:32:24 +01:00
committed by GitHub
parent 57ac20a8c5
commit 4877a0549b
14 changed files with 440 additions and 418 deletions

View File

@@ -45,7 +45,7 @@ export class DataTableComponent extends BaseComponent {
getRowLocator = this.getChild(`adf-datatable-row`);
/** Locator to get "No results found" message */
getNoResultsFoundMessage = this.getChild('adf-custom-empty-content-template', { hasText: "No results found" });
getNoResultsFoundMessage = this.getChild('adf-custom-empty-content-template', { hasText: 'No results found' });
/**
* Method used in cases where we want to check that some record is visible in the datatable. It will consider whole row
@@ -210,13 +210,14 @@ export class DataTableComponent extends BaseComponent {
async selectItem(name: string): Promise<void> {
const isSelected = await this.hasCheckMarkIcon(name);
if (!isSelected) {
const row = this.getRowByName(name);
await row.locator('.mat-checkbox[id*="mat-checkbox"]').check();
let row = this.getRowByName(name);
await row.locator('[title="Size"]').click();
await row.locator('.adf-datatable-selected').waitFor({ state: 'attached' });
}
}
async hasCheckMarkIcon(itemName: string): Promise<boolean> {
const row = this.getRowByName(itemName);
return await row.locator('.mat-checkbox[class*="checked"]').isVisible();
return await row.locator('.adf-datatable-selected').isVisible();
}
}