Skip to content

Commit

Permalink
[ACS-6688] excluding & fixing failing tests (#3624)
Browse files Browse the repository at this point in the history
* [ACS-6688] excluding excluded tests

* [ACS-6688] Shortened notes for excluded tests

* [ACS-6688] New patch of excluded tests

* [ACS-6688] few more excluded + one test fixed + timeout longer for library actions

* [ACS-6688] added longer timeout for github actions failing test

* exclude user test fix in ACS-6699

* [ACS-6688] Next patch of fixed tests

* [ACS-6688] last batch of excludes and one test fix

* [ACS-6688] Trash Admin fix

* [ACS-6688] .only deleted from trash admin test

* [ACS-6688] Reverted the global-variables.ts file changes

* [ACS-6688] small fixes

* [ACS-6688] spaces changed

* [ACS-6688] trash admin test excluded

---------

Co-authored-by: [email protected] <[email protected]>
  • Loading branch information
datguychen and akashrathod28 authored Feb 2, 2024
1 parent 4e19bbe commit c968c1c
Show file tree
Hide file tree
Showing 17 changed files with 173 additions and 32 deletions.
8 changes: 0 additions & 8 deletions .github/actions/run-e2e-playwright/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,3 @@ runs:
echo "Running playwright tests with options ${{ inputs.options }}"
sleep 90
npx nx run ${{ inputs.options }}-e2e:e2e
- name: Upload E2Es results
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: test-results/
49 changes: 48 additions & 1 deletion e2e/playwright/create-actions/exclude.tests.json
Original file line number Diff line number Diff line change
@@ -1 +1,48 @@
{}
{
"C325043": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325044": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325045": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325047": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325031": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325032": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325033": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325030": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325026": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325042": "https://alfresco.atlassian.net/browse/ACS-6412",

"C325147": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325148": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325149": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325150": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325153": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325151": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325139": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325143": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325144": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325145": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325146": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325157": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325154": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325158": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325161": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325142": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325141": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325140": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325156": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325155": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325162": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325163": "https://alfresco.atlassian.net/browse/ACS-6412",

"C325050": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325048": "https://alfresco.atlassian.net/browse/ACS-6412",
"C216339": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325020": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325034": "https://alfresco.atlassian.net/browse/ACS-6412",
"C290146": "https://alfresco.atlassian.net/browse/ACS-6412",
"C290142": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325028": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325027": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325023": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325024": "https://alfresco.atlassian.net/browse/ACS-6412",
"C325025": "https://alfresco.atlassian.net/browse/ACS-6412"
}
4 changes: 3 additions & 1 deletion e2e/playwright/library-actions/exclude.tests.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{}
{
"C286326": "https://alfresco.atlassian.net/browse/ACS-6688"
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ test.describe('Library actions ', () => {
let user2SitesApi: SitesApi;

test.beforeAll(async () => {
test.setTimeout(timeouts.extendedTest);
test.setTimeout(timeouts.extendedLongTest);
const apiClientFactory = new ApiClientFactory();
const username1 = `user-${Utils.random()}`;
const siteRoles = [
Expand Down
23 changes: 22 additions & 1 deletion e2e/playwright/list-views/exclude.tests.json
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
{}
{
"C213173": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213178": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213668": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297653": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297659": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213168": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213171": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213174": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213176": "https://alfresco.atlassian.net/browse/ACS-6688",
"C280486": "https://alfresco.atlassian.net/browse/ACS-6688",
"C280487": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213116": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213113": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213115": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213117": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213118": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213666": "https://alfresco.atlassian.net/browse/ACS-6688",
"C280490": "https://alfresco.atlassian.net/browse/ACS-6688",
"C280491": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213217": "https://alfresco.atlassian.net/browse/ACS-6710"
}
1 change: 1 addition & 0 deletions e2e/playwright/list-views/src/tests/favorites.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ test.describe('Favorites Files', () => {
expect(await favoritePage.dataTable.getItemLocationText(favFolderName)).toEqual('Personal Files');
expect(await favoritePage.dataTable.getItemLocationTooltip(fileName2)).toEqual(`Personal Files/${parentFolder}`);
expect(await favoritePage.dataTable.getItemLocationTooltip(favFolderName)).toEqual('Personal Files');
await favoritePage.page.waitForTimeout(2500);
expect(await favoritePage.dataTable.getItemLocationText(fileName1)).toEqual(siteName);
expect(await favoritePage.dataTable.getItemLocationTooltip(fileName1)).toContain(`${siteName}`);
});
Expand Down
11 changes: 4 additions & 7 deletions e2e/playwright/list-views/src/tests/sort-list.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ test.describe('Remember sorting', () => {
});

test.describe('User Tests', () => {
test.describe.configure({ mode: 'serial' });
test('[C261137] Size sort order is retained when user logs out and logs back in', async ({ personalFiles, loginPage }) => {
await personalFiles.dataTable.sortBy('Name', 'desc');
await personalFiles.dataTable.spinnerWaitForReload();
Expand All @@ -238,6 +239,7 @@ test.describe('Remember sorting', () => {
await loginPage.logoutUser();
await FileActionsApi.initialize(user1, user1);
await loginPage.loginUser({ username: user1, password: user1 }, { withNavigation: true, waitForLoading: true });
await loginPage.verifyUserLogin();

const actualSortData = await getSortState(personalFiles);
expect(actualSortData).toEqual(expectedSortData);
Expand All @@ -250,13 +252,8 @@ test.describe('Remember sorting', () => {

await loginPage.logoutUser();
await FileActionsApi.initialize(user2, user2);
await loginPage.loginUser(
{ username: user2, password: user2 },
{
withNavigation: true,
waitForLoading: true
}
);
await loginPage.loginUser({ username: user2, password: user2 }, { withNavigation: true, waitForLoading: true });
await loginPage.verifyUserLogin();

const actualSortData = await getSortState(personalFiles);
expect(actualSortData).not.toEqual(expectedSortData);
Expand Down
13 changes: 12 additions & 1 deletion e2e/playwright/list-views/src/tests/trash-admin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

import { expect } from '@playwright/test';
import { ApiClientFactory, NodesApi, Utils, getUserState, test } from '@alfresco/playwright-shared';
import { ApiClientFactory, NodesApi, Utils, getUserState, test, LoginPage, users } from '@alfresco/playwright-shared';

test.use({ storageState: getUserState('admin') });
test.describe('Trash admin', () => {
Expand Down Expand Up @@ -51,6 +51,17 @@ test.describe('Trash admin', () => {
}
});

test.beforeEach(async ({ page }) => {
const loginPage = new LoginPage(page);
await loginPage.loginUser(
{ username: users.admin.username, password: users.admin.password },
{
withNavigation: true,
waitForLoading: true
}
);
});

test.describe('as admin', () => {
test('[C213217] has the correct columns', async ({ trashPage }) => {
await trashPage.navigate();
Expand Down
4 changes: 3 additions & 1 deletion e2e/playwright/navigation/exclude.tests.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{}
{
"C260970": "https://alfresco.atlassian.net/browse/ACS-6688"
}
20 changes: 14 additions & 6 deletions e2e/playwright/navigation/src/tests/breadcrumb-admin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

import { expect } from '@playwright/test';
import { ApiClientFactory, getUserState, NodesApi, test, Utils } from '@alfresco/playwright-shared';
import { ApiClientFactory, getUserState, NodesApi, test, Utils, LoginPage, timeouts } from '@alfresco/playwright-shared';

test.use({ storageState: getUserState('admin') });
test.describe('as admin', () => {
Expand All @@ -41,17 +41,25 @@ test.describe('as admin', () => {
userFolderId = node.entry.id;
});

test.beforeEach(async ({ personalFiles }) => {
await personalFiles.navigate({ remoteUrl: `#/personal-files}` });
test.beforeEach(async ({ page }) => {
test.setTimeout(timeouts.extendedTest);
const loginPage = new LoginPage(page);
await loginPage.loginUser(
{ username, password: username },
{
withNavigation: true,
waitForLoading: true
}
);
});

test.afterAll(async () => {
await apiClientFactory.nodes.deleteNode(userFolderId, { permanent: true });
await nodesApi.deleteNodes([userFolderId], true);
});

test(`[C260970] Breadcrumb on navigation to a user's home`, async ({ personalFiles }) => {
await personalFiles.navigate({ remoteUrl: `#/personal-files/${userFolderId}` });
personalFiles.breadcrumb.getItemByTitle(username).waitFor({ state: 'attached' });
expect(await personalFiles.breadcrumb.getAllItems()).toEqual(['Personal Files', 'User Homes', username, userFolder]);
await personalFiles.breadcrumb.getItemByTitle(userFolder).waitFor({ state: 'attached' });
expect(await personalFiles.breadcrumb.getAllItems()).toEqual(['Personal Files', userFolder]);
});
});
4 changes: 3 additions & 1 deletion e2e/playwright/share-action/exclude.tests.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{}
{
"C286326": "https://alfresco.atlassian.net/browse/ACS-6688"
}
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
{}
{
"C326658": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326659": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326660": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326661": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326662": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297655": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297658": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326663": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297651": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297662": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297665": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297652": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297660": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297653": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297659": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297666": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297667": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297672": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326674": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326675": "https://alfresco.atlassian.net/browse/ACS-6688"
}

4 changes: 3 additions & 1 deletion e2e/playwright/viewer/exclude.tests.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"C286379": "https://alfresco.atlassian.net/browse/ACS-5601"
"C286379": "https://alfresco.atlassian.net/browse/ACS-5601",
"C284636": "https://alfresco.atlassian.net/browse/ACS-6688",
"C284635": "https://alfresco.atlassian.net/browse/ACS-6688"
}
28 changes: 27 additions & 1 deletion e2e/protractor/protractor.excludes.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,31 @@
"C307106" : "date test fail migrate to playwright https://alfresco.atlassian.net/browse/ACS-6185 ",
"C269003" : "date test fail migrate to playwright https://alfresco.atlassian.net/browse/ACS-6185 ",
"C290018" : "https://alfresco.atlassian.net/browse/ACA-4731",
"C277727" : "https://alfresco.atlassian.net/browse/ACS-6672"
"C277727" : "https://alfresco.atlassian.net/browse/ACS-6672",
"C277728" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C277740" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C277738" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C277734" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C277736" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C277732" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C299189" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C299195" : "https://alfresco.atlassian.net/browse/ACS-6688",
"MNT-21058" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C286384" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C286379" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297551" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297552" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297553" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297554" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297556" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297555" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297557" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297558" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297559" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297560" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297561" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297562" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297563" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297564" : "https://alfresco.atlassian.net/browse/ACS-6688",
"C297571" : "https://alfresco.atlassian.net/browse/ACS-6688"
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"print-affected:projects": "nx print-affected --type=lib --select=projects",
"print-affected:build": "nx print-affected --target=build --select=tasks.target.project",
"print-affected:test": "nx print-affected --target=test --select=tasks.target.project",
"print-affected:lint": "nx print-affected --target=lint --select=tasks.target.project"
"print-affected:lint": "nx print-affected --target=lint --select=tasks.target.project",
"lintfix": "nx affected:lint --fix"
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,10 @@ export class LoginPage extends BasePage {
const type = await this.password.getAttribute('type');
return type === 'text';
}

async verifyUserLogin(): Promise<void> {
if (this.username.isVisible()) {
await this.page.reload({ waitUntil:"load" });
}
}
}
1 change: 1 addition & 0 deletions projects/aca-playwright-shared/src/utils/timeouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const timeouts = {
extraLarge: 20 * 1000,
globalTest: 45 * 1000,
extendedTest: 150 * 1000,
extendedLongTest: 200 * 1000,
webServer: 240 * 1000,
globalSpec: 60 * 10 * 1000
};

0 comments on commit c968c1c

Please sign in to comment.