diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0f6e4200e9..2ec6033e73 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -149,7 +149,7 @@ jobs: fail-fast: false matrix: e2e-suites: - - name: "actions" + - name: "create-actions" id: 1 - name: "folder-rules" id: 2 @@ -169,6 +169,8 @@ jobs: id: 9 - name: "copy-move-actions" id: 10 + - name: "library-actions" + id: 11 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/e2e/playwright/actions/.eslintrc.json b/e2e/playwright/create-actions/.eslintrc.json similarity index 87% rename from e2e/playwright/actions/.eslintrc.json rename to e2e/playwright/create-actions/.eslintrc.json index 67b7dbf295..34217df95d 100644 --- a/e2e/playwright/actions/.eslintrc.json +++ b/e2e/playwright/create-actions/.eslintrc.json @@ -10,7 +10,7 @@ ], "parserOptions": { "project": [ - "e2e/playwright/actions/tsconfig.e2e.json" + "e2e/playwright/create-actions/tsconfig.e2e.json" ], "createDefaultProgram": true }, diff --git a/e2e/playwright/actions/exclude.tests.json b/e2e/playwright/create-actions/exclude.tests.json similarity index 100% rename from e2e/playwright/actions/exclude.tests.json rename to e2e/playwright/create-actions/exclude.tests.json diff --git a/e2e/playwright/actions/playwright.config.ts b/e2e/playwright/create-actions/playwright.config.ts similarity index 93% rename from e2e/playwright/actions/playwright.config.ts rename to e2e/playwright/create-actions/playwright.config.ts index 9b921ce475..29ac95e530 100644 --- a/e2e/playwright/actions/playwright.config.ts +++ b/e2e/playwright/create-actions/playwright.config.ts @@ -29,10 +29,10 @@ import EXCLUDED_JSON from './exclude.tests.json'; const config: PlaywrightTestConfig = { ...getGlobalConfig, - grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Actions'), + grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Create Actions'), projects: [ { - name: 'Actions', + name: 'Create Actions', testDir: './src/tests', use: { users: ['hruser'] diff --git a/e2e/playwright/actions/project.json b/e2e/playwright/create-actions/project.json similarity index 79% rename from e2e/playwright/actions/project.json rename to e2e/playwright/create-actions/project.json index f690086f21..c6d33d477f 100644 --- a/e2e/playwright/actions/project.json +++ b/e2e/playwright/create-actions/project.json @@ -1,13 +1,13 @@ { - "name": "actions-e2e", + "name": "create-actions-e2e", "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "e2e/playwright/actions/src", + "sourceRoot": "e2e/playwright/create-actions", "projectType": "application", "targets": { "e2e": { "executor": "nx:run-commands", "options": { - "commands": ["npx playwright test --config=e2e/playwright/actions/playwright.config.ts"] + "commands": ["npx playwright test --config=e2e/playwright/create-actions/playwright.config.ts"] }, "configurations": { "production": { diff --git a/e2e/playwright/actions/src/tests/create/create-file-from-template.spec.ts b/e2e/playwright/create-actions/src/tests/create-file-from-template.spec.ts similarity index 100% rename from e2e/playwright/actions/src/tests/create/create-file-from-template.spec.ts rename to e2e/playwright/create-actions/src/tests/create-file-from-template.spec.ts diff --git a/e2e/playwright/actions/src/tests/create/create-folder-from-template.spec.ts b/e2e/playwright/create-actions/src/tests/create-folder-from-template.spec.ts similarity index 100% rename from e2e/playwright/actions/src/tests/create/create-folder-from-template.spec.ts rename to e2e/playwright/create-actions/src/tests/create-folder-from-template.spec.ts diff --git a/e2e/playwright/actions/src/tests/create/create-folder.spec.ts b/e2e/playwright/create-actions/src/tests/create-folder.spec.ts similarity index 100% rename from e2e/playwright/actions/src/tests/create/create-folder.spec.ts rename to e2e/playwright/create-actions/src/tests/create-folder.spec.ts diff --git a/e2e/playwright/actions/src/tests/create/create-library.spec.ts b/e2e/playwright/create-actions/src/tests/create-library.spec.ts similarity index 100% rename from e2e/playwright/actions/src/tests/create/create-library.spec.ts rename to e2e/playwright/create-actions/src/tests/create-library.spec.ts diff --git a/e2e/playwright/actions/tsconfig.e2e.adf.json b/e2e/playwright/create-actions/tsconfig.e2e.adf.json similarity index 100% rename from e2e/playwright/actions/tsconfig.e2e.adf.json rename to e2e/playwright/create-actions/tsconfig.e2e.adf.json diff --git a/e2e/playwright/actions/tsconfig.e2e.json b/e2e/playwright/create-actions/tsconfig.e2e.json similarity index 100% rename from e2e/playwright/actions/tsconfig.e2e.json rename to e2e/playwright/create-actions/tsconfig.e2e.json diff --git a/e2e/playwright/library-actions/.eslintrc.json b/e2e/playwright/library-actions/.eslintrc.json new file mode 100644 index 0000000000..fd40996c4b --- /dev/null +++ b/e2e/playwright/library-actions/.eslintrc.json @@ -0,0 +1,26 @@ +{ + "extends": "../../../.eslintrc.json", + "ignorePatterns": [ + "!**/*" + ], + "overrides": [ + { + "files": [ + "*.ts" + ], + "parserOptions": { + "project": [ + "e2e/playwright/library-actions/tsconfig.e2e.json" + ], + "createDefaultProgram": true + }, + "plugins": [ + "rxjs", + "unicorn" + ], + "rules": { + "@typescript-eslint/no-floating-promises": "off" + } + } + ] +} diff --git a/e2e/playwright/library-actions/exclude.tests.json b/e2e/playwright/library-actions/exclude.tests.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/e2e/playwright/library-actions/exclude.tests.json @@ -0,0 +1 @@ +{} diff --git a/e2e/playwright/library-actions/playwright.config.ts b/e2e/playwright/library-actions/playwright.config.ts new file mode 100644 index 0000000000..5dc01cfaa7 --- /dev/null +++ b/e2e/playwright/library-actions/playwright.config.ts @@ -0,0 +1,44 @@ +/*! + * Copyright © 2005-2023 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 . + */ + +import { PlaywrightTestConfig } from '@playwright/test'; +import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/playwright-shared'; +import EXCLUDED_JSON from './exclude.tests.json'; + +const config: PlaywrightTestConfig = { + ...getGlobalConfig, + + grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Library Actions'), + projects: [ + { + name: 'Library Actions', + testDir: './src/tests', + use: { + users: ['hruser'] + } + } + ] +}; + +export default config; diff --git a/e2e/playwright/library-actions/project.json b/e2e/playwright/library-actions/project.json new file mode 100644 index 0000000000..3bb8d3653e --- /dev/null +++ b/e2e/playwright/library-actions/project.json @@ -0,0 +1,22 @@ +{ + "name": "library-actions-e2e", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "e2e/playwright/library-actions/src", + "projectType": "application", + "targets": { + "e2e": { + "executor": "nx:run-commands", + "options": { + "commands": ["npx playwright test --config=e2e/playwright/library-actions/playwright.config.ts"] + }, + "configurations": { + "production": { + "devServerTarget": "content-ce:serve:production" + } + } + }, + "lint": { + "executor": "@angular-eslint/builder:lint" + } + } +} diff --git a/e2e/playwright/actions/src/tests/library/library-actions.spec.ts b/e2e/playwright/library-actions/src/tests/library-actions.spec.ts similarity index 100% rename from e2e/playwright/actions/src/tests/library/library-actions.spec.ts rename to e2e/playwright/library-actions/src/tests/library-actions.spec.ts diff --git a/e2e/playwright/library-actions/tsconfig.e2e.adf.json b/e2e/playwright/library-actions/tsconfig.e2e.adf.json new file mode 100644 index 0000000000..87cbcf775a --- /dev/null +++ b/e2e/playwright/library-actions/tsconfig.e2e.adf.json @@ -0,0 +1,15 @@ +{ + "extends": "../../../tsconfig.adf.json", + "compilerOptions": { + "outDir": "../../out-tsc/e2e", + "baseUrl": "./", + "module": "commonjs", + "target": "es2017", + "types": ["jasmine", "jasminewd2", "node"], + "skipLibCheck": true, + "paths": { + "@alfresco/playwright-shared": ["../../../projects/aca-playwright-shared/src/index.ts"] + } + }, + "exclude": ["node_modules"] +} diff --git a/e2e/playwright/library-actions/tsconfig.e2e.json b/e2e/playwright/library-actions/tsconfig.e2e.json new file mode 100755 index 0000000000..c317985239 --- /dev/null +++ b/e2e/playwright/library-actions/tsconfig.e2e.json @@ -0,0 +1,15 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/e2e", + "baseUrl": "./", + "module": "commonjs", + "target": "es2017", + "types": ["jasmine", "jasminewd2", "node", "@playwright/test"], + "skipLibCheck": true, + "paths": { + "@alfresco/playwright-shared": ["../../../projects/aca-playwright-shared/src/index.ts"] + } + }, + "exclude": ["node_modules"] +} diff --git a/e2e/playwright/list-views/src/tests/permissions.spec.ts b/e2e/playwright/list-views/src/tests/permissions.spec.ts index 5f610bb889..e957f89756 100755 --- a/e2e/playwright/list-views/src/tests/permissions.spec.ts +++ b/e2e/playwright/list-views/src/tests/permissions.spec.ts @@ -111,10 +111,10 @@ test.describe('Special permissions', () => { test('[C213116] on Shared Files', async ({ sharedPage }) => { await sharedPage.navigate(); - expect(await sharedPage.dataTable.getRowsCount(), 'Incorrect number of items').toBe(2); + await expect(sharedPage.dataTable.getRowByName(sitePrivate)).toBeVisible(); await siteApiAdmin.deleteSiteMember(sitePrivate, username); await sharedPage.reload(); - expect(await sharedPage.dataTable.getRowsCount(), 'Incorrect number of items').toBe(0); + await expect(sharedPage.dataTable.getRowByName(sitePrivate)).toHaveCount(0); }); test('[C290122] on Search Results', async ({ personalFiles, searchPage }) => { @@ -187,7 +187,6 @@ test.describe('Special permissions', () => { test(`[C213668] on Shared Files`, async ({ sharedPage }) => { await sharedPage.navigate(); - expect(await sharedPage.dataTable.getRowsCount(), 'Incorrect number of items').toBe(2); expect(await sharedPage.dataTable.getItemLocationText(fileName)).toEqual('Unknown'); });