[ACS-6575] code fix and split action suite (#3604)

* code split and fix

* code split and fix

* code split and fix

* [ACS-6575]code fix in workflow
This commit is contained in:
Akash Rathod 2024-01-19 13:09:07 +05:30 committed by GitHub
parent c77528c530
commit 608e6c5eb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 134 additions and 10 deletions

View File

@ -149,7 +149,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
e2e-suites: e2e-suites:
- name: "actions" - name: "create-actions"
id: 1 id: 1
- name: "folder-rules" - name: "folder-rules"
id: 2 id: 2
@ -169,6 +169,8 @@ jobs:
id: 9 id: 9
- name: "copy-move-actions" - name: "copy-move-actions"
id: 10 id: 10
- name: "library-actions"
id: 11
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3

View File

@ -10,7 +10,7 @@
], ],
"parserOptions": { "parserOptions": {
"project": [ "project": [
"e2e/playwright/actions/tsconfig.e2e.json" "e2e/playwright/create-actions/tsconfig.e2e.json"
], ],
"createDefaultProgram": true "createDefaultProgram": true
}, },

View File

@ -29,10 +29,10 @@ import EXCLUDED_JSON from './exclude.tests.json';
const config: PlaywrightTestConfig<CustomConfig> = { const config: PlaywrightTestConfig<CustomConfig> = {
...getGlobalConfig, ...getGlobalConfig,
grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Actions'), grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Create Actions'),
projects: [ projects: [
{ {
name: 'Actions', name: 'Create Actions',
testDir: './src/tests', testDir: './src/tests',
use: { use: {
users: ['hruser'] users: ['hruser']

View File

@ -1,13 +1,13 @@
{ {
"name": "actions-e2e", "name": "create-actions-e2e",
"$schema": "../../../node_modules/nx/schemas/project-schema.json", "$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "e2e/playwright/actions/src", "sourceRoot": "e2e/playwright/create-actions",
"projectType": "application", "projectType": "application",
"targets": { "targets": {
"e2e": { "e2e": {
"executor": "nx:run-commands", "executor": "nx:run-commands",
"options": { "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": { "configurations": {
"production": { "production": {

View File

@ -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"
}
}
]
}

View File

@ -0,0 +1 @@
{}

View File

@ -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 <http://www.gnu.org/licenses/>.
*/
import { PlaywrightTestConfig } from '@playwright/test';
import { CustomConfig, getGlobalConfig, getExcludedTestsRegExpArray } from '@alfresco/playwright-shared';
import EXCLUDED_JSON from './exclude.tests.json';
const config: PlaywrightTestConfig<CustomConfig> = {
...getGlobalConfig,
grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Library Actions'),
projects: [
{
name: 'Library Actions',
testDir: './src/tests',
use: {
users: ['hruser']
}
}
]
};
export default config;

View File

@ -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"
}
}
}

View File

@ -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"]
}

View File

@ -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"]
}

View File

@ -111,10 +111,10 @@ test.describe('Special permissions', () => {
test('[C213116] on Shared Files', async ({ sharedPage }) => { test('[C213116] on Shared Files', async ({ sharedPage }) => {
await sharedPage.navigate(); 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 siteApiAdmin.deleteSiteMember(sitePrivate, username);
await sharedPage.reload(); 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 }) => { test('[C290122] on Search Results', async ({ personalFiles, searchPage }) => {
@ -187,7 +187,6 @@ test.describe('Special permissions', () => {
test(`[C213668] on Shared Files`, async ({ sharedPage }) => { test(`[C213668] on Shared Files`, async ({ sharedPage }) => {
await sharedPage.navigate(); await sharedPage.navigate();
expect(await sharedPage.dataTable.getRowsCount(), 'Incorrect number of items').toBe(2);
expect(await sharedPage.dataTable.getItemLocationText(fileName)).toEqual('Unknown'); expect(await sharedPage.dataTable.getItemLocationText(fileName)).toEqual('Unknown');
}); });