Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ACS-9154] Fix unstable tests in ACA after migration to local ACS #4341

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/playwright/edit-actions/exclude.tests.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"XAT-5304": "https://hyland.atlassian.net/browse/ACS-9154"
"XAT-5304": "https://hyland.atlassian.net/browse/ACS-9187"
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ test.describe('Info Drawer - File Folder Properties', () => {
test('[XAT-17240] Remove a tag from a node', async ({ personalFiles }) => {
await fileActionsApi.waitForNodes(Folder17240, { expect: 1 });
await tagsApi.assignTagToNode(Folder17240Id, tagBody);
await expect(async () => {
expect((await tagsApi.listTagsForNode(Folder17240Id)).list.entries.length).toEqual(1);
}).toPass({
intervals: [1_000],
timeout: 10_000
});
await personalFiles.navigate();
await Utils.reloadPageIfRowNotVisible(personalFiles, Folder17240);
await expect(personalFiles.dataTable.getRowByName(Folder17240)).toBeVisible();
Expand Down
25 changes: 23 additions & 2 deletions e2e/playwright/info-drawer/src/tests/library-properties.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,35 @@
import { expect } from '@playwright/test';
import { ApiClientFactory, Utils, test, SitesApi, QueriesApi, SITE_VISIBILITY, SITE_ROLES } from '@alfresco/aca-playwright-shared';

async function expectSiteToBeDefined(siteName: string, queriesApi: QueriesApi) {
await expect(async () => {
expect(await queriesApi.waitForSites(siteName, { expect: 1 })).toEqual(1);
}).toPass({
intervals: [1_000],
timeout: 10_000
});
}

test.describe('Library properties', () => {
let sitesApi: SitesApi;
let queriesApi: QueriesApi;

const username = `user1-${Utils.random()}`;

const site = {
name: `site1-${Utils.random()}`,
id: `site-id-${Utils.random()}`,
visibility: SITE_VISIBILITY.MODERATED,
description: 'my site description'
};

const siteForUpdate = {
name: `site2-${Utils.random()}`,
id: `site-id-${Utils.random()}`,
visibility: SITE_VISIBILITY.MODERATED,
description: 'my initial description'
};

const siteDup = `site3-${Utils.random()}`;

test.beforeAll(async () => {
Expand All @@ -50,6 +63,7 @@ test.describe('Library properties', () => {
await apiClientFactory.createUser({ username });

sitesApi = await SitesApi.initialize(username, username);
queriesApi = await QueriesApi.initialize(username, username);
await sitesApi.createSite(site.name, site.visibility, site.description, site.id);
await sitesApi.createSite(siteForUpdate.name, siteForUpdate.visibility, siteForUpdate.description, siteForUpdate.id);
await sitesApi.createSite(siteDup);
Expand All @@ -68,6 +82,7 @@ test.describe('Library properties', () => {
});

test('[C289336] Info drawer opens for a library', async ({ myLibrariesPage }) => {
await expectSiteToBeDefined(site.name, queriesApi);
await expect(myLibrariesPage.dataTable.getRowByName(site.name)).toBeVisible();
await myLibrariesPage.dataTable.getRowByName(site.name).click();
await myLibrariesPage.acaHeader.viewDetails.click();
Expand All @@ -88,6 +103,7 @@ test.describe('Library properties', () => {
});

test('[C289338] Editable properties', async ({ myLibrariesPage }) => {
await expectSiteToBeDefined(site.name, queriesApi);
await myLibrariesPage.dataTable.getRowByName(site.name).click();
await myLibrariesPage.acaHeader.viewDetails.click();
await expect(myLibrariesPage.libraryDetails.infoDrawerPanel).toBeVisible();
Expand All @@ -110,6 +126,7 @@ test.describe('Library properties', () => {
visibility: SITE_VISIBILITY.PRIVATE,
description: 'new description'
};
await expectSiteToBeDefined(siteForUpdate.name, queriesApi);

await myLibrariesPage.dataTable.getRowByName(siteForUpdate.name).click();
await myLibrariesPage.acaHeader.viewDetails.click();
Expand All @@ -133,6 +150,7 @@ test.describe('Library properties', () => {
});

test('[C289340] Cancel editing a site', async ({ myLibrariesPage }) => {
await expectSiteToBeDefined(site.name, queriesApi);
const newName = `new-name-${Utils.random}`;
const newDesc = `new desc ${Utils.random}`;

Expand All @@ -155,9 +173,8 @@ test.describe('Library properties', () => {
});

test('[C289341] Warning appears when editing the name of the library by entering an existing name', async ({ myLibrariesPage }) => {
const queriesApi = await QueriesApi.initialize(username, username);
await expectSiteToBeDefined(siteDup, queriesApi);

await queriesApi.waitForSites(site.name, { expect: 1 });
await myLibrariesPage.dataTable.getRowByName(siteDup).click();
await myLibrariesPage.acaHeader.viewDetails.click();
await expect(myLibrariesPage.libraryDetails.infoDrawerPanel).toBeVisible();
Expand All @@ -170,6 +187,8 @@ test.describe('Library properties', () => {
});

test('[C289342] Site name too long', async ({ myLibrariesPage }) => {
await expectSiteToBeDefined(site.name, queriesApi);

await myLibrariesPage.dataTable.getRowByName(site.name).click();
await myLibrariesPage.acaHeader.viewDetails.click();
await expect(myLibrariesPage.libraryDetails.infoDrawerPanel).toBeVisible();
Expand All @@ -182,6 +201,8 @@ test.describe('Library properties', () => {
});

test('[C289343] Site description too long', async ({ myLibrariesPage }) => {
await expectSiteToBeDefined(site.name, queriesApi);

await Utils.reloadPageIfRowNotVisible(myLibrariesPage, site.name);
await myLibrariesPage.dataTable.getRowByName(site.name).click();
await myLibrariesPage.acaHeader.viewDetails.click();
Expand Down
3 changes: 1 addition & 2 deletions e2e/playwright/list-views/exclude.tests.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"C261153": "https://alfresco.atlassian.net/browse/AAE-7517",
"C589205": "https://hyland.atlassian.net/browse/ACS-9154"
"C261153": "https://alfresco.atlassian.net/browse/AAE-7517"
}
2 changes: 1 addition & 1 deletion e2e/playwright/search/exclude.tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"C290018": "https://hyland.atlassian.net/browse/ACS-6928",
"C699046-3": "https://hyland.atlassian.net/browse/ACS-7464",
"C699498": "https://hyland.atlassian.net/browse/ACS-7682",
"C277736": "https://hyland.atlassian.net/browse/ACS-9154"
"C277736": "https://hyland.atlassian.net/browse/ACS-9192"
}
3 changes: 1 addition & 2 deletions e2e/playwright/viewer/exclude.tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
"XAT-17181": "https://hyland.atlassian.net/browse/ACS-8865",
"XAT-17182": "https://hyland.atlassian.net/browse/ACS-8865",
"XAT-17184": "https://hyland.atlassian.net/browse/ACS-8865",
"XAT-17185": "https://hyland.atlassian.net/browse/ACS-8865",
"MNT-21058": "https://hyland.atlassian.net/browse/ACS-9154"
"XAT-17185": "https://hyland.atlassian.net/browse/ACS-8865"
}
2 changes: 1 addition & 1 deletion e2e/playwright/viewer/src/tests/viewer-action.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ test.describe('viewer action file', () => {

test('[MNT-21058] Upload new version action when node is locked', async ({ personalFiles }) => {
await personalFiles.dataTable.performClickFolderOrFileToOpen(fileForUploadNewVersion2);
await personalFiles.viewer.waitForViewerToOpen();
await personalFiles.viewer.waitForViewerToOpen('wait for viewer content');

await Utils.uploadFileNewVersion(personalFiles, docxFile);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class ContentNodeSelectorDialog extends BaseComponent {
await row.click();
await expect(this.selectedRow).toBeVisible();
}).toPass({
intervals: [2_000, 2_000, 2_000, 2_000, 2_000, 2_000, 2_000],
intervals: [2_000],
timeout: 20_000
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class LinkRulesDialog extends BaseComponent {
await row.click();
await expect(this.selectFolderButton).toBeEnabled();
}).toPass({
intervals: [2_000, 2_000, 2_000, 2_000, 2_000, 2_000, 2_000],
intervals: [2_000],
timeout: 20_000
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class ManageRules extends BaseComponent {
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],
intervals: [2_000],
timeout: 20_000
});
}
Expand Down
Loading