mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-10838] viewer test fix remove hruser
This commit is contained in:
@@ -12,11 +12,9 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
BASE_URL: https://adwe2e.envalfresco.com
|
||||
ADMIN_EMAIL: ${{ secrets.PIPELINE_ADMIN_USERNAME }}
|
||||
ADMIN_PASSWORD: ${{ secrets.PIPELINE_ADMIN_PASSWORD }}
|
||||
HR_USER: ${{ secrets.HR_USER }}
|
||||
HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
|
||||
BASE_URL: http://localhost
|
||||
ADMIN_EMAIL: admin
|
||||
ADMIN_PASSWORD: admin
|
||||
SCREENSHOT_USERNAME: ${{ secrets.SCREENSHOT_USERNAME }}
|
||||
SCREENSHOT_PASSWORD: ${{ secrets.SCREENSHOT_PASSWORD}}
|
||||
PLAYWRIGHT_E2E_HOST: http://localhost:4200
|
||||
@@ -212,13 +210,13 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ steps.deploy-local-acs.outcome }}" == "success" ]; then
|
||||
echo "✅ Local ACS deployment succeeded - using local environment"
|
||||
echo "BASE_URL=http://localhost" >> $GITHUB_ENV
|
||||
echo "ADMIN_EMAIL=admin" >> $GITHUB_ENV
|
||||
echo "ADMIN_PASSWORD=admin" >> $GITHUB_ENV
|
||||
echo "BASE_URL: http://localhost"
|
||||
echo '✅ Local ACS deployment succeeded - using local environment'
|
||||
else
|
||||
echo "⚠️ Local ACS deployment failed - falling back to adwe2e environment"
|
||||
echo '⚠️ Local ACS deployment failed - falling back to adwe2e environment'
|
||||
BASE_URL: https://adwe2e.envalfresco.com
|
||||
echo 'BASE_URL=$BASE_URL' >> $GITHUB_ENV
|
||||
echo 'ADMIN_EMAIL=$ADMIN_EMAIL' >> $GITHUB_ENV
|
||||
echo 'ADMIN_PASSWORD=$ADMIN_PASSWORD' >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Before e2e
|
||||
|
||||
@@ -34,9 +34,7 @@ const config: PlaywrightTestConfig<CustomConfig> = {
|
||||
{
|
||||
name: 'Viewer',
|
||||
testDir: './src/tests',
|
||||
use: {
|
||||
users: ['hruser']
|
||||
}
|
||||
use: {}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
@@ -23,9 +23,8 @@
|
||||
*/
|
||||
|
||||
import { expect } from '@playwright/test';
|
||||
import { ApiClientFactory, getUserState, test, TEST_FILES, timeouts, Utils } from '@alfresco/aca-playwright-shared';
|
||||
import { ApiClientFactory, test, TEST_FILES, timeouts, Utils } from '@alfresco/aca-playwright-shared';
|
||||
|
||||
test.use({ storageState: getUserState('hruser') });
|
||||
test.describe('viewer action file', () => {
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
const randomFolderName = `viewer-action-${Utils.random()}`;
|
||||
@@ -50,7 +49,7 @@ test.describe('viewer action file', () => {
|
||||
const docxRecentFiles = `docxRF-${Utils.random()}.docx`;
|
||||
|
||||
test.beforeAll(async ({ fileAction, favoritesPageAction, shareAction }) => {
|
||||
await apiClientFactory.setUpAcaBackend('hruser');
|
||||
await apiClientFactory.setUpAcaBackend('admin');
|
||||
const node = await apiClientFactory.nodes.createNode('-my-', { name: randomFolderName, nodeType: 'cm:folder', relativePath: '/' });
|
||||
destinationId = (await apiClientFactory.nodes.createNode('-my-', { name: destination, nodeType: 'cm:folder', relativePath: '/' })).entry.id;
|
||||
folderId = node.entry.id;
|
||||
@@ -68,7 +67,7 @@ test.describe('viewer action file', () => {
|
||||
randomDocxNameFavoriteId = fileFavoritesNode.entry.id;
|
||||
await fileAction.uploadFile(TEST_FILES.DOCX.path, fileForEditOffline, folderId);
|
||||
await favoritesPageAction.addFavoriteById('file', randomDocxNameFavoriteId);
|
||||
await favoritesPageAction.isFavoriteWithRetry('hruser', randomDocxNameFavoriteId, { expect: true });
|
||||
await favoritesPageAction.isFavoriteWithRetry('admin', randomDocxNameFavoriteId, { expect: true });
|
||||
await fileAction.isFileLockedWriteWithRetry(fileForCancelEditingId, true);
|
||||
});
|
||||
|
||||
|
||||
@@ -23,9 +23,8 @@
|
||||
*/
|
||||
|
||||
import { expect } from '@playwright/test';
|
||||
import { ApiClientFactory, getUserState, test, TEST_FILES, Utils } from '@alfresco/aca-playwright-shared';
|
||||
import { ApiClientFactory, test, TEST_FILES, Utils } from '@alfresco/aca-playwright-shared';
|
||||
|
||||
test.use({ storageState: getUserState('hruser') });
|
||||
test.describe('viewer file', () => {
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
const randomFolderName = `viewer-protected-${Utils.random()}`;
|
||||
@@ -34,7 +33,7 @@ test.describe('viewer file', () => {
|
||||
let fileDocxId: string;
|
||||
|
||||
test.beforeAll(async ({ fileAction, shareAction, favoritesPageAction }) => {
|
||||
await apiClientFactory.setUpAcaBackend('hruser');
|
||||
await apiClientFactory.setUpAcaBackend('admin');
|
||||
const node = await apiClientFactory.nodes.createNode('-my-', { name: randomFolderName, nodeType: 'cm:folder', relativePath: '/' });
|
||||
folderId = node.entry.id;
|
||||
const fileDoc = await fileAction.uploadFile(TEST_FILES.PDF_PROTECTED.path, randomDocxName, folderId);
|
||||
|
||||
Reference in New Issue
Block a user