mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-07 18:25:09 +00:00
fix e2e (#5686)
* fix e2e * Update notifications-component.e2e.ts * fix e2e * fix e2e * try with interval * Update version-actions.e2e.ts
This commit is contained in:
parent
27fd18c40e
commit
f72f82ed4a
@ -14,9 +14,7 @@ COPY demo-shell/dist/ .
|
|||||||
|
|
||||||
RUN addgroup -g ${GROUPID} ${GROUPNAME} && \
|
RUN addgroup -g ${GROUPID} ${GROUPNAME} && \
|
||||||
adduser -S -u ${USERID} -G ${GROUPNAME} -s "/bin/bash" ${USERNAME} && \
|
adduser -S -u ${USERID} -G ${GROUPNAME} -s "/bin/bash" ${USERNAME} && \
|
||||||
chown -R ${USERNAME}:${GROUPNAME} ./**/app.config.json && \
|
chown -R ${USERNAME}:${GROUPNAME} ./**/app.config.json, ./app.config.json /var/cache/nginx || \
|
||||||
chown -R ${USERNAME}:${GROUPNAME} ./app.config.json && \
|
|
||||||
chown -R ${USERNAME}:${GROUPNAME} /var/cache/nginx && \
|
|
||||||
touch /var/run/nginx.pid && \
|
touch /var/run/nginx.pid && \
|
||||||
chown -R ${USERNAME}:${GROUPNAME} /var/run/nginx.pid && \
|
chown -R ${USERNAME}:${GROUPNAME} /var/run/nginx.pid && \
|
||||||
chmod +x /entrypoint.sh && \
|
chmod +x /entrypoint.sh && \
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
import { ContentServicesPage } from '../../pages/adf/content-services.page';
|
import { ContentServicesPage } from '../../pages/adf/content-services.page';
|
||||||
import { AcsUserModel } from '../../models/ACS/acs-user.model';
|
import { AcsUserModel } from '../../models/ACS/acs-user.model';
|
||||||
import { FileModel } from '../../models/ACS/file.model';
|
import { FileModel } from '../../models/ACS/file.model';
|
||||||
import { LoginPage, UploadActions, PaginationPage, StringUtil, PermissionActions } from '@alfresco/adf-testing';
|
import { BrowserActions, LoginPage, UploadActions, PaginationPage, StringUtil, PermissionActions } from '@alfresco/adf-testing';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { FolderModel } from '../../models/ACS/folder.model';
|
import { FolderModel } from '../../models/ACS/folder.model';
|
||||||
@ -114,7 +114,7 @@ describe('Delete Directive', () => {
|
|||||||
await uploadActions.createFolder(folderSecond.name, baseFolderUploaded.entry.id);
|
await uploadActions.createFolder(folderSecond.name, baseFolderUploaded.entry.id);
|
||||||
|
|
||||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
await browser.get(`${browser.baseUrl}/files/${baseFolderUploaded.entry.id}`);
|
await BrowserActions.getUrl(`${browser.baseUrl}/files/${baseFolderUploaded.entry.id}`);
|
||||||
await contentServicesPage.waitForTableBody();
|
await contentServicesPage.waitForTableBody();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ describe('Delete Directive', () => {
|
|||||||
await uploadActions.uploadFile(secondPngFileModel.location, secondPngFileModel.name, baseFolderUploaded.entry.id);
|
await uploadActions.uploadFile(secondPngFileModel.location, secondPngFileModel.name, baseFolderUploaded.entry.id);
|
||||||
|
|
||||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
await browser.get(`${browser.baseUrl}/files/${baseFolderUploaded.entry.id}`);
|
await BrowserActions.getUrl(`${browser.baseUrl}/files/${baseFolderUploaded.entry.id}`);
|
||||||
await contentServicesPage.waitForTableBody();
|
await contentServicesPage.waitForTableBody();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -240,7 +240,7 @@ describe('Delete Directive', () => {
|
|||||||
await permissionActions.disableInheritedPermissionsForNode(filePdf.entry.id);
|
await permissionActions.disableInheritedPermissionsForNode(filePdf.entry.id);
|
||||||
|
|
||||||
await loginPage.loginToContentServicesUsingUserModel(secondAcsUser);
|
await loginPage.loginToContentServicesUsingUserModel(secondAcsUser);
|
||||||
await browser.get(`${browser.baseUrl}/files/${createdSite.entry.guid}`);
|
await BrowserActions.getUrl(`${browser.baseUrl}/files/${createdSite.entry.guid}`);
|
||||||
await contentServicesPage.waitForTableBody();
|
await contentServicesPage.waitForTableBody();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ describe('Notifications Component', () => {
|
|||||||
await notificationPage.enterDurationField(1000);
|
await notificationPage.enterDurationField(1000);
|
||||||
await notificationPage.clickNotificationButton();
|
await notificationPage.clickNotificationButton();
|
||||||
await notificationPage.checkNotificationSnackBarIsDisplayed();
|
await notificationPage.checkNotificationSnackBarIsDisplayed();
|
||||||
await browser.sleep(1500);
|
await browser.sleep(2000);
|
||||||
await notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
await notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ describe('Upload component', async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
it('[C272792] Should be possible to cancel upload of a big file using row cancel icon', async () => {
|
it('[C272792] Should be possible to cancel upload of a big file using row cancel icon', async () => {
|
||||||
await browser.executeScript(`setTimeout(() => {document.querySelector('div[data-automation-id="cancel-upload-progress"]').click();}, 2500)`);
|
await browser.executeScript(`setInterval(() => {document.querySelector('div[data-automation-id="cancel-upload-progress"]').click();}, 500)`);
|
||||||
|
|
||||||
await contentServicesPage.uploadFile(mediumFile.location);
|
await contentServicesPage.uploadFile(mediumFile.location);
|
||||||
|
|
||||||
@ -84,8 +84,8 @@ describe('Upload component', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C287790] Should be possible to cancel upload of a big file through the cancel uploads button', async () => {
|
it('[C287790] Should be possible to cancel upload of a big file through the cancel uploads button', async () => {
|
||||||
await browser.executeScript(' setTimeout(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
|
await browser.executeScript(' setInterval(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
|
||||||
'document.querySelector("#adf-upload-dialog-cancel").click(); }, 2500)');
|
'document.querySelector("#adf-upload-dialog-cancel").click(); }, 500)');
|
||||||
|
|
||||||
await contentServicesPage.uploadFile(largeFile.location);
|
await contentServicesPage.uploadFile(largeFile.location);
|
||||||
await expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
|
await expect(await uploadDialog.getTitleText()).toEqual('Upload canceled');
|
||||||
@ -97,8 +97,8 @@ describe('Upload component', async () => {
|
|||||||
it('[C272793] Should be able to cancel multiple files upload', async () => {
|
it('[C272793] Should be able to cancel multiple files upload', async () => {
|
||||||
await uploadToggles.enableMultipleFileUpload();
|
await uploadToggles.enableMultipleFileUpload();
|
||||||
|
|
||||||
await browser.executeScript(' setTimeout(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
|
await browser.executeScript(' setInterval(() => {document.querySelector("#adf-upload-dialog-cancel-all").click();' +
|
||||||
'document.querySelector("#adf-upload-dialog-cancel").click(); }, 2500)');
|
'document.querySelector("#adf-upload-dialog-cancel").click(); }, 500)');
|
||||||
|
|
||||||
await contentServicesPage.uploadMultipleFile([mediumFile.location, largeFile.location]);
|
await contentServicesPage.uploadMultipleFile([mediumFile.location, largeFile.location]);
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ describe('Upload component', async () => {
|
|||||||
it('[C315257] Should be able to cancel file in upload queue', async () => {
|
it('[C315257] Should be able to cancel file in upload queue', async () => {
|
||||||
await uploadToggles.enableMultipleFileUpload();
|
await uploadToggles.enableMultipleFileUpload();
|
||||||
|
|
||||||
await browser.executeScript(`setTimeout(() => {document.querySelector('button[data-automation-id="cancel-upload-queue"]').click();}, 2500)`);
|
await browser.executeScript(`setInterval(() => {document.querySelector('button[data-automation-id="cancel-upload-queue"]').click();}, 500)`);
|
||||||
|
|
||||||
await contentServicesPage.uploadMultipleFile([mediumFile.location, pngFile.location]);
|
await contentServicesPage.uploadMultipleFile([mediumFile.location, pngFile.location]);
|
||||||
await uploadDialog.fileIsCancelled(pngFile.name);
|
await uploadDialog.fileIsCancelled(pngFile.name);
|
||||||
|
@ -149,10 +149,10 @@ describe('Version component actions', () => {
|
|||||||
it('[C307033] Should be possible to cancel the upload of a new version', async () => {
|
it('[C307033] Should be possible to cancel the upload of a new version', async () => {
|
||||||
await browser.refresh();
|
await browser.refresh();
|
||||||
await contentServicesPage.versionManagerContent(txtFileModel.name);
|
await contentServicesPage.versionManagerContent(txtFileModel.name);
|
||||||
await browser.executeScript(' setTimeout(() => {document.querySelector("div[data-automation-id=\'cancel-upload-progress\']").click();}, 1000)');
|
|
||||||
|
|
||||||
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
await BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||||
|
|
||||||
|
await browser.executeScript(' setTimeout(() => {document.querySelector("div[data-automation-id=\'cancel-upload-progress\']").click();}, 1000)');
|
||||||
await versionManagePage.uploadNewVersionFile(bigFileToCancel.location);
|
await versionManagePage.uploadNewVersionFile(bigFileToCancel.location);
|
||||||
await versionManagePage.closeVersionDialog();
|
await versionManagePage.closeVersionDialog();
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ export class UploadDialogPage {
|
|||||||
|
|
||||||
async fileIsCancelled(content): Promise<void> {
|
async fileIsCancelled(content): Promise<void> {
|
||||||
const row = await this.getRowByRowName(content);
|
const row = await this.getRowByRowName(content);
|
||||||
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.cancelledStatusIcon));
|
await BrowserVisibility.waitUntilElementIsVisible(row.element(this.cancelledStatusIcon), 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
async removeUploadedFile(content): Promise<void> {
|
async removeUploadedFile(content): Promise<void> {
|
||||||
|
@ -54,7 +54,7 @@ export class LoginPage {
|
|||||||
sidenavLayout = element(by.css(`[data-automation-id="sidenav-layout"]`));
|
sidenavLayout = element(by.css(`[data-automation-id="sidenav-layout"]`));
|
||||||
|
|
||||||
async goToLoginPage(): Promise<void> {
|
async goToLoginPage(): Promise<void> {
|
||||||
await browser.get(this.loginURL);
|
await BrowserActions.getUrl(this.loginURL);
|
||||||
await this.waitForElements();
|
await this.waitForElements();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,8 +47,8 @@ export class BrowserActions {
|
|||||||
await BrowserVisibility.waitUntilElementIsNotVisible(actionMenu);
|
await BrowserVisibility.waitUntilElementIsNotVisible(actionMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
static async getUrl(url: string): Promise<any> {
|
static async getUrl(url: string, timeout: number = 10000): Promise<any> {
|
||||||
return browser.get(url);
|
return browser.get(url, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
static async clickExecuteScript(elementCssSelector: string): Promise<void> {
|
static async clickExecuteScript(elementCssSelector: string): Promise<void> {
|
||||||
|
@ -88,7 +88,7 @@ export class StartProcessCloudPage {
|
|||||||
|
|
||||||
async checkStartProcessButtonIsEnabled(): Promise<boolean> {
|
async checkStartProcessButtonIsEnabled(): Promise<boolean> {
|
||||||
await browser.sleep(1000); // waiting for API response
|
await browser.sleep(1000); // waiting for API response
|
||||||
await BrowserVisibility.waitUntilElementIsPresent(this.startProcessButton);
|
await BrowserVisibility.waitUntilElementIsVisible(this.startProcessButton);
|
||||||
return this.startProcessButton.isEnabled();
|
return this.startProcessButton.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
"start:dist": "ng lint dist && npm run validate-config && ng serve dist --prod --open",
|
"start:dist": "ng lint dist && npm run validate-config && ng serve dist --prod --open",
|
||||||
"build": "npm run validate-config && ng build dist",
|
"build": "npm run validate-config && ng build dist",
|
||||||
"build:dev": "npm run validate-config && npm run style:dev && ng build dev",
|
"build:dev": "npm run validate-config && npm run style:dev && ng build dev",
|
||||||
"build:dist": "npm run validate-config && node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build dist --prod --base-href .",
|
"build:dist": "npm run validate-config && node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build dist --prod",
|
||||||
"build:dist:stats": "npm run validate-config && node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build dist --prod --stats-json",
|
"build:dist:stats": "npm run validate-config && node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build dist --prod --stats-json",
|
||||||
"build:dist:e2e": "npm run validate-config && node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build dist --prod --configuration=e2e --stats-json ",
|
"build:dist:e2e": "npm run validate-config && node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build dist --prod --configuration=e2e --stats-json ",
|
||||||
"style:dev": "npm run webpack -- --config ./lib/config/webpack.style.js --progress --profile --bail",
|
"style:dev": "npm run webpack -- --config ./lib/config/webpack.style.js --progress --profile --bail",
|
||||||
|
@ -9,7 +9,7 @@ const configPath = './demo-shell/dist/app.config.json';
|
|||||||
fs.readFile(configPath, (err, appConfigString) => {
|
fs.readFile(configPath, (err, appConfigString) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
let appConfig = JSON.parse(appConfigString);
|
let appConfig = JSON.parse(appConfigString);
|
||||||
appConfig.providers = process.env.PROVIDERS;
|
appConfig.providers = process.env.PROVIDERS || 'ALL';
|
||||||
appConfig.bpmHost = (process.env.PROXY_HOST_ADF || process.env.URL_HOST_BPM_ADF || process.env.URL_HOST_ADF);
|
appConfig.bpmHost = (process.env.PROXY_HOST_ADF || process.env.URL_HOST_BPM_ADF || process.env.URL_HOST_ADF);
|
||||||
appConfig.ecmHost = (process.env.PROXY_HOST_ADF || process.env.URL_HOST_ADF);
|
appConfig.ecmHost = (process.env.PROXY_HOST_ADF || process.env.URL_HOST_ADF);
|
||||||
appConfig.identityHost = process.env.URL_HOST_IDENTITY;
|
appConfig.identityHost = process.env.URL_HOST_IDENTITY;
|
||||||
|
@ -10,6 +10,9 @@ echo "Running the docker with tag" $TAG_VERSION
|
|||||||
|
|
||||||
# Publish Image to docker
|
# Publish Image to docker
|
||||||
|
|
||||||
|
sed s%href=\".\"%href=\".\"%g \
|
||||||
|
-i ./demo-shell/dist/index.html
|
||||||
|
|
||||||
mkdir "./demo-shell/tmp/"
|
mkdir "./demo-shell/tmp/"
|
||||||
mv ./demo-shell/dist/* ./demo-shell/tmp
|
mv ./demo-shell/dist/* ./demo-shell/tmp
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user