mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACS-4894] [E2E] Added new e2e for update folder rules (#3929)
* [ACS-4892] [E2E] Created new tests for adding folder rules * [ACS-4892] deleted the unused if enum * [ACS-4894] Added update folder rules tests * [ACS-4894] sonar fix 1 * [ACS-4894] sonar fix 2 * [ACS-4894] sonar fix 3 * [ACS-4894] review fixes 1 * [ACS-4894] review fixes 2 * [ACS-4894] review fixes 3 * [ACS-4894] comments deleted * [ACS-4894] eslint fix
This commit is contained in:
@@ -44,8 +44,24 @@ export class ManageRulesDialogComponent extends BaseComponent {
|
||||
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"]');
|
||||
public actionsEllipsisButtons = this.getChild('[data-automation-id="rule-action-list-action-menu"]');
|
||||
public actionsEllipsisDelete = this.page.locator('[data-automation-id="rule-action-list-remove-action-button"]');
|
||||
public conditionsEllipsisButtons = this.getChild('[data-automation-id="condition-actions-button"]');
|
||||
public conditionsEllipsisDelete = this.page.locator('button[title="Remove"]');
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, ManageRulesDialogComponent.rootElement);
|
||||
}
|
||||
|
||||
async deleteActions(noActions: number): Promise<void> {
|
||||
for(let i = 0; i < noActions; i++) {
|
||||
await this.actionsEllipsisButtons.first().click();
|
||||
await this.actionsEllipsisDelete.click();
|
||||
}}
|
||||
|
||||
async deleteConditions(noConditions: number): Promise<void> {
|
||||
for(let i = 0; i < noConditions; i++) {
|
||||
await this.conditionsEllipsisButtons.first().click();
|
||||
await this.conditionsEllipsisDelete.click();
|
||||
}}
|
||||
}
|
||||
|
@@ -37,6 +37,8 @@ export class ManageRules extends BaseComponent {
|
||||
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');
|
||||
public ruleActions = this.getChild('aca-rule-action');
|
||||
public ruleConditionsInGroup = this.getChild('aca-rule-composite-condition aca-rule-simple-condition');
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, ManageRules.rootElement);
|
||||
@@ -56,4 +58,19 @@ export class ManageRules extends BaseComponent {
|
||||
async checkIfRuleIsOnTheList(ruleName: string): Promise<void> {
|
||||
await expect(this.getGroupsList(ruleName)).toBeVisible({ timeout: 5000 });
|
||||
}
|
||||
|
||||
async countConditionsInGroup(): Promise<number> {
|
||||
return await this.ruleConditionsInGroup.count();
|
||||
}
|
||||
|
||||
async turnOffRuleToggle(): Promise<void> {
|
||||
await expect(async () => {
|
||||
await this.ruleToggle.hover({ timeout: 1000 });
|
||||
await this.ruleToggle.click();
|
||||
await expect(this.ruleToggleFalse).toBeVisible();
|
||||
}).toPass({
|
||||
intervals: [2_000, 2_000, 2_000, 2_000, 2_000, 2_000, 2_000],
|
||||
timeout: 20_000
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user