[ACS-11855] include e2es lithium (#5194)

* [ACS-11855] included some e2es + small refactoring / improvements

* [ACS-11855] more tests include

* [ACS-11855] sonar cloud fix 1

* [ACS-11855] copilot review fixes 1

* [ACS-11855] copilot review fixes 2

* [ACS-11855] small tests fixes or improvements

* [ACS-11855] fixed failing tests

* [ACS-11855] sonar cloud fix

* [ACS-11855] sonar cloud fix 2

* [ACS-11855] more search improvements

* [ACS-11855] review fix 1

* [ACS-11855] review fix 2

* [ACS-11855] more small improvements
This commit is contained in:
Adam Świderski
2026-05-21 12:24:45 +02:00
committed by GitHub
parent c67b4dc203
commit aa03f7d005
35 changed files with 84 additions and 128 deletions
@@ -47,6 +47,7 @@ export class ConditionComponent extends ManageRulesDialogComponent {
this.page.locator('[role=listbox] [role=option]', { hasText: optionName }).first();
private async selectField(fields: Partial<Field>, index: number): Promise<void> {
await this.fieldDropDown.nth(index).scrollIntoViewIfNeeded();
await this.fieldDropDown.nth(index).click();
const option = this.getOptionLocator(fields);
await option.click();
@@ -64,7 +65,11 @@ export class ConditionComponent extends ManageRulesDialogComponent {
if (comparators) {
await this.selectComparator(comparators, index);
}
await this.valueField.nth(index).fill(value);
if ((await this.valueField.count()) === 1) {
await this.valueField.last().fill(value);
} else {
await this.valueField.nth(index).fill(value);
}
}
async addConditionGroup(fields: Partial<Field>, value: string, index: number, comparators?: Partial<Comparator>): Promise<void> {
@@ -151,7 +151,6 @@ export class DataTableComponent extends BaseComponent {
}
async goThroughPagesLookingForRowWithName(name: string | number): Promise<void> {
await this.spinnerWaitForReload();
if (await this.getRowByName(name).isVisible()) {
return;
}
@@ -62,11 +62,13 @@ export class ManageRules extends BaseComponent {
return this.ruleConditionsInGroup.count();
}
async turnOffRuleToggle(): Promise<void> {
async turnOffRuleToggle(skipExpect?: 'skip expect'): Promise<void> {
await expect(async () => {
await this.ruleToggle.hover({ timeout: 1000 });
await this.ruleToggle.click();
await expect(this.ruleToggleFalse).toBeVisible();
if (skipExpect !== 'skip expect') {
await expect(this.ruleToggleFalse).toBeVisible();
}
}).toPass({
intervals: [2_000],
timeout: 20_000
@@ -30,8 +30,8 @@ export class SearchInDialogComponent extends BaseComponent {
public filesAndFoldersRadioButton = this.getChild('.aca-search-in-panel__radio label').getByText('Files and folders');
public librariesRadioButton = this.getChild('.aca-search-in-panel__radio label').getByText('Libraries');
public filesCheckbox = this.getChild('.aca-search-in-panel__checkboxes').getByLabel('Files');
public foldersCheckbox = this.getChild('.aca-search-in-panel__checkboxes').getByLabel('Folders');
public filesCheckbox = this.getChild('#content [type="checkbox"]');
public foldersCheckbox = this.getChild('#folder [type="checkbox"]');
public applyButton = this.getChild('button', { hasText: 'Apply' });
readonly resetButton = this.getChild('button', { hasText: 'Reset' });
@@ -45,6 +45,7 @@ export class SearchInputComponent extends BaseComponent {
}
async searchFor(searchText: string): Promise<void> {
await this.searchInput.click();
await this.searchInput.fill(searchText);
await this.searchButton.click();
}
@@ -33,8 +33,6 @@ export class SnackBarComponent extends BaseComponent {
public actionButton = this.getChild('[data-automation-id="adf-snackbar-message-content-action-button"]');
public closeIcon = this.getChild('.adf-snackbar-message-content-action-icon');
public getByMessageLocator = (message: string) =>
this.getChild(`[data-automation-id='adf-snackbar-message-content']`, { hasText: message }).first();
constructor(page: Page, rootElement = SnackBarComponent.rootElement) {
super(page, rootElement);
@@ -45,11 +43,7 @@ export class SnackBarComponent extends BaseComponent {
}
async getSnackBarActionText(): Promise<string> {
if (await this.actionButton.isVisible()) {
return this.actionButton.textContent();
} else {
return '';
}
return this.actionButton.innerText();
}
async verifySnackBarActionText(text: string): Promise<void> {
@@ -72,7 +72,7 @@ export class ViewerComponent extends BaseComponent {
async waitForViewerToOpen(): Promise<void> {
await this.waitForViewerLoaderToFinish();
await this.viewerLocator.waitFor({ state: 'visible', timeout: timeouts.large });
await this.viewerLocator.waitFor({ state: 'visible', timeout: timeouts.extraLarge });
}
async waitForViewerLoaderToFinish(): Promise<void> {
@@ -80,6 +80,7 @@ export class SearchPage extends BasePage {
if (!(await this.searchInputComponent.searchInput.isVisible())) {
await this.acaHeader.searchButton.click();
}
await this.searchInputComponent.searchFor(searchText);
await this.searchInputComponent.searchInButton.click();
switch (searchType) {
case 'files':
@@ -98,12 +99,6 @@ export class SearchPage extends BasePage {
break;
}
await this.searchInDialog.applyButton.click();
await this.clickSearchButton();
await this.searchInputComponent.searchFor(searchText);
await this.dataTable.spinnerWaitForReload();
}
async clickSearchButton() {
await this.searchInputComponent.searchButton.click({ force: true });
}
}