mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACS-4892] [E2E] Created new tests for adding folder rules (#3895)
* [ACS-4892] [E2E] Created new tests for adding folder rules * [ACS-4892] excluded one test for now * [ACS-4892] [E2E] The rest of test cases automated * [ACS-4892] deleted the unused if enum * [ACS-4892] review fixes 1 * [ACS-4892] review fixes 2 * [ACS-4892] review fixes 3
This commit is contained in:
@@ -29,15 +29,23 @@ export class ManageRulesDialogComponent extends BaseComponent {
|
||||
private static rootElement = 'aca-edit-rule-dialog';
|
||||
|
||||
public createRuleButton = this.getChild('[data-automation-id="edit-rule-dialog-submit"]');
|
||||
public cancelRuleButton = this.getChild('.aca-edit-rule-dialog__footer button').filter({ hasText: 'Cancel' });
|
||||
public ruleNameInputLocator = this.getChild('[id="rule-details-name-input"]');
|
||||
public ruleDescriptionInputLocator = this.getChild('[id="rule-details-description-textarea"]');
|
||||
public addConditionButton = this.getChild('[data-automation-id="add-condition-button"]');
|
||||
public addConditionGroupButton = this.getChild('[data-automation-id="add-group-button"]');
|
||||
public fieldDropDown = this.getChild('[data-automation-id="field-select"]');
|
||||
public comparatorDropDown = this.getChild('[data-automation-id="comparator-select"]');
|
||||
public valueField = this.getChild('[data-automation-id="value-input"]');
|
||||
public whenCreatedCheckbox = this.getChild('[data-automation-id="rule-trigger-checkbox-inbound"]');
|
||||
public whenUpdatedCheckbox = this.getChild('[data-automation-id="rule-trigger-checkbox-update"]');
|
||||
public whenDeletedCheckbox = this.getChild('[data-automation-id="rule-trigger-checkbox-outbound"]');
|
||||
public destinationFolderButton = this.getChild('[data-automation-id="card-textitem-clickable-icon-destination-folder"]');
|
||||
public ruleInBackgroundCheckbox = this.getChild('[data-automation-id="rule-option-checkbox-asynchronous"]');
|
||||
public ruleSubfoldersCheckbox = this.getChild('[data-automation-id="rule-option-checkbox-inheritable"]');
|
||||
public ruleDisableCheckbox = this.getChild('[data-automation-id="rule-option-checkbox-disabled"]');
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, ManageRulesDialogComponent.rootElement);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Locator, Page } from '@playwright/test';
|
||||
import { Locator, Page, expect } from '@playwright/test';
|
||||
import { BaseComponent } from '../base.component';
|
||||
|
||||
export class ManageRules extends BaseComponent {
|
||||
@@ -31,8 +31,29 @@ export class ManageRules extends BaseComponent {
|
||||
public getGroupsList = (optionName: string): Locator => this.getChild('.aca-rule-list-item__header', { hasText: optionName });
|
||||
public ruleToggle = this.getChild('.aca-manage-rules__container .mat-slide-toggle-bar').first();
|
||||
public ruleToggleFalse = this.getChild('aca-rule-list-grouping input[type="checkbox"][aria-checked="false"]').first();
|
||||
public ruleDetailsTitle = this.getChild('.aca-manage-rules__container__rule-details__header__title__name');
|
||||
public ruleDetailsTrashButton = this.getChild('#delete-rule-btn');
|
||||
public ruleDetailsEditButton = this.getChild('#edit-rule-btn');
|
||||
public ruleDetailsWhenText = this.getChild('[data-automation-id="rule-details-triggers-component"]');
|
||||
public ruleDetailsPerformActionsDiv = this.getChild('adf-card-view-textitem mat-form-field input');
|
||||
public rulesEmptyListTitle = this.getChild('.adf-empty-content__title');
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, ManageRules.rootElement);
|
||||
}
|
||||
|
||||
async checkAspects(aspects: string[]): Promise<void> {
|
||||
for (let i = 0; i < aspects.length; i++) {
|
||||
const aspectsActions = await this.ruleDetailsPerformActionsDiv.nth(i).inputValue();
|
||||
expect(aspects).toContain(aspectsActions);
|
||||
}
|
||||
}
|
||||
|
||||
async checkIfRuleListEmpty(): Promise<boolean> {
|
||||
return await this.rulesEmptyListTitle.isVisible();
|
||||
}
|
||||
|
||||
async checkIfRuleIsOnTheList(ruleName: string): Promise<void> {
|
||||
await expect(this.getGroupsList(ruleName)).toBeVisible({ timeout: 5000 });
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user