mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[no-issue] Parallel run e2e and e2e common action refactoring (#4702)
This commit is contained in:
@@ -65,7 +65,7 @@ describe('Upload component', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
@@ -80,18 +80,6 @@ describe('Upload component', () => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
const nodesPromise = await contentServicesPage.getElementsDisplayedId();
|
||||
|
||||
nodesPromise.forEach(async (currentNode) => {
|
||||
if (currentNode && currentNode !== 'Node id') {
|
||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, currentNode);
|
||||
}
|
||||
});
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C272792] Should be possible to cancel upload of a big file using row cancel icon', () => {
|
||||
browser.executeScript(' setTimeout(() => {document.querySelector(\'mat-icon[class*="adf-file-uploading-row__action"]\').click();}, 3000)');
|
||||
|
||||
|
@@ -72,7 +72,7 @@ describe('Upload component - Excluded Files', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
@@ -80,7 +80,8 @@ describe('Upload component - Excluded Files', () => {
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
await browser.refresh();
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -119,19 +120,10 @@ describe('Upload component - Excluded Files', () => {
|
||||
});
|
||||
|
||||
it('[C212862] Should not allow upload file excluded in the files extension of app.config.json', async () => {
|
||||
|
||||
const filesConfig = {
|
||||
'excluded': [
|
||||
'.DS_Store',
|
||||
'desktop.ini',
|
||||
'*.txt'
|
||||
],
|
||||
'match-options': {
|
||||
'nocase': true
|
||||
}
|
||||
};
|
||||
|
||||
await LocalStorageUtil.setConfigField('files', JSON.stringify(filesConfig));
|
||||
await LocalStorageUtil.setConfigField('files', JSON.stringify({
|
||||
excluded: ['.DS_Store', 'desktop.ini', '*.txt'],
|
||||
'match-options': { 'nocase': true }
|
||||
}));
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
@@ -141,21 +133,10 @@ describe('Upload component - Excluded Files', () => {
|
||||
});
|
||||
|
||||
it('[C274688] Should extension type added as excluded and accepted not be uploaded', async () => {
|
||||
|
||||
browser.refresh();
|
||||
|
||||
const filesConfig = {
|
||||
'excluded': [
|
||||
'.DS_Store',
|
||||
'desktop.ini',
|
||||
'*.png'
|
||||
],
|
||||
'match-options': {
|
||||
'nocase': true
|
||||
}
|
||||
};
|
||||
|
||||
await LocalStorageUtil.setConfigField('files', JSON.stringify(filesConfig));
|
||||
await LocalStorageUtil.setConfigField('files', JSON.stringify({
|
||||
excluded: ['.DS_Store', 'desktop.ini', '*.png'],
|
||||
'match-options': { 'nocase': true }
|
||||
}));
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
||||
import { VersionManagePage } from '../../pages/adf/versionManagerPage';
|
||||
@@ -60,18 +60,13 @@ describe('Upload component', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
it('should remove uploaded file', () => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.uploadFile(docxFileModel.location);
|
||||
uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
uploadDialog
|
||||
@@ -81,12 +76,13 @@ describe('Upload component', () => {
|
||||
});
|
||||
|
||||
it('should not have remove action if uploaded file is a file version', () => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
contentServicesPage.uploadFile(docxFileModel.location);
|
||||
uploadDialog.fileIsUploaded(docxFileModel.name);
|
||||
contentServicesPage.checkContentIsDisplayed(docxFileModel.name);
|
||||
|
||||
contentServicesPage.versionManagerContent(docxFileModel.name);
|
||||
versionManagePage.showNewVersionButton.click();
|
||||
BrowserActions.click(versionManagePage.showNewVersionButton);
|
||||
versionManagePage.uploadNewVersionFile(
|
||||
fileModelVersion.location
|
||||
);
|
||||
|
@@ -73,7 +73,7 @@ describe('Upload component', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
|
@@ -92,14 +92,11 @@ describe('Upload component', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
const pdfUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, firstPdfFileModel.location, firstPdfFileModel.name, '-my-');
|
||||
|
||||
Object.assign(firstPdfFileModel, pdfUploadedFile.entry);
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -109,19 +106,17 @@ describe('Upload component', () => {
|
||||
|
||||
describe('', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
contentServicesPage.getElementsDisplayedId().then(async (nodeList) => {
|
||||
for (let i = 0; i < nodeList.length; i++) {
|
||||
try {
|
||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, nodeList[i]);
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
contentServicesPage.getElementsDisplayedId().then((nodeList) => {
|
||||
nodeList.forEach(async (currentNode) => {
|
||||
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, currentNode);
|
||||
});
|
||||
done();
|
||||
});
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C272788] Should display upload button', () => {
|
||||
|
@@ -85,7 +85,7 @@ describe('Upload - User permission', () => {
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUserTwo);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
this.consumerSite = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(),
|
||||
@@ -253,7 +253,7 @@ describe('Upload - User permission', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C260175] Should two different user upload files in the proper User Home', () => {
|
||||
it('[C260175] Should two different user upload files in the proper User Home', async () => {
|
||||
contentServicesPage.uploadFile(emptyFile.location);
|
||||
|
||||
uploadDialog.fileIsUploaded(emptyFile.name);
|
||||
@@ -261,7 +261,7 @@ describe('Upload - User permission', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(emptyFile.name);
|
||||
|
||||
navigationBarPage.clickLoginButton();
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUserTwo);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUserTwo);
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
contentServicesPage.checkContentIsNotDisplayed(emptyFile.name);
|
||||
@@ -271,7 +271,7 @@ describe('Upload - User permission', () => {
|
||||
contentServicesPage.checkContentIsDisplayed(pngFile.name);
|
||||
|
||||
navigationBarPage.clickLoginButton();
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
contentServicesPage.checkContentIsNotDisplayed(pngFile.name);
|
||||
|
Reference in New Issue
Block a user