[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:
Adam Świderski
2024-07-16 13:21:05 +02:00
committed by GitHub
parent 1920dcd929
commit cbbb733551
13 changed files with 435 additions and 138 deletions

View File

@@ -1,3 +1,3 @@
{
"C691642": "https://hyland.atlassian.net/browse/ACS-4894"
"XAT-897": "https://hyland.atlassian.net/browse/ACS-5503"
}

View File

@@ -31,18 +31,18 @@ test.describe('Folder Rules Actions', () => {
let nodesApi: NodesApi;
let trashcanApi: TrashcanApi;
const username = `user-e2e-${Utils.random()}`;
const folderName883 = `folder-XAT-883-${Utils.random()}`;
const folderName883_2 = `folder-XAT-883-2-${Utils.random()}`;
const folderName883_3 = `folder-XAT-883-3-${Utils.random()}`;
const randomFolderName1 = `folder-name-${Utils.random()}`;
const randomFolderName2 = `folder-name-2-${Utils.random()}`;
const randomFolderName3 = `folder-name-3-${Utils.random()}`;
let randomRuleName: string;
const copyFileName = `copy-file-XAT-888-${Utils.random()}`;
const copyFileName = `copy-file-${Utils.random()}`;
const specialChars = '!@£$%^&*()~#/';
const testString = '"!@£$%^&*()_+{}|:""?><,/.\';][=-`~"';
let folderName883Id: string;
let folderName883Id2: string;
let folderName883Id3: string;
let randomFolderName1Id: string;
let randomFolderName2Id: string;
let randomFolderName3Id: string;
test.beforeAll(async () => {
try {
@@ -54,10 +54,10 @@ test.describe('Folder Rules Actions', () => {
console.error(`beforeAll failed : ${error}`);
}
folderName883Id = (await nodesApi.createFolder(folderName883)).entry.id;
folderName883Id2 = (await nodesApi.createFolder(folderName883_2)).entry.id;
folderName883Id3 = (await nodesApi.createFolder(folderName883_3, folderName883Id)).entry.id;
await nodesApi.createFile(copyFileName, folderName883Id);
randomFolderName1Id = (await nodesApi.createFolder(randomFolderName1)).entry.id;
randomFolderName2Id = (await nodesApi.createFolder(randomFolderName2)).entry.id;
randomFolderName3Id = (await nodesApi.createFolder(randomFolderName3, randomFolderName1Id)).entry.id;
await nodesApi.createFile(copyFileName, randomFolderName1Id);
});
test.beforeEach(async ({ loginPage }) => {
@@ -70,7 +70,7 @@ test.describe('Folder Rules Actions', () => {
});
test('[XAT-883] Create a rule with symbols in its name and description', async ({ personalFiles, nodesPage }) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(testString);
await nodesPage.manageRulesDialog.ruleDescriptionInputLocator.fill(testString);
@@ -82,37 +82,37 @@ test.describe('Folder Rules Actions', () => {
});
test('[XAT-884] Create a rule and link it to an existing folder', async ({ personalFiles, nodesPage }) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.actionsDropdown.selectAction(ActionType.IncrementCounter, 0);
await nodesPage.manageRulesDialog.createRuleButton.click();
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id2}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName2Id}/rules` });
await nodesPage.toolbar.clickLinkRulesButton();
await nodesPage.linkRulesDialog.waitForLinkRules();
await nodesPage.linkRulesDialog.getFolderIcon.click();
await nodesPage.linkRulesDialog.getOptionLocator(username).click();
await nodesPage.linkRulesDialog.selectDestination(folderName883);
await nodesPage.linkRulesDialog.selectDestination(randomFolderName1);
await nodesPage.linkRulesDialog.selectFolderButton.click();
await nodesPage.manageRules.checkIfRuleIsOnTheList(randomRuleName);
});
test('[XAT-885] Create a rule in a folder and inherit it in a subfolder (Rule applies to subfolders)', async ({ personalFiles, nodesPage }) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.actionsDropdown.selectAction(ActionType.IncrementCounter, 0);
await nodesPage.manageRulesDialog.ruleSubfoldersCheckbox.click();
await nodesPage.manageRulesDialog.createRuleButton.click();
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id3}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName3Id}/rules` });
await nodesPage.manageRules.checkIfRuleIsOnTheList(randomRuleName);
});
test('[XAT-886] Create a rule and press cancel', async ({ personalFiles, nodesPage }) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await expect(nodesPage.manageRulesDialog.createRuleButton).toBeDisabled();
await nodesPage.manageRulesDialog.cancelRuleButton.click();
@@ -120,7 +120,7 @@ test.describe('Folder Rules Actions', () => {
});
test('[XAT-887] Create a disabled rule', async ({ personalFiles, nodesPage }) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.actionsDropdown.selectAction(ActionType.IncrementCounter, 0);
@@ -135,7 +135,7 @@ test.describe('Folder Rules Actions', () => {
const autoDeclareOptionsValue = 'For all major and minor versions [ALL]';
const simpleWorkFlow = 'accept reject';
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
@@ -156,7 +156,7 @@ test.describe('Folder Rules Actions', () => {
});
test('[XAT-889] Create a rule which runs when items are deleted or leave a folder', async ({ nodesPage, personalFiles }) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.manageRulesDialog.whenCreatedCheckbox.click();
@@ -165,23 +165,23 @@ test.describe('Folder Rules Actions', () => {
await nodesPage.manageRulesDialog.destinationFolderButton.click();
await nodesPage.contentNodeSelectorDialog.getFolderIcon.click();
await nodesPage.contentNodeSelectorDialog.getOptionLocator(username).click();
await nodesPage.contentNodeSelectorDialog.selectDestination(folderName883_2);
await nodesPage.contentNodeSelectorDialog.selectDestination(randomFolderName2);
await nodesPage.contentNodeSelectorDialog.actionButton.click();
await nodesPage.manageRulesDialog.createRuleButton.click();
await nodesPage.manageRules.checkIfRuleIsOnTheList(randomRuleName);
await personalFiles.navigate({ remoteUrl: `#/personal-files/${folderName883Id}` });
await personalFiles.navigate({ remoteUrl: `#/personal-files/${randomFolderName1Id}` });
await personalFiles.dataTable.selectItem(copyFileName);
await personalFiles.acaHeader.clickMoreActions();
await personalFiles.acaHeader.matMenu.clickMenuItem('Delete');
await personalFiles.snackBar.message.waitFor({ state: 'visible' });
await personalFiles.navigate({ remoteUrl: `#/personal-files/${folderName883Id2}` });
await personalFiles.navigate({ remoteUrl: `#/personal-files/${randomFolderName2Id}` });
await expect(personalFiles.dataTable.getRowByName(copyFileName)).toBeVisible();
});
test('[XAT-890] Create a rule which adds multiple aspects when its ran', async ({ nodesPage, personalFiles }) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0);
@@ -200,7 +200,7 @@ test.describe('Folder Rules Actions', () => {
});
test('[XAT-891] Prevent rule creation after clicking on cancel during selecting destination folder', async ({ nodesPage, personalFiles }) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0);
@@ -213,7 +213,7 @@ test.describe('Folder Rules Actions', () => {
});
test('[XAT-892] Prevent rule creation when missing any required field for action', async ({ nodesPage, personalFiles }) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0);
@@ -224,7 +224,7 @@ test.describe('Folder Rules Actions', () => {
});
test('[XAT-893] Removing values from required fields should restore disabled state for Create button', async ({ nodesPage, personalFiles }) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0);
@@ -235,7 +235,7 @@ test.describe('Folder Rules Actions', () => {
});
test('[XAT-894] Create rule with filled required fields and empty optional fields', async ({ nodesPage, personalFiles }) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 0);
@@ -249,7 +249,7 @@ test.describe('Folder Rules Actions', () => {
personalFiles,
nodesPage
}) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.conditionsDropdown.addCondition(Field.Size, specialChars, 0, Comparator.Equals);
@@ -264,7 +264,7 @@ test.describe('Folder Rules Actions', () => {
});
test('[XAT-896] Create a rule with multiple groups utilising all available comparators and conditions', async ({ personalFiles, nodesPage }) => {
await personalFiles.navigate({ remoteUrl: `#/nodes/${folderName883Id}/rules` });
await personalFiles.navigate({ remoteUrl: `#/nodes/${randomFolderName1Id}/rules` });
await nodesPage.toolbar.clickCreateRuleButton();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill(randomRuleName);
await nodesPage.conditionsDropdown.addConditionGroup(Field.Size, specialChars, 0, Comparator.Equals);

View File

@@ -1,56 +0,0 @@
/*!
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Alfresco Example Content Application
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { ApiClientFactory, getUserState, test, Utils } from '@alfresco/playwright-shared';
import { expect } from '@playwright/test';
test.use({ storageState: getUserState('hruser') });
test.describe('Rules - Manage Rules', () => {
const apiClientFactory = new ApiClientFactory();
const randomName = `folder-rules-manage-rules-${Utils.random()}`;
const randomRuleName = `playwright-rule-${Utils.random()}`;
let folderId: string;
test.beforeAll(async () => {
await apiClientFactory.setUpAcaBackend('hruser');
const node = await apiClientFactory.nodes.createNode('-my-', { name: randomName, nodeType: 'cm:folder' });
folderId = node.entry.id;
await apiClientFactory.createRandomRule(folderId, randomRuleName);
});
test.beforeEach(async ({ personalFiles }) => {
await personalFiles.navigate();
});
test.afterAll(async () => {
await apiClientFactory.nodes.deleteNode(folderId, { permanent: true });
});
test('[C691642] Create a rule and disable it', async ({ personalFiles, nodesPage }) => {
await personalFiles.dataTable.performActionFromExpandableMenu(randomName, 'Manage rules');
await nodesPage.manageRules.ruleToggle.click();
await expect(nodesPage.manageRules.ruleToggleFalse).toBeVisible();
});
});

View File

@@ -0,0 +1,159 @@
/*!
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Alfresco Example Content Application
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { ApiClientFactory, test, Utils, NodesApi, TrashcanApi, ActionType, RulesApi, Field, Comparator } from '@alfresco/playwright-shared';
import { expect } from '@playwright/test';
test.use({ launchOptions: { slowMo: 300 } });
test.describe('Rules - Manage Rules', () => {
const apiClientFactory = new ApiClientFactory();
let nodesApi: NodesApi;
let trashcanApi: TrashcanApi;
let rulesApi: RulesApi;
const username = `user-e2e-${Utils.random()}`;
const folderName897_1 = `folder-XAT-897-1-${Utils.random()}`;
const folderName897_2 = `folder-XAT-897-2-${Utils.random()}`;
const randomFolderName1 = `folder-name-${Utils.random()}`;
const randomRuleName897 = `playwright-rule-897-${Utils.random()}`;
const randomRuleName898 = `playwright-rule-898-${Utils.random()}`;
const randomRuleName899 = `playwright-rule-899-${Utils.random()}`;
const randomRuleName900 = `playwright-rule-900-${Utils.random()}`;
const randomRuleName901 = `playwright-rule-901-${Utils.random()}`;
const randomRuleName902 = `playwright-rule-902-${Utils.random()}`;
const randomRuleName903 = `playwright-rule-903-${Utils.random()}`;
let folderName897Id1: string;
let folderName897Id2: string;
let randomFolderId: string;
test.beforeAll(async () => {
try {
await apiClientFactory.setUpAcaBackend('admin');
await apiClientFactory.createUser({ username });
nodesApi = await NodesApi.initialize(username, username);
trashcanApi = await TrashcanApi.initialize(username, username);
rulesApi = await RulesApi.initialize(username, username);
} catch (error) {
console.error(`beforeAll failed : ${error}`);
}
await apiClientFactory.setUpAcaBackend(username, username);
folderName897Id1 = (await nodesApi.createFolder(folderName897_1)).entry.id;
folderName897Id2 = (await nodesApi.createFolder(folderName897_2)).entry.id;
randomFolderId = (await nodesApi.createFolder(randomFolderName1)).entry.id;
await rulesApi.createRuleWithDestinationFolder(folderName897Id1, randomRuleName897, 'move', folderName897Id2);
await rulesApi.createRandomRule(randomFolderId, randomRuleName898);
await rulesApi.createRandomRuleWithMultipleActions(randomFolderId, randomRuleName899, 3);
await rulesApi.createRuleWithRandomAspects(randomFolderId, randomRuleName900);
await rulesApi.createRandomRuleWithMultipleActions(randomFolderId, randomRuleName901, 3);
await rulesApi.createRandomRule(randomFolderId, randomRuleName902);
await rulesApi.createRandomRuleWithMultipleConditions(randomFolderId, randomRuleName903, 3);
await nodesApi.deleteNodeById(folderName897Id2);
});
test.beforeEach(async ({ personalFiles, loginPage }) => {
await Utils.tryLoginUser(loginPage, username, username, 'beforeEach failed');
await personalFiles.navigate();
});
test.afterAll(async () => {
await Utils.deleteNodesSitesEmptyTrashcan(nodesApi, trashcanApi, 'afterAll failed');
});
test('[XAT-897] Update a rule which has an error in its action', async ({ personalFiles, nodesPage }) => {
await personalFiles.dataTable.performActionFromExpandableMenu(folderName897_1, 'Manage rules');
await nodesPage.manageRules.turnOffRuleToggle();
await nodesPage.manageRules.ruleDetailsEditButton.click();
await expect(nodesPage.manageRulesDialog.ruleDisableCheckbox).toBeChecked();
});
test('[XAT-898] Cancel updating rule dialog', async ({ personalFiles, nodesPage }) => {
await personalFiles.dataTable.performActionFromExpandableMenu(randomFolderName1, 'Manage rules');
await nodesPage.manageRules.ruleDetailsEditButton.click();
await nodesPage.manageRulesDialog.ruleNameInputLocator.fill('new name');
await nodesPage.manageRulesDialog.cancelRuleButton.click();
await expect(nodesPage.manageRules.getGroupsList(randomRuleName898)).toBeVisible();
});
test('[XAT-899] Update rule by removing existing actions', async ({ personalFiles, nodesPage }) => {
await personalFiles.dataTable.performActionFromExpandableMenu(randomFolderName1, 'Manage rules');
await nodesPage.manageRules.getGroupsList(randomRuleName899).click();
await nodesPage.manageRules.ruleDetailsEditButton.click();
await nodesPage.manageRulesDialog.deleteActions(2);
await nodesPage.actionsDropdown.selectAction(ActionType.IncrementCounter, 1);
await nodesPage.manageRulesDialog.createRuleButton.click();
await nodesPage.manageRulesDialog.createRuleButton.waitFor({ state: 'hidden' });
await nodesPage.manageRules.getGroupsList(randomRuleName899).click();
expect(await nodesPage.manageRules.ruleActions.count()).toEqual(2);
});
test('[XAT-900] Update a rule by removing existing aspects', async ({ personalFiles, nodesPage }) => {
await personalFiles.dataTable.performActionFromExpandableMenu(randomFolderName1, 'Manage rules');
await nodesPage.manageRules.getGroupsList(randomRuleName900).click();
await nodesPage.manageRules.ruleDetailsEditButton.click();
await nodesPage.manageRulesDialog.deleteActions(2);
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 1);
await nodesPage.actionsDropdown.insertAddAspectActionValues('History', 1);
await nodesPage.manageRulesDialog.createRuleButton.click();
await nodesPage.manageRulesDialog.createRuleButton.waitFor({ state: 'hidden' });
await nodesPage.manageRules.getGroupsList(randomRuleName900).click();
expect(await nodesPage.manageRules.ruleActions.count()).toEqual(2);
});
test('[XAT-901] Prevent rule updating after clicking on cancel during selecting destination folder', async ({ personalFiles, nodesPage }) => {
await personalFiles.dataTable.performActionFromExpandableMenu(randomFolderName1, 'Manage rules');
await nodesPage.manageRules.getGroupsList(randomRuleName901).click();
await nodesPage.manageRules.ruleDetailsEditButton.click();
await nodesPage.manageRulesDialog.deleteActions(2);
await nodesPage.actionsDropdown.selectAction(ActionType.Copy, 1);
await nodesPage.manageRulesDialog.destinationFolderButton.click();
await nodesPage.contentNodeSelectorDialog.cancelButton.click();
await nodesPage.contentNodeSelectorDialog.cancelButton.waitFor({ state: 'hidden' });
await expect(nodesPage.manageRulesDialog.createRuleButton).toBeDisabled();
});
test('[XAT-902] Prevent rule updating when required fields are empty', async ({ personalFiles, nodesPage }) => {
await personalFiles.dataTable.performActionFromExpandableMenu(randomFolderName1, 'Manage rules');
await nodesPage.manageRules.getGroupsList(randomRuleName902).click();
await nodesPage.manageRules.ruleDetailsEditButton.click();
await nodesPage.actionsDropdown.selectAction(ActionType.AddAspect, 1);
await expect(nodesPage.manageRulesDialog.createRuleButton).toBeDisabled();
});
test('[XAT-903] [XAT-904] Edit existing conditions', async ({ personalFiles, nodesPage }) => {
await personalFiles.dataTable.performActionFromExpandableMenu(randomFolderName1, 'Manage rules');
await nodesPage.manageRules.getGroupsList(randomRuleName903).click();
await nodesPage.manageRules.ruleDetailsEditButton.click();
await nodesPage.manageRulesDialog.deleteConditions(2);
await nodesPage.conditionsDropdown.addCondition(Field.Size, 'XAT-903', 1, Comparator.Equals);
await nodesPage.manageRulesDialog.createRuleButton.click();
await nodesPage.manageRulesDialog.createRuleButton.waitFor({ state: 'hidden' });
await nodesPage.manageRules.getGroupsList(randomRuleName903).click();
expect(await nodesPage.manageRules.countConditionsInGroup()).toEqual(2);
});
});

View File

@@ -117,8 +117,7 @@ test.describe('viewer action file', () => {
test('[C213237] Tooltip appears on hover on a step in breadcrumb', async ({ personalFiles }) => {
await personalFiles.navigate({ remoteUrl: `#/personal-files/${subFolder2Id}` });
const item = personalFiles.breadcrumb.items.nth(2);
const title = await item.getAttribute('title');
expect(title).toEqual(subFolder1);
await expect(item).toHaveAttribute('title', subFolder1);
});
test('[C213238] Breadcrumb updates correctly when folder is renamed', async ({ personalFiles, nodesApiAction }) => {

View File

@@ -85,7 +85,7 @@ test.describe('Search - Filters - General', () => {
});
test('[C704283] Facets filters can be cleared', async ({ searchPage }) => {
const filterTextBefore = searchPage.searchFilters.propertiesFilter;
const filterTextBefore = await searchPage.searchFilters.propertiesFilter.textContent();
await searchPage.searchFilters.propertiesFilter.click();
await searchPage.searchFiltersProperties.fileSizeInput.fill('1000');
await searchPage.searchFilters.menuCardApply.click();
@@ -97,12 +97,12 @@ test.describe('Search - Filters - General', () => {
await searchPage.searchFiltersProperties.fileSizeInput.waitFor({ state: 'hidden' });
const filterTextCleared = await searchPage.searchFilters.propertiesFilter.textContent();
await expect(filterTextBefore).toHaveText(filterTextCleared);
expect(filterTextBefore).toEqual(filterTextCleared);
expect(filterTextAfter).not.toEqual(filterTextCleared);
});
test('[C699499] All filters can be reset with reset button', async ({ searchPage }) => {
const propertiesFilterTextBefore = searchPage.searchFilters.propertiesFilter;
const propertiesFilterTextBefore = await searchPage.searchFilters.propertiesFilter.textContent();
await searchPage.searchFilters.propertiesFilter.click();
await searchPage.searchFiltersProperties.fileSizeInput.fill('1000');
await searchPage.searchFilters.menuCardApply.click();
@@ -120,9 +120,9 @@ test.describe('Search - Filters - General', () => {
const propertiesFilterTextCleared = await searchPage.searchFilters.propertiesFilter.textContent();
const logicFilterTextCleared = await searchPage.searchFilters.logicFilter.textContent();
await expect(propertiesFilterTextBefore).toHaveText(propertiesFilterTextCleared);
expect(logicFilterTextBefore).toEqual(logicFilterTextCleared);
expect(propertiesFilterTextCleared).not.toEqual(propertiesFilterTextAfter);
expect(logicFilterTextCleared).not.toEqual(logicFilterTextAfter);
await expect(propertiesFilterTextBefore).toEqual(propertiesFilterTextCleared);
await expect(logicFilterTextBefore).toEqual(logicFilterTextCleared);
await expect(propertiesFilterTextCleared).not.toEqual(propertiesFilterTextAfter);
await expect(logicFilterTextCleared).not.toEqual(logicFilterTextAfter);
});
});