mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-12075] more multibrowser stabilization pt 3 (#5256)
* [ACS-12075] more multibrowser stabilization pt 3 * [ACS-12075] copilot review fixes 1 * [ACS-12075] deploy local acs newest version test * [ACS-12075] deploy local acs newest version test 2 * [ACS-12075] deploy local acs newest version test 3 * [ACS-12075] Big batch of tests improvements * [ACS=12075] last batch of changes * [ACS-12075] viewer test download fixes * [ACS-12075] updated download funtionality in ACA with proper download name * [ACS-12075] reverted deploy local acs changes * [ACS-12075] updated playwright * [ACS-12075] deleted changes related to frontend + review fixes 4 * [ACS-12075] updated npm and node
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { expect } from '@playwright/test';
|
||||
import { ApiClientFactory, Utils, test, NodesApi, TrashcanApi, TEST_FILES, FileActionsApi } from '@alfresco/aca-playwright-shared';
|
||||
import { ApiClientFactory, Utils, test, NodesApi, TrashcanApi, TEST_FILES, FileActionsApi, SearchApi } from '@alfresco/aca-playwright-shared';
|
||||
|
||||
test.use({ launchOptions: { slowMo: 500 } });
|
||||
|
||||
@@ -31,17 +31,14 @@ test.describe('Search Highlighting', () => {
|
||||
let nodesApi: NodesApi;
|
||||
let trashcanApi: TrashcanApi;
|
||||
let fileActionsApi: FileActionsApi;
|
||||
let searchApi: SearchApi;
|
||||
const randomId = Utils.random();
|
||||
const username = `user-${randomId}`;
|
||||
const fileNameHighlight = `${randomId}-file-name.jpg`;
|
||||
const fileDescriptionHighlight = `${randomId}-file-description.jpg`;
|
||||
const fileDescription = `highlight`;
|
||||
const fileContentHighlight = `${randomId}-file-content.pdf`;
|
||||
const fileContent = 'TEXT:Virtual';
|
||||
|
||||
test.beforeEach(async ({ loginPage }) => {
|
||||
await Utils.tryLoginUser(loginPage, username, username, 'beforeEach failed');
|
||||
});
|
||||
const fileContent = 'Virtual';
|
||||
|
||||
test.beforeAll(async () => {
|
||||
try {
|
||||
@@ -51,9 +48,11 @@ test.describe('Search Highlighting', () => {
|
||||
nodesApi = await NodesApi.initialize(username, username);
|
||||
trashcanApi = await TrashcanApi.initialize(username, username);
|
||||
fileActionsApi = await FileActionsApi.initialize(username, username);
|
||||
searchApi = await SearchApi.initialize(username, username);
|
||||
await nodesApi.createFile(fileNameHighlight, '-my-');
|
||||
await nodesApi.createFile(fileDescriptionHighlight, '-my-', undefined, fileDescription);
|
||||
await fileActionsApi.uploadFileWithRename(TEST_FILES.PDF.path, fileContentHighlight);
|
||||
await searchApi.waitFileForSearchIndexing(fileContentHighlight);
|
||||
|
||||
await fileActionsApi.waitForNodesSearchHighlight(fileContentHighlight, { expect: 1 });
|
||||
} catch (error) {
|
||||
@@ -61,6 +60,10 @@ test.describe('Search Highlighting', () => {
|
||||
}
|
||||
});
|
||||
|
||||
test.beforeEach(async ({ loginPage }) => {
|
||||
await Utils.tryLoginUser(loginPage, username, username, 'beforeEach failed');
|
||||
});
|
||||
|
||||
test.afterAll(async () => {
|
||||
await Utils.deleteNodesSitesEmptyTrashcan(nodesApi, trashcanApi, 'afterAll failed');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user