mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-16 18:12:50 +00:00
[ACS-12817] special permissions refactor continues
This commit is contained in:
committed by
Adam Świderski
parent
f5aad3a5d0
commit
cbc91796c0
@@ -40,8 +40,8 @@ const { execFileSync } = require('child_process');
|
||||
const BROWSERS = ['chrome', 'firefox', 'webkit', 'msedge'];
|
||||
const BLOBS_DIR = 'all-blobs';
|
||||
const EXCLUDE_ROOT = path.join('e2e', 'playwright');
|
||||
// Matrix suite name -> test folder, for the single suite whose folder name differs.
|
||||
const SUITE_TO_FOLDER = { 'special-permissions': 'special-permissions-actions-available' };
|
||||
// Matrix suite name -> test folder, for any suite whose folder name differs from its matrix name.
|
||||
const SUITE_TO_FOLDER = {};
|
||||
|
||||
const PLAYWRIGHT_BIN = path.join('node_modules', '.bin', 'playwright');
|
||||
|
||||
|
||||
@@ -81,8 +81,12 @@ jobs:
|
||||
id: 4
|
||||
- name: "navigation"
|
||||
id: 5
|
||||
- name: "special-permissions"
|
||||
- name: "special-permissions-consumer"
|
||||
id: 6
|
||||
- name: "special-permissions-collaborator-locked"
|
||||
id: 23
|
||||
- name: "special-permissions-folders-repository"
|
||||
id: 24
|
||||
- name: "pagination"
|
||||
id: 7
|
||||
- name: "list-views"
|
||||
|
||||
@@ -181,8 +181,12 @@ jobs:
|
||||
id: 4
|
||||
- name: "navigation"
|
||||
id: 5
|
||||
- name: "special-permissions"
|
||||
- name: "special-permissions-consumer"
|
||||
id: 6
|
||||
- name: "special-permissions-collaborator-locked"
|
||||
id: 23
|
||||
- name: "special-permissions-folders-repository"
|
||||
id: 24
|
||||
- name: "pagination"
|
||||
id: 7
|
||||
- name: "list-views"
|
||||
|
||||
@@ -100,8 +100,12 @@ jobs:
|
||||
id: 4
|
||||
- name: "navigation"
|
||||
id: 5
|
||||
- name: "special-permissions"
|
||||
- name: "special-permissions-consumer"
|
||||
id: 6
|
||||
- name: "special-permissions-collaborator-locked"
|
||||
id: 23
|
||||
- name: "special-permissions-folders-repository"
|
||||
id: 24
|
||||
- name: "pagination"
|
||||
id: 7
|
||||
- name: "list-views"
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"extends": "../../../.eslintrc.json",
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts"
|
||||
],
|
||||
"extends": ["../../../.eslintrc.e2e.json"],
|
||||
"parserOptions": {
|
||||
"project": [
|
||||
"e2e/playwright/special-permissions-collaborator-locked/tsconfig.e2e.json"
|
||||
]
|
||||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/no-floating-promises": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/*!
|
||||
* Copyright © 2005-2026 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, createSuiteProjects } from '@alfresco/aca-playwright-shared';
|
||||
import EXCLUDED_JSON from './exclude.tests.json';
|
||||
|
||||
const config: PlaywrightTestConfig<CustomConfig> = {
|
||||
...getGlobalConfig,
|
||||
|
||||
grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'special-permissions-collaborator-locked'),
|
||||
projects: createSuiteProjects('special-permissions-collaborator-locked', './src/tests')
|
||||
};
|
||||
|
||||
export default config;
|
||||
@@ -0,0 +1,131 @@
|
||||
{
|
||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "special-permissions-collaborator-locked-e2e",
|
||||
"sourceRoot": "e2e/playwright/special-permissions-collaborator-locked/src",
|
||||
"projectType": "application",
|
||||
"targets": {
|
||||
"e2e": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-collaborator-locked/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"configurations": {
|
||||
"ui": {
|
||||
"args": [
|
||||
"--ui"
|
||||
]
|
||||
},
|
||||
"debug": {
|
||||
"args": [
|
||||
"--debug"
|
||||
]
|
||||
},
|
||||
"headed": {
|
||||
"args": [
|
||||
"--headed"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@angular-eslint/builder:lint"
|
||||
},
|
||||
"e2e-multibrowser": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {},
|
||||
"configurations": {
|
||||
"webkit-headed": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "webkit"
|
||||
},
|
||||
"args": [
|
||||
"--headed"
|
||||
],
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-collaborator-locked/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"webkit-headless": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "webkit",
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-collaborator-locked/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"firefox-headed": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "firefox"
|
||||
},
|
||||
"args": [
|
||||
"--headed"
|
||||
],
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-collaborator-locked/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"firefox-headless": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "firefox",
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-collaborator-locked/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"chrome-headed": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "chrome"
|
||||
},
|
||||
"args": [
|
||||
"--headed"
|
||||
],
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-collaborator-locked/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"chrome-headless": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "chrome",
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-collaborator-locked/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"msedge-headed": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "msedge"
|
||||
},
|
||||
"args": [
|
||||
"--headed"
|
||||
],
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-collaborator-locked/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"msedge-headless": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "msedge",
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-collaborator-locked/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"all-browsers-headless": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "all",
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-collaborator-locked/playwright.config.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -40,17 +40,17 @@ const collaboratorToolbarPrimary = ['View', 'View Details', 'More Actions'];
|
||||
const collaboratorViewerLockedToolbarPrimary = ['Activate full-screen mode', 'View Details', 'More Actions'];
|
||||
const lockCurrentUserToolbarMore = ['Cancel Editing', 'Upload New Version', 'Copy'];
|
||||
|
||||
const buildFile = (): LockedFile => {
|
||||
const random = Utils.random();
|
||||
return { name: `file-${random}-my-locked`, random };
|
||||
};
|
||||
|
||||
interface LockedFile {
|
||||
name: string;
|
||||
random: string;
|
||||
id?: string;
|
||||
}
|
||||
|
||||
const buildFile = (): LockedFile => {
|
||||
const random = Utils.random();
|
||||
return { name: `file-${random}-my-locked`, random };
|
||||
};
|
||||
|
||||
test.describe('Special permissions - File locked, user is lock owner : ', () => {
|
||||
const random = Utils.random();
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
+16
-15
@@ -41,33 +41,34 @@ const collaboratorViewerLockedToolbarPrimary = ['Activate full-screen mode', 'Vi
|
||||
const lockOtherUserToolbarMore = ['Cancel Editing', 'Favorite', 'Move', 'Copy', 'Permissions'];
|
||||
const lockOtherUserSearchToolbarMore = ['Cancel Editing', 'Favorite', 'Copy', 'Permissions'];
|
||||
|
||||
interface LockedFile {
|
||||
name: string;
|
||||
interface ManagerLockedFile {
|
||||
random: string;
|
||||
name: string;
|
||||
id?: string;
|
||||
}
|
||||
|
||||
const buildFile = (): LockedFile => {
|
||||
const random = Utils.random();
|
||||
return { name: `file-${random}-my-locked`, random };
|
||||
const buildFile = (): ManagerLockedFile => {
|
||||
const fileToken = Utils.random();
|
||||
const name = `file-${fileToken}-my-locked`;
|
||||
return { random: fileToken, name };
|
||||
};
|
||||
|
||||
test.describe('Special permissions - File locked by other user, user is manager : ', () => {
|
||||
const random = Utils.random();
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
const sitePrivate = `site-private-locked-other-${random}`;
|
||||
const userManager = `manager-locked-other-${random}`;
|
||||
const userDemoted = `demoted-other-${random}`;
|
||||
const sitePrivate = `site-private-locked-other-${random}`;
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
|
||||
let docLibId: string;
|
||||
let managerNodeActions: NodesApi;
|
||||
let managerSiteActions: SitesApi;
|
||||
let managerSearchActions: SearchApi;
|
||||
let managerNodeActions: NodesApi;
|
||||
let managerFavoritesActions: FavoritesApi;
|
||||
let managerSearchActions: SearchApi;
|
||||
let demotedUserActions: NodesApi;
|
||||
let demotedUserShareActions: SharedLinksApi;
|
||||
let docLibId: string;
|
||||
|
||||
const provisionFile = async (item: LockedFile): Promise<void> => {
|
||||
const provisionFile = async (item: ManagerLockedFile): Promise<void> => {
|
||||
test.setTimeout(timeouts.extendedTest);
|
||||
const managerFavoritesTotalItems = await managerFavoritesActions.getFavoritesTotalItems(userManager);
|
||||
const managerSearchTotalItems = await managerSearchActions.getTotalItems(userManager);
|
||||
@@ -88,19 +89,19 @@ test.describe('Special permissions - File locked by other user, user is manager
|
||||
test.beforeAll(async () => {
|
||||
test.setTimeout(timeouts.extendedTest);
|
||||
await apiClientFactory.setUpAcaBackend('admin');
|
||||
await apiClientFactory.createUser({ username: userManager });
|
||||
await apiClientFactory.createUser({ username: userDemoted });
|
||||
await apiClientFactory.createUser({ username: userManager });
|
||||
|
||||
managerNodeActions = await NodesApi.initialize(userManager, userManager);
|
||||
managerSiteActions = await SitesApi.initialize(userManager, userManager);
|
||||
managerSearchActions = await SearchApi.initialize(userManager, userManager);
|
||||
managerNodeActions = await NodesApi.initialize(userManager, userManager);
|
||||
managerFavoritesActions = await FavoritesApi.initialize(userManager, userManager);
|
||||
managerSearchActions = await SearchApi.initialize(userManager, userManager);
|
||||
demotedUserActions = await NodesApi.initialize(userDemoted, userDemoted);
|
||||
demotedUserShareActions = await SharedLinksApi.initialize(userDemoted, userDemoted);
|
||||
|
||||
await managerSiteActions.createSite(sitePrivate, Site.VisibilityEnum.PRIVATE);
|
||||
docLibId = await managerSiteActions.getDocLibId(sitePrivate);
|
||||
await managerSiteActions.addSiteMember(sitePrivate, userDemoted, Site.RoleEnum.SiteManager);
|
||||
docLibId = await managerSiteActions.getDocLibId(sitePrivate);
|
||||
});
|
||||
|
||||
test.beforeEach(async ({ loginPage }) => {
|
||||
Executable → Regular
+1
-1
@@ -11,7 +11,7 @@
|
||||
"extends": ["../../../.eslintrc.e2e.json"],
|
||||
"parserOptions": {
|
||||
"project": [
|
||||
"e2e/playwright/special-permissions-actions-available/tsconfig.e2e.json"
|
||||
"e2e/playwright/special-permissions-consumer/tsconfig.e2e.json"
|
||||
]
|
||||
},
|
||||
"rules": {
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
+2
-2
@@ -29,8 +29,8 @@ import EXCLUDED_JSON from './exclude.tests.json';
|
||||
const config: PlaywrightTestConfig<CustomConfig> = {
|
||||
...getGlobalConfig,
|
||||
|
||||
grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'special-permissions'),
|
||||
projects: createSuiteProjects('special-permissions', './src/tests')
|
||||
grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'special-permissions-consumer'),
|
||||
projects: createSuiteProjects('special-permissions-consumer', './src/tests')
|
||||
};
|
||||
|
||||
export default config;
|
||||
+12
-12
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "special-permissions-e2e",
|
||||
"sourceRoot": "e2e/playwright/special-permissions-actions-available/src",
|
||||
"name": "special-permissions-consumer-e2e",
|
||||
"sourceRoot": "e2e/playwright/special-permissions-consumer/src",
|
||||
"projectType": "application",
|
||||
"targets": {
|
||||
"e2e": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-actions-available/playwright.config.ts"
|
||||
"playwright test --config=e2e/playwright/special-permissions-consumer/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"configurations": {
|
||||
@@ -44,7 +44,7 @@
|
||||
"--headed"
|
||||
],
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-actions-available/playwright.config.ts"
|
||||
"playwright test --config=e2e/playwright/special-permissions-consumer/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"webkit-headless": {
|
||||
@@ -53,7 +53,7 @@
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-actions-available/playwright.config.ts"
|
||||
"playwright test --config=e2e/playwright/special-permissions-consumer/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"firefox-headed": {
|
||||
@@ -64,7 +64,7 @@
|
||||
"--headed"
|
||||
],
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-actions-available/playwright.config.ts"
|
||||
"playwright test --config=e2e/playwright/special-permissions-consumer/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"firefox-headless": {
|
||||
@@ -73,7 +73,7 @@
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-actions-available/playwright.config.ts"
|
||||
"playwright test --config=e2e/playwright/special-permissions-consumer/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"chrome-headed": {
|
||||
@@ -84,7 +84,7 @@
|
||||
"--headed"
|
||||
],
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-actions-available/playwright.config.ts"
|
||||
"playwright test --config=e2e/playwright/special-permissions-consumer/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"chrome-headless": {
|
||||
@@ -93,7 +93,7 @@
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-actions-available/playwright.config.ts"
|
||||
"playwright test --config=e2e/playwright/special-permissions-consumer/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"msedge-headed": {
|
||||
@@ -104,7 +104,7 @@
|
||||
"--headed"
|
||||
],
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-actions-available/playwright.config.ts"
|
||||
"playwright test --config=e2e/playwright/special-permissions-consumer/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"msedge-headless": {
|
||||
@@ -113,7 +113,7 @@
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-actions-available/playwright.config.ts"
|
||||
"playwright test --config=e2e/playwright/special-permissions-consumer/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"all-browsers-headless": {
|
||||
@@ -122,7 +122,7 @@
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-actions-available/playwright.config.ts"
|
||||
"playwright test --config=e2e/playwright/special-permissions-consumer/playwright.config.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -49,7 +49,7 @@ const viewerLockedPrimary = ['Activate full-screen mode', 'View Details', 'More
|
||||
const viewerMore = ['Favorite', 'Copy', 'Manage Versions'];
|
||||
const viewerFavMore = ['Remove Favorite', 'Copy', 'Manage Versions'];
|
||||
const viewerLockedMore = ['Favorite', 'Copy'];
|
||||
const viewerLockedFavMore = ['Favorite', 'Copy'];
|
||||
const viewerLockedFavMore = ['Remove Favorite', 'Copy'];
|
||||
const viewerNotVersionableMore = ['Favorite', 'Copy'];
|
||||
|
||||
interface ConsumerFile {
|
||||
@@ -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/aca-playwright-shared": ["dist/@alfresco/aca-playwright-shared"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
@@ -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/aca-playwright-shared": ["dist/@alfresco/aca-playwright-shared"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"extends": "../../../.eslintrc.json",
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts"
|
||||
],
|
||||
"extends": ["../../../.eslintrc.e2e.json"],
|
||||
"parserOptions": {
|
||||
"project": [
|
||||
"e2e/playwright/special-permissions-folders-repository/tsconfig.e2e.json"
|
||||
]
|
||||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/no-floating-promises": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -0,0 +1,36 @@
|
||||
/*!
|
||||
* Copyright © 2005-2026 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, createSuiteProjects } from '@alfresco/aca-playwright-shared';
|
||||
import EXCLUDED_JSON from './exclude.tests.json';
|
||||
|
||||
const config: PlaywrightTestConfig<CustomConfig> = {
|
||||
...getGlobalConfig,
|
||||
|
||||
grepInvert: getExcludedTestsRegExpArray(EXCLUDED_JSON, 'special-permissions-folders-repository'),
|
||||
projects: createSuiteProjects('special-permissions-folders-repository', './src/tests')
|
||||
};
|
||||
|
||||
export default config;
|
||||
@@ -0,0 +1,131 @@
|
||||
{
|
||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "special-permissions-folders-repository-e2e",
|
||||
"sourceRoot": "e2e/playwright/special-permissions-folders-repository/src",
|
||||
"projectType": "application",
|
||||
"targets": {
|
||||
"e2e": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-folders-repository/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"configurations": {
|
||||
"ui": {
|
||||
"args": [
|
||||
"--ui"
|
||||
]
|
||||
},
|
||||
"debug": {
|
||||
"args": [
|
||||
"--debug"
|
||||
]
|
||||
},
|
||||
"headed": {
|
||||
"args": [
|
||||
"--headed"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@angular-eslint/builder:lint"
|
||||
},
|
||||
"e2e-multibrowser": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {},
|
||||
"configurations": {
|
||||
"webkit-headed": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "webkit"
|
||||
},
|
||||
"args": [
|
||||
"--headed"
|
||||
],
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-folders-repository/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"webkit-headless": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "webkit",
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-folders-repository/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"firefox-headed": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "firefox"
|
||||
},
|
||||
"args": [
|
||||
"--headed"
|
||||
],
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-folders-repository/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"firefox-headless": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "firefox",
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-folders-repository/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"chrome-headed": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "chrome"
|
||||
},
|
||||
"args": [
|
||||
"--headed"
|
||||
],
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-folders-repository/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"chrome-headless": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "chrome",
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-folders-repository/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"msedge-headed": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "msedge"
|
||||
},
|
||||
"args": [
|
||||
"--headed"
|
||||
],
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-folders-repository/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"msedge-headless": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "msedge",
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-folders-repository/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
"all-browsers-headless": {
|
||||
"env": {
|
||||
"PLAYWRIGHT_BROWSER": "all",
|
||||
"PLAYWRIGHT_HEADLESS": "true"
|
||||
},
|
||||
"commands": [
|
||||
"playwright test --config=e2e/playwright/special-permissions-folders-repository/playwright.config.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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/aca-playwright-shared": ["dist/@alfresco/aca-playwright-shared"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
@@ -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/aca-playwright-shared": ["dist/@alfresco/aca-playwright-shared"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user