Make aca-playwright-shared buildable and publishable (#4098)

* Make aca-playwright-shared buildable and publishable

* Small PR workflow fix
This commit is contained in:
MichalKinas
2024-09-04 18:24:46 +02:00
committed by GitHub
parent ea1fc8af03
commit 96df46a32a
141 changed files with 207 additions and 156 deletions

View File

@@ -1,6 +1,6 @@
{
"dest": "../../dist/@alfresco/aca-playwright-shared",
"lib": {
"entryFile": "src/index.ts"
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,8 +1,7 @@
{
"name": "@alfresco/aca-playwright-shared",
"version": "3.0.0",
"version": "0.0.1",
"license": "LGPL-3.0",
"main": "src/index.ts",
"dependencies": {
"tslib": "^2.0.0"
},

View File

@@ -24,9 +24,8 @@
import * as fs from 'fs';
import { ApiClientFactory } from './api-client-factory';
import { Utils } from '../utils';
import { Utils, waitForApi } from '../utils';
import { NodeBodyCreate, NodeEntry, ResultSetPaging } from '@alfresco/js-api';
import { waitForApi } from '@alfresco/playwright-shared';
export class FileActionsApi {
private apiService: ApiClientFactory;

View File

@@ -0,0 +1,25 @@
/*!
* Copyright © 2005-2024 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/>.
*/
export * from './page-initialization';

View File

@@ -24,23 +24,19 @@
import { test as base } from '@playwright/test';
import {
FavoritesLibrariesPage,
LoginPage,
MyLibrariesPage,
FileActionsApi,
NodesPage,
PersonalFilesPage,
RecentFilesPage,
SharedLinksApi,
SharedPage,
SearchPage,
FavoritesPage,
FavoritesPageApi,
TrashPage,
LoginPage,
NodesApi,
SitesApi,
users,
FavoritesLibrariesPage
} from '../';
TrashPage
} from '../page-objects';
import { FileActionsApi, SharedLinksApi, FavoritesPageApi, NodesApi, SitesApi } from '../api';
import { users } from '../base-config';
interface Pages {
personalFiles: PersonalFilesPage;

View File

@@ -36,3 +36,4 @@ export * from './upload-dialog.component';
export * from './delete-trash-dialog.component';
export * from './link-rules.component';
export * from './edit-dialog.component';
export * from './manage-versions-dialog.component';

View File

@@ -24,7 +24,7 @@
import { BaseComponent } from '../../base.component';
import { Page, expect } from '@playwright/test';
import { SearchPage, SearchType } from '@alfresco/playwright-shared';
import { SearchPage, SearchType } from '../../../pages';
type FilterTab = 'Created' | 'Modified';

View File

@@ -22,9 +22,9 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { SearchPage } from '../../../pages';
import { BaseComponent } from '../../base.component';
import { Page } from '@playwright/test';
import { SearchPage } from '@alfresco/playwright-shared';
export class SearchFiltersLocation extends BaseComponent {
private static rootElement = '.adf-search-filter-menu-card';

View File

@@ -22,9 +22,9 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { SearchPage } from '../../../pages';
import { BaseComponent } from '../../base.component';
import { Page } from '@playwright/test';
import { SearchPage } from '@alfresco/playwright-shared';
export class SearchFiltersProperties extends BaseComponent {
private static rootElement = '.adf-search-filter-menu-card';

View File

@@ -22,7 +22,7 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { SearchPage } from '@alfresco/playwright-shared';
import { SearchPage } from '../../../pages';
import { BaseComponent } from '../../base.component';
import { Page } from '@playwright/test';

View File

@@ -30,7 +30,6 @@ export class SidenavComponent extends BaseComponent {
private static rootElement = 'app-sidenav';
private personalFiles = this.getChild(`[data-automation-id='app.navbar.personalFiles']`);
private fileLibraries = this.getChild(`[data-automation-id='app.navbar.libraries.menu']`);
private myLibraries = this.getChild(`[data-automation-id='app.navbar.libraries.files']`);
private favoriteLibraries = this.getChild(`[data-automation-id='app.navbar.libraries.favorite']`);
private shared = this.getChild(`[data-automation-id='app.navbar.shared']`);

View File

@@ -23,7 +23,7 @@
*/
import { Page } from '@playwright/test';
import { GenericLogger, LoggerLike } from '@alfresco/playwright-shared';
import { GenericLogger, LoggerLike } from '../utils';
export abstract class PlaywrightBase {
public page: Page;

View File

@@ -26,7 +26,6 @@ export * from './api';
export * from './base-config';
export * from './models';
export * from './page-objects';
export * from './fixtures/page-initialization';
export * from './fixtures';
export * from './utils';
export * from './resources/test-files';
export * from './resources/test-data';
export * from './resources';

View File

@@ -0,0 +1,26 @@
/*!
* Copyright © 2005-2024 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/>.
*/
export * from './test-data';
export * from './test-files';

View File

@@ -22,7 +22,7 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { Utils } from '@alfresco/playwright-shared';
import { Utils } from '../../utils';
const random = Utils.random();
const multipleSelToolbarPrimary = ['Download', 'View Details', 'More Actions'];

View File

@@ -22,7 +22,7 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { Utils } from '@alfresco/playwright-shared';
import { Utils } from '../../utils';
export const random = Utils.random();

View File

@@ -24,10 +24,10 @@
const crypto = require('crypto');
import * as path from 'path';
import { LoginPage, MyLibrariesPage, PersonalFilesPage, FavoritesLibrariesPage, SearchPage, SharedPage, TrashPage } from '../';
import { NodesApi, TrashcanApi, SitesApi } from '@alfresco/playwright-shared';
import { LoginPage, MyLibrariesPage, PersonalFilesPage, FavoritesLibrariesPage, SearchPage, SharedPage, TrashPage } from '../page-objects';
import { format, subDays, subMonths, endOfMonth } from 'date-fns';
import StreamZip from 'node-stream-zip';
import { NodesApi, SitesApi, TrashcanApi } from '../api';
export class Utils {
static string257Long = 'x'.repeat(257);

View File

@@ -1,7 +1,14 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
"declarationMap": false,
"paths": {
"@alfresco/aca-content": ["dist/@alfresco/aca-content"],
"@alfresco/aca-content/folder-rules": ["dist/@alfresco/aca-content/folder-rules"],
"@alfresco/aca-shared": ["dist/@alfresco/aca-shared"],
"@alfresco/aca-shared/store": ["dist/@alfresco/aca-shared/store"],
"@alfresco/aca-shared/rules": ["dist/@alfresco/aca-shared/rules"]
},
},
"angularCompilerOptions": {
"compilationMode": "partial"