Skip to content

Commit

Permalink
[ACS-6575] code fix and split action suite (#3604)
Browse files Browse the repository at this point in the history
* code split and fix

* code split and fix

* code split and fix

* [ACS-6575]code fix in workflow
  • Loading branch information
akashrathod28 authored Jan 19, 2024
1 parent c77528c commit 608e6c5
Show file tree
Hide file tree
Showing 19 changed files with 134 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
fail-fast: false
matrix:
e2e-suites:
- name: "actions"
- name: "create-actions"
id: 1
- name: "folder-rules"
id: 2
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
"parserOptions": {
"project": [
"e2e/playwright/actions/tsconfig.e2e.json"
"e2e/playwright/create-actions/tsconfig.e2e.json"
],
"createDefaultProgram": true
},
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import EXCLUDED_JSON from './exclude.tests.json';
const config: PlaywrightTestConfig<CustomConfig> = {
...getGlobalConfig,

grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Actions'),
grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'Create Actions'),
projects: [
{
name: 'Actions',
name: 'Create Actions',
testDir: './src/tests',
use: {
users: ['hruser']
Expand Down
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
File renamed without changes.
26 changes: 26 additions & 0 deletions e2e/playwright/library-actions/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}
1 change: 1 addition & 0 deletions e2e/playwright/library-actions/exclude.tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
44 changes: 44 additions & 0 deletions e2e/playwright/library-actions/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -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;
22 changes: 22 additions & 0 deletions e2e/playwright/library-actions/project.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
15 changes: 15 additions & 0 deletions e2e/playwright/library-actions/tsconfig.e2e.adf.json
Original file line number Diff line number Diff line change
@@ -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"]
}
15 changes: 15 additions & 0 deletions e2e/playwright/library-actions/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -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"]
}
5 changes: 2 additions & 3 deletions e2e/playwright/list-views/src/tests/permissions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down Expand Up @@ -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');
});

Expand Down

0 comments on commit 608e6c5

Please sign in to comment.