mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4329][ASD-5330] plus Improve e2e (#6580)
Improve e2e Fix SSO user avatar Fix Priority for APS1
This commit is contained in:
@@ -188,6 +188,7 @@ describe('Comment', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(pngUploadedFile.entry.id);
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
});
|
||||
|
@@ -54,8 +54,9 @@ describe('Create library directive', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(createSite.entry.id, { permanent: true });
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { TrashcanPage } from '../../core/pages/trashcan.page';
|
||||
@@ -29,7 +29,8 @@ import {
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions
|
||||
UsersActions,
|
||||
WaitActions
|
||||
} from '@alfresco/adf-testing';
|
||||
|
||||
describe('Restore content directive', () => {
|
||||
@@ -42,8 +43,10 @@ describe('Restore content directive', () => {
|
||||
const trashcanPage = new TrashcanPage();
|
||||
const breadCrumbPage = new BreadcrumbPage();
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const waitActions = new WaitActions(apiService);
|
||||
|
||||
const pdfFileModel = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
@@ -60,7 +63,7 @@ describe('Restore content directive', () => {
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
|
||||
});
|
||||
|
||||
const folderName = StringUtil.generateRandomString(5);
|
||||
let testFolder: NodeEntry;
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
let folderWithContent, folderWithFolder, subFolder, subFile, testFile, restoreFile, publicSite, siteFolder,
|
||||
@@ -72,7 +75,7 @@ describe('Restore content directive', () => {
|
||||
await usersActions.createUser(anotherAcsUser);
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
await uploadActions.createFolder(folderName, '-my-');
|
||||
testFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
folderWithContent = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
subFile = await uploadActions.uploadFile(testFileModel.location, testFileModel.name, folderWithContent.entry.id);
|
||||
testFile = await uploadActions.uploadFile(pdfFileModel.location, pdfFileModel.name, '-my-');
|
||||
@@ -93,12 +96,12 @@ describe('Restore content directive', () => {
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.deleteContent(folderName);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFolder.entry.name);
|
||||
await contentServicesPage.deleteContent(testFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(testFolder.entry.name);
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(testFolder.entry.name);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
@@ -106,26 +109,26 @@ describe('Restore content directive', () => {
|
||||
});
|
||||
|
||||
it('[C260227] Should validate when restoring Folders with same name', async () => {
|
||||
await uploadActions.createFolder(folderName, '-my-');
|
||||
await uploadActions.createFolder(testFolder.entry.name, '-my-');
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.deleteContent(folderName);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFolder.entry.name);
|
||||
await contentServicesPage.deleteContent(testFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(testFolder.entry.name);
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowContentIsDisplayed(testFolder.entry.name);
|
||||
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkAllRows();
|
||||
|
||||
await trashcanPage.clickRestore();
|
||||
await browser.sleep(1000);
|
||||
await waitActions.nodeIsPresent(testFolder.entry.id);
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.getDocumentList().dataTablePage().waitTillContentLoaded();
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFolder.entry.name);
|
||||
|
||||
await notificationHistoryPage.checkNotifyContains('Can\'t restore, ' + folderName + ' item already exists');
|
||||
await notificationHistoryPage.checkNotifyContains('Can\'t restore, ' + testFolder.entry.name + ' item already exists');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -222,26 +225,26 @@ describe('Restore content directive', () => {
|
||||
});
|
||||
|
||||
it('[C260241] Should display restore icon both for file and folder', async () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(folderName);
|
||||
await contentServicesPage.checkContentIsDisplayed(testFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(restoreFile.entry.name);
|
||||
await contentServicesPage.deleteContent(folderName);
|
||||
await contentServicesPage.deleteContent(testFolder.entry.name);
|
||||
await contentServicesPage.deleteContent(restoreFile.entry.name);
|
||||
|
||||
await navigationBarPage.clickTrashcanButton();
|
||||
await trashcanPage.waitForTableBody();
|
||||
await trashcanPage.checkRestoreButtonIsNotDisplayed();
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(testFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(testFolder.entry.name);
|
||||
await trashcanPage.checkRestoreButtonIsDisplayed();
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsNotSelected(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(testFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsNotSelected(testFolder.entry.name);
|
||||
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(restoreFile.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(restoreFile.entry.name);
|
||||
await trashcanPage.checkRestoreButtonIsDisplayed();
|
||||
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(folderName);
|
||||
await trashcanPage.getDocumentList().dataTablePage().clickRowByContentCheckbox(testFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(testFolder.entry.name);
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(restoreFile.entry.name);
|
||||
await trashcanPage.checkRestoreButtonIsDisplayed();
|
||||
});
|
||||
@@ -285,10 +288,11 @@ describe('Restore content directive', () => {
|
||||
await trashcanPage.getDocumentList().dataTablePage().checkRowByContentIsSelected(publicSite.entry.id);
|
||||
await trashcanPage.clickRestore();
|
||||
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
await waitActions.nodeIsPresent(publicSite.entry.guid);
|
||||
|
||||
await navigationBarPage.goToSite(publicSite);
|
||||
await contentServicesPage.waitForTableBody();
|
||||
|
||||
await contentServicesPage.checkContentIsDisplayed(siteFolder.entry.name);
|
||||
await contentServicesPage.openFolder(siteFolder.entry.name);
|
||||
await contentServicesPage.checkContentIsDisplayed(siteFile.entry.name);
|
||||
@@ -301,7 +305,7 @@ describe('Restore content directive', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.login(anotherAcsUser.username, anotherAcsUser.password);
|
||||
await uploadActions.createFolder(folderName, '-my-');
|
||||
await uploadActions.createFolder(testFolder.entry.name, '-my-');
|
||||
parentFolder = await uploadActions.createFolder(StringUtil.generateRandomString(5), '-my-');
|
||||
folderWithin = await uploadActions.createFolder(StringUtil.generateRandomString(5), parentFolder.entry.id);
|
||||
pdfFile = await uploadActions.uploadFile(pdfFileModel.location, pdfFileModel.name, folderWithin.entry.id);
|
||||
@@ -356,4 +360,5 @@ describe('Restore content directive', () => {
|
||||
await contentServicesPage.checkContentIsDisplayed(pngFile.entry.name);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
@@ -338,6 +338,7 @@ describe('Document List Component', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
for (let i = 0; i < folderCreated.length; i++) {
|
||||
await uploadActions.deleteFileOrFolder(folderCreated[i].entry.id);
|
||||
}
|
||||
|
@@ -47,6 +47,7 @@ describe('Document List Component', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(privateSite.entry.id, { permanent: true });
|
||||
});
|
||||
|
@@ -15,12 +15,21 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiService, LoginPage, StringUtil, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import {
|
||||
ApiService,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
WaitActions
|
||||
} from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
|
||||
import { ContentServicesPage } from '../core/pages/content-services.page';
|
||||
import { LockFilePage } from '../content-services/pages/lock-file.page';
|
||||
import { FileModel } from '../models/ACS/file.model';
|
||||
import { browser } from 'protractor';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
|
||||
describe('Lock File', () => {
|
||||
@@ -29,12 +38,13 @@ describe('Lock File', () => {
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const lockFilePage = new LockFilePage();
|
||||
const contentServices = new ContentServicesPage();
|
||||
|
||||
const adminUser = new UserModel();
|
||||
const managerUser = new UserModel();
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const waitActions = new WaitActions(apiService);
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
@@ -46,7 +56,7 @@ describe('Lock File', () => {
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG_B.file_path
|
||||
});
|
||||
|
||||
let nodeId, site, documentLibrary, lockedFileNodeId;
|
||||
let site, documentLibrary;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
@@ -72,35 +82,54 @@ describe('Lock File', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
await apiService.loginWithProfile('admin');
|
||||
try {
|
||||
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
} catch (e) {
|
||||
}
|
||||
});
|
||||
|
||||
describe('Lock file interaction with the UI', () => {
|
||||
|
||||
let pngLockedUploadedFile: NodeEntry;
|
||||
let pngUploadedFile: NodeEntry;
|
||||
|
||||
beforeAll(async () => {
|
||||
const pngLockedUploadedFile = await uploadActions.uploadFile(pngFileToLock.location, pngFileToLock.name, documentLibrary);
|
||||
pngLockedUploadedFile = await uploadActions.uploadFile(pngFileToLock.location, pngFileToLock.name, documentLibrary);
|
||||
|
||||
lockedFileNodeId = pngLockedUploadedFile.entry.id;
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
await loginPage.login(adminUser.username, adminUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
|
||||
pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
|
||||
await navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
await contentServices.waitForTableBody();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
try {
|
||||
await apiService.getInstance().core.nodesApi.unlockNode(pngUploadedFile.entry.id);
|
||||
await waitActions.nodeIsUnlock(pngUploadedFile.entry.id);
|
||||
} catch (e) {
|
||||
}
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
await apiService.getInstance().core.nodesApi.unlockNode(lockedFileNodeId);
|
||||
await uploadActions.deleteFileOrFolder(lockedFileNodeId);
|
||||
await apiService.loginWithProfile('admin');
|
||||
try {
|
||||
await apiService.getInstance().core.nodesApi.unlockNode(pngLockedUploadedFile.entry.id);
|
||||
} catch (e) {
|
||||
}
|
||||
try {
|
||||
await uploadActions.deleteFileOrFolder(pngUploadedFile.entry.id);
|
||||
} catch (e) {
|
||||
}
|
||||
try {
|
||||
await uploadActions.deleteFileOrFolder(pngLockedUploadedFile.entry.id);
|
||||
} catch (e) {
|
||||
}
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C286604] Should be able to open Lock file option by clicking the lock image', async () => {
|
||||
@@ -113,7 +142,6 @@ describe('Lock File', () => {
|
||||
|
||||
it('[C286625] Should be able to click Cancel to cancel lock file operation', async () => {
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
await lockFilePage.lockFileCheckboxText.waitVisible();
|
||||
await lockFilePage.cancelButton.click();
|
||||
|
||||
@@ -149,11 +177,11 @@ describe('Lock File', () => {
|
||||
|
||||
describe('Locked file without owner permissions', () => {
|
||||
|
||||
let pngUploadedFile: NodeEntry;
|
||||
|
||||
beforeEach(async () => {
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
|
||||
await loginPage.login(managerUser.username, managerUser.password);
|
||||
|
||||
@@ -164,8 +192,8 @@ describe('Lock File', () => {
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
|
||||
try {
|
||||
await apiService.getInstance().core.nodesApi.unlockNode(nodeId);
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
await apiService.getInstance().core.nodesApi.unlockNode(pngUploadedFile.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(pngUploadedFile.entry.id);
|
||||
} catch (error) {
|
||||
}
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
@@ -179,7 +207,7 @@ describe('Lock File', () => {
|
||||
await lockFilePage.saveButton.click();
|
||||
|
||||
try {
|
||||
await apiService.getInstance().core.nodesApi.deleteNode(nodeId);
|
||||
await apiService.getInstance().core.nodesApi.deleteNode(pngUploadedFile.entry.id);
|
||||
} catch (error) {
|
||||
await expect(error.status).toEqual(409);
|
||||
}
|
||||
@@ -193,7 +221,7 @@ describe('Lock File', () => {
|
||||
await lockFilePage.saveButton.click();
|
||||
|
||||
try {
|
||||
await apiService.getInstance().core.nodesApi.updateNode(nodeId, { name: 'My new name' });
|
||||
await apiService.getInstance().core.nodesApi.updateNode(pngUploadedFile.entry.id, { name: 'My new name' });
|
||||
|
||||
} catch (error) {
|
||||
await expect(error.status).toEqual(409);
|
||||
@@ -208,7 +236,7 @@ describe('Lock File', () => {
|
||||
await lockFilePage.saveButton.click();
|
||||
|
||||
try {
|
||||
await apiService.getInstance().core.nodesApi.moveNode(nodeId, { targetParentId: '-my-' });
|
||||
await apiService.getInstance().core.nodesApi.moveNode(pngUploadedFile.entry.id, { targetParentId: '-my-' });
|
||||
|
||||
} catch (error) {
|
||||
await expect(error.status).toEqual(409);
|
||||
@@ -223,8 +251,7 @@ describe('Lock File', () => {
|
||||
await lockFilePage.saveButton.click();
|
||||
|
||||
try {
|
||||
await apiService.getInstance().core.nodesApi.updateNodeContent(nodeId, 'NEW FILE CONTENT');
|
||||
|
||||
await apiService.getInstance().core.nodesApi.updateNodeContent(pngUploadedFile.entry.id, 'NEW FILE CONTENT');
|
||||
} catch (error) {
|
||||
await expect(error.status).toEqual(409);
|
||||
}
|
||||
@@ -232,39 +259,26 @@ describe('Lock File', () => {
|
||||
});
|
||||
|
||||
describe('Locked file with owner permissions', () => {
|
||||
let pngFileToBeLocked;
|
||||
|
||||
beforeAll(async () => {
|
||||
pngFileToBeLocked = await uploadActions.uploadFile(pngFileToLock.location, pngFileToLock.name, documentLibrary);
|
||||
lockedFileNodeId = pngFileToBeLocked.entry.id;
|
||||
});
|
||||
let pngFileToBeLocked: NodeEntry;
|
||||
let pngUploadedFile: NodeEntry;
|
||||
|
||||
beforeEach(async () => {
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
pngFileToBeLocked = await uploadActions.uploadFile(pngFileToLock.location, pngFileToLock.name, documentLibrary);
|
||||
pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, documentLibrary);
|
||||
await loginPage.login(adminUser.username, adminUser.password);
|
||||
await navigationBarPage.openContentServicesFolder(documentLibrary);
|
||||
await contentServices.getDocumentList().dataTable.waitTillContentLoaded();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C286614] Owner of the locked file should be able to rename if Allow owner to modify is checked', async () => {
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
await lockFilePage.lockFileCheckboxText.waitVisible();
|
||||
await lockFilePage.lockFileCheckbox.click();
|
||||
await lockFilePage.allowOwnerCheckbox.click();
|
||||
await lockFilePage.saveButton.click();
|
||||
|
||||
try {
|
||||
const response = await apiService.getInstance().core.nodesApi.updateNode(nodeId, { name: 'My new name' });
|
||||
await expect(response.entry.name).toEqual('My new name');
|
||||
} catch (error) {
|
||||
await uploadActions.deleteFileOrFolder(pngUploadedFile.entry.id);
|
||||
await uploadActions.deleteFileOrFolder(pngFileToBeLocked.entry.id);
|
||||
} catch (e) {
|
||||
}
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C286615] Owner of the locked file should be able to update a new version if Allow owner to modify is checked', async () => {
|
||||
@@ -276,7 +290,9 @@ describe('Lock File', () => {
|
||||
await lockFilePage.saveButton.click();
|
||||
|
||||
try {
|
||||
const response = await apiService.getInstance().core.nodesApi.updateNodeContent(nodeId, 'NEW FILE CONTENT');
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
|
||||
const response = await apiService.getInstance().core.nodesApi.updateNodeContent(pngUploadedFile.entry.id, 'NEW FILE CONTENT');
|
||||
await expect(response.entry.modifiedAt.getTime()).toBeGreaterThan(response.entry.createdAt.getTime());
|
||||
} catch (error) {
|
||||
}
|
||||
@@ -291,9 +307,10 @@ describe('Lock File', () => {
|
||||
await lockFilePage.saveButton.click();
|
||||
|
||||
try {
|
||||
await apiService.getInstance().core.nodesApi.moveNode(nodeId, { targetParentId: '-my-' });
|
||||
await apiService.login(adminUser.username, adminUser.password);
|
||||
await apiService.getInstance().core.nodesApi.moveNode(pngUploadedFile.entry.id, { targetParentId: '-my-' });
|
||||
|
||||
const movedFile = await apiService.getInstance().core.nodesApi.getNode(nodeId);
|
||||
const movedFile = await apiService.getInstance().core.nodesApi.getNode(pngUploadedFile.entry.id);
|
||||
|
||||
await expect(movedFile.entry.parentId).not.toEqual(documentLibrary);
|
||||
} catch (error) {
|
||||
@@ -311,5 +328,20 @@ describe('Lock File', () => {
|
||||
await contentServices.deleteContent(pngFileToBeLocked.entry.name);
|
||||
await contentServices.checkContentIsNotDisplayed(pngFileToBeLocked.entry.name);
|
||||
});
|
||||
|
||||
it('[C286614] Owner of the locked file should be able to rename if Allow owner to modify is checked', async () => {
|
||||
await contentServices.lockContent(pngFileModel.name);
|
||||
|
||||
await lockFilePage.lockFileCheckboxText.waitVisible();
|
||||
await lockFilePage.lockFileCheckbox.click();
|
||||
await lockFilePage.allowOwnerCheckbox.click();
|
||||
await lockFilePage.saveButton.click();
|
||||
|
||||
try {
|
||||
const response = await apiService.getInstance().core.nodesApi.updateNode(pngUploadedFile.entry.id, { name: 'My new name' });
|
||||
await expect(response.entry.name).toEqual('My new name');
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -95,6 +95,7 @@ describe('permissions', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
});
|
||||
|
||||
|
@@ -228,9 +228,10 @@ describe('Metadata component', () => {
|
||||
describe('Folder metadata', () => {
|
||||
|
||||
beforeAll(async () => {
|
||||
await uploadActions.createFolder(folderName, '-my-');
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await uploadActions.createFolder(folderName, '-my-');
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
@@ -65,12 +65,28 @@ export class TagPage {
|
||||
return this.addTagButton.isEnabled();
|
||||
}
|
||||
|
||||
checkTagIsDisplayedInTagList(tagName: string): Promise<void> {
|
||||
return TestElement.byText('div[id*="tag_name"]', tagName).waitVisible();
|
||||
async checkTagIsDisplayedInTagList(tagName: string): Promise<boolean> {
|
||||
try {
|
||||
await TestElement.byText('div[id*="tag_name"]', tagName).waitVisible();
|
||||
return true;
|
||||
} catch (error) {
|
||||
if (await this.showMoreButton.isDisplayed()) {
|
||||
await this.showMoreButton.click();
|
||||
await this.checkTagIsDisplayedInTagList(tagName);
|
||||
return true;
|
||||
} else {
|
||||
throw new Error('Error');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
checkTagIsNotDisplayedInTagList(tagName: string): Promise<void> {
|
||||
return TestElement.byText('div[id*="tag_name"]', tagName).waitNotVisible();
|
||||
async checkTagIsNotDisplayedInTagList(tagName: string): Promise<boolean> {
|
||||
try {
|
||||
await TestElement.byText('div[id*="tag_name"]', tagName).waitNotVisible();
|
||||
return true;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
checkTagIsNotDisplayedInTagListByNodeId(tagName: string): Promise<void> {
|
||||
|
@@ -95,7 +95,7 @@ describe('Permissions Component', () => {
|
||||
await usersActions.createUser(managerUser);
|
||||
await apiService.login(folderOwnerUser.username, folderOwnerUser.password);
|
||||
|
||||
await browser.sleep(15000);
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
||||
const publicSiteName = `PUBLIC_TEST_SITE_${StringUtil.generateRandomString(5)}`;
|
||||
|
||||
|
@@ -174,6 +174,7 @@ describe('Share file', () => {
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await BrowserActions.getUrl('/');
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
|
@@ -27,6 +27,7 @@ import {
|
||||
UserModel,
|
||||
UsersActions
|
||||
} from '@alfresco/adf-testing';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { ShareDialogPage } from '../../core/pages/dialog/share-dialog.page';
|
||||
@@ -35,23 +36,23 @@ import { browser } from 'protractor';
|
||||
|
||||
describe('Unshare file', () => {
|
||||
|
||||
const apiService = new ApiService();
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const contentListPage = contentServicesPage.getDocumentList();
|
||||
const navBar = new NavigationBarPage();
|
||||
const errorPage = new ErrorPage();
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const shareDialog = new ShareDialogPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const siteName = `PRIVATE-TEST-SITE-${StringUtil.generateRandomString(5)}`;
|
||||
let acsUser: UserModel;
|
||||
|
||||
let nodeBody, nodeId, testSite;
|
||||
let nodeBody, shareFilesSite;
|
||||
let pngUploadedFile: NodeEntry;
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
@@ -76,7 +77,7 @@ describe('Unshare file', () => {
|
||||
}
|
||||
};
|
||||
|
||||
testSite = await apiService.getInstance().core.sitesApi.createSite(site);
|
||||
shareFilesSite = await apiService.getInstance().core.sitesApi.createSite(site);
|
||||
|
||||
const docLibId = (await apiService.getInstance().core.sitesApi.getSiteContainers(siteName)).list.entries[0].entry.id;
|
||||
const testFile1Id = (await apiService.getInstance().core.nodesApi.addNode(docLibId, nodeBody)).entry.id;
|
||||
@@ -97,38 +98,33 @@ describe('Unshare file', () => {
|
||||
}
|
||||
});
|
||||
await apiService.getInstance().core.sharedlinksApi.addSharedLink({ nodeId: testFile1Id });
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
const pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
nodeId = pngUploadedFile.entry.id;
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navBar.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(testSite.entry.id, { permanent: true });
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(shareFilesSite.entry.id, { permanent: true });
|
||||
});
|
||||
|
||||
describe('with permission', () => {
|
||||
afterAll(async () => {
|
||||
|
||||
afterEach(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(nodeId);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await uploadActions.deleteFileOrFolder(pngUploadedFile.entry.id);
|
||||
});
|
||||
|
||||
it('[C286550] Should display unshare confirmation dialog', async () => {
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await browser.sleep(2000);
|
||||
await shareDialog.clickUnShareFile();
|
||||
await shareDialog.confirmationDialogIsDisplayed();
|
||||
beforeEach(async () => {
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, '-my-');
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await navBar.navigateToContentServices();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
it('[C286551] Should be able to cancel unshare action', async () => {
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.getDocumentList().selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.clickUnShareFile();
|
||||
@@ -137,8 +133,17 @@ describe('Unshare file', () => {
|
||||
await shareDialog.shareToggleButtonIsChecked();
|
||||
});
|
||||
|
||||
it('[C286550] Should display unshare confirmation dialog', async () => {
|
||||
await contentServicesPage.getDocumentList().selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await browser.sleep(2000);
|
||||
await shareDialog.clickUnShareFile();
|
||||
await shareDialog.confirmationDialogIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C286552] Should be able to confirm unshare action', async () => {
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.getDocumentList().selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await shareDialog.clickUnShareFile();
|
||||
@@ -148,7 +153,7 @@ describe('Unshare file', () => {
|
||||
});
|
||||
|
||||
it('[C280556] Should redirect to 404 when trying to access an unshared file', async () => {
|
||||
await contentListPage.selectRow(pngFileModel.name);
|
||||
await contentServicesPage.getDocumentList().selectRow(pngFileModel.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
await browser.sleep(2000);
|
||||
@@ -165,15 +170,14 @@ describe('Unshare file', () => {
|
||||
|
||||
describe('without permission', () => {
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(siteName, { permanent: true });
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
it('[C286555] Should NOT be able to unshare file without permission', async () => {
|
||||
await navBar.goToSite(testSite);
|
||||
await navBar.goToSite(shareFilesSite);
|
||||
await contentServicesPage.openFolder('documentLibrary');
|
||||
await contentListPage.selectRow(nodeBody.name);
|
||||
await contentServicesPage.getDocumentList().selectRow(nodeBody.name);
|
||||
await contentServicesPage.clickShareButton();
|
||||
|
||||
await shareDialog.checkDialogIsDisplayed();
|
||||
|
@@ -128,21 +128,6 @@ describe('Social component', () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
it('[C260324] Should be able to like and unlike a component', async () => {
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
await likePage.checkLikeCounter(0);
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
await likePage.clickLike();
|
||||
await likePage.checkLikeCounter(1);
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getLikedIconColor()).toBe(blueLikeColor);
|
||||
await likePage.clickUnlike();
|
||||
await likePage.checkLikeCounter(0);
|
||||
await likePage.removeHoverFromLikeButton();
|
||||
await expect(await likePage.getUnLikedIconColor()).toBe(greyLikeColor);
|
||||
});
|
||||
|
||||
it('[C310198] Should be able to rate and unRate a component', async () => {
|
||||
await socialPage.writeCustomNodeId(emptyFile.entry.id);
|
||||
await expect(await socialPage.getNodeIdFieldValue()).toEqual(emptyFile.entry.id);
|
||||
|
@@ -58,42 +58,43 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
||||
let pdfUploadedFile, pngUploadedFile, folder, acsUser;
|
||||
const folderName = StringUtil.generateRandomString(5);
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.login(browser.params.testConfig.users.admin.username, browser.params.testConfig.users.admin.password);
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
folder = await uploadActions.createFolder(folderName, '-my-');
|
||||
|
||||
pdfUploadedFile = await uploadActions.uploadFile(firstPdfFileModel.location, firstPdfFileModel.name, folder.entry.id);
|
||||
pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, folder.entry.id);
|
||||
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.appConfig.ecmHost,
|
||||
browser.params.testConfig.appConfig.oauth2.host,
|
||||
browser.params.testConfig.appConfig.identityHost, false, true, browser.params.testConfig.appConfig.oauth2.clientId);
|
||||
|
||||
await loginSsoPage.loginSSOIdentityService(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.openFolder(folderName);
|
||||
await contentListPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
try {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(folder.entry.id);
|
||||
await identityService.deleteIdentityUser(acsUser.email);
|
||||
} catch (error) {
|
||||
}
|
||||
await apiService.getInstance().logout();
|
||||
await browser.executeScript('window.sessionStorage.clear();');
|
||||
await browser.executeScript('window.localStorage.clear();');
|
||||
});
|
||||
|
||||
describe('SSO in ADF using ACS and AIS, implicit flow set', () => {
|
||||
beforeAll(async () => {
|
||||
await apiService.login(browser.params.testConfig.users.admin.username, browser.params.testConfig.users.admin.password);
|
||||
|
||||
acsUser = await usersActions.createUser();
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
folder = await uploadActions.createFolder(folderName, '-my-');
|
||||
|
||||
pdfUploadedFile = await uploadActions.uploadFile(firstPdfFileModel.location, firstPdfFileModel.name, folder.entry.id);
|
||||
pngUploadedFile = await uploadActions.uploadFile(pngFileModel.location, pngFileModel.name, folder.entry.id);
|
||||
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.appConfig.ecmHost,
|
||||
browser.params.testConfig.appConfig.oauth2.host,
|
||||
browser.params.testConfig.appConfig.identityHost, false, true, browser.params.testConfig.appConfig.oauth2.clientId);
|
||||
|
||||
await loginSsoPage.loginSSOIdentityService(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.navigateToContentServices();
|
||||
await contentServicesPage.checkAcsContainer();
|
||||
await contentServicesPage.openFolder(folderName);
|
||||
await contentListPage.waitForTableBody();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
try {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(folder.entry.id);
|
||||
await identityService.deleteIdentityUser(acsUser.email);
|
||||
} catch (error) {
|
||||
}
|
||||
await apiService.getInstance().logout();
|
||||
await browser.executeScript('window.sessionStorage.clear();');
|
||||
await browser.executeScript('window.localStorage.clear();');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await browser.refresh();
|
||||
|
@@ -125,14 +125,13 @@ describe('Upload - User permission', () => {
|
||||
|
||||
describe('full permissions', () => {
|
||||
beforeEach(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await navigationBarPage.openContentServicesFolder(managerSite.entry.guid);
|
||||
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
it('[C279917] Should be allowed to upload a file in a folder with manager permissions', async () => {
|
||||
await contentServicesPage.uploadFile(emptyFile.location);
|
||||
|
||||
await uploadDialog.fileIsUploaded(emptyFile.name);
|
||||
});
|
||||
});
|
||||
|
@@ -144,6 +144,7 @@ describe('Version component permissions', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().nodes.deleteNode(sameCreatorFile.id);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
@@ -215,6 +216,7 @@ describe('Version component permissions', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().nodes.deleteNode(sameCreatorFile.id);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
@@ -269,6 +271,7 @@ describe('Version component permissions', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().nodes.deleteNode(sameCreatorFile.id);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
@@ -640,10 +640,6 @@ export class ContentServicesPage {
|
||||
await this.siteListDropdown.checkOptionIsSelected(siteName);
|
||||
}
|
||||
|
||||
async selectSite(siteName: string): Promise<void> {
|
||||
await this.siteListDropdown.selectDropdownOption(siteName);
|
||||
}
|
||||
|
||||
async clickDownloadButton(): Promise<void> {
|
||||
await BrowserActions.closeMenuAndDialogs();
|
||||
await BrowserActions.click(this.downloadButton);
|
||||
|
@@ -112,6 +112,7 @@ describe('Viewer', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(otherFolderUploaded.entry.id);
|
||||
});
|
||||
|
||||
|
@@ -121,6 +121,7 @@ describe('Content Services Viewer', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(pdfFile.getId());
|
||||
await uploadActions.deleteFileOrFolder(protectedFile.getId());
|
||||
await uploadActions.deleteFileOrFolder(docxFile.getId());
|
||||
|
@@ -59,6 +59,7 @@ describe('Viewer', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(txtFileUploaded.entry.id);
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
@@ -70,6 +70,7 @@ describe('Viewer', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(pngFile.getId());
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
@@ -87,6 +87,7 @@ describe('Viewer', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
await uploadActions.deleteFileOrFolder(wordFileUploaded.entry.id);
|
||||
|
@@ -44,6 +44,7 @@ describe('Analytics Smoke Test', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(procUserModel.tenantId);
|
||||
});
|
||||
|
||||
|
@@ -144,25 +144,7 @@ describe('Attach File - Content service', () => {
|
||||
await widget.attachFileWidget().clickUploadButton(app.UPLOAD_FILE_FORM_CS.FIELD.widget_id);
|
||||
});
|
||||
|
||||
it('[C299040] Should display the login screen right, when user has access to 2 alfresco repositiories', async () => {
|
||||
const name = 'Attach file';
|
||||
await taskPage.createTask({ name, formName: app.UPLOAD_FILE_FORM_CS.formName });
|
||||
|
||||
await widget.attachFileWidget().clickUploadButton(app.UPLOAD_FILE_FORM_CS.FIELD.widget_id);
|
||||
await widget.attachFileWidget().selectUploadSource(csIntegrations[1]);
|
||||
|
||||
await externalNodeSelector.waitForLogInDialog();
|
||||
await expect(await externalNodeSelector.getTitle()).toEqual(`Sign into '${browser.params.testConfig.adf_external_acs.host}'`);
|
||||
await externalNodeSelector.login(user.username, user.password);
|
||||
|
||||
await externalNodeSelector.checkDialogIsDisplayed();
|
||||
await searchService.isSearchable(externalFile);
|
||||
await externalNodeSelector.searchAndSelectResult(externalFile, externalFile);
|
||||
await externalNodeSelector.clickMoveCopyButton();
|
||||
await widget.attachFileWidget().checkFileIsAttached(app.UPLOAD_FILE_FORM_CS.FIELD.widget_id, externalFile);
|
||||
});
|
||||
|
||||
it('[C286516] Able to upload a file when user has more than two alfresco repositories', async () => {
|
||||
it('[C286516][C299040] Able to upload a file when user has more than two alfresco repositories', async () => {
|
||||
const name = 'Attach file - multiple repo';
|
||||
await taskPage.createTask({ name, formName: app.UPLOAD_FILE_FORM_CS.formName });
|
||||
|
||||
|
@@ -37,7 +37,7 @@ describe('Comment component for Processes', () => {
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let user, appId, secondUser, newTaskId;
|
||||
let user, appId, secondUser;
|
||||
|
||||
const taskName = {
|
||||
completed_task: 'Test Completed',
|
||||
@@ -82,15 +82,13 @@ describe('Comment component for Processes', () => {
|
||||
it('[C212864] Should be able to add multiple comments on a single task using different users', async () => {
|
||||
const newTask = await apiService.getInstance().activiti.taskApi.createNewTask(new TaskRepresentation({ name: taskName.multiple_users }));
|
||||
|
||||
newTaskId = newTask.id;
|
||||
|
||||
await apiService.getInstance().activiti.taskApi.involveUser(newTaskId, { email: secondUser.email });
|
||||
await apiService.getInstance().activiti.taskApi.involveUser(newTask.id, { email: secondUser.email });
|
||||
|
||||
const taskComment = { message: 'Task Comment' };
|
||||
const secondTaskComment = { message: 'Second Task Comment' };
|
||||
|
||||
await apiService.getInstance().activiti.taskApi.addTaskComment(taskComment, newTaskId);
|
||||
await apiService.getInstance().activiti.taskApi.addTaskComment(secondTaskComment, newTaskId);
|
||||
await apiService.getInstance().activiti.taskApi.addTaskComment(taskComment, newTask.id);
|
||||
await apiService.getInstance().activiti.taskApi.addTaskComment(secondTaskComment, newTask.id);
|
||||
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickTasksButton();
|
||||
|
||||
@@ -98,7 +96,7 @@ describe('Comment component for Processes', () => {
|
||||
await taskPage.tasksListPage().selectRow(taskName.multiple_users);
|
||||
await taskPage.taskDetails().selectActivityTab();
|
||||
|
||||
const totalCommentsLatest = await apiService.getInstance().activiti.taskApi.getTaskComments(newTaskId, { 'latestFirst': true });
|
||||
const totalCommentsLatest = await apiService.getInstance().activiti.taskApi.getTaskComments(newTask.id, { 'latestFirst': true });
|
||||
|
||||
const thirdTaskComment = { message: 'Third Task Comment' };
|
||||
|
||||
@@ -119,7 +117,7 @@ describe('Comment component for Processes', () => {
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
await loginPage.login(secondUser.username, secondUser.password);
|
||||
|
||||
await apiService.getInstance().activiti.taskApi.addTaskComment(thirdTaskComment, newTaskId);
|
||||
await apiService.getInstance().activiti.taskApi.addTaskComment(thirdTaskComment, newTask.id);
|
||||
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickTasksButton();
|
||||
|
||||
@@ -127,7 +125,7 @@ describe('Comment component for Processes', () => {
|
||||
await taskPage.tasksListPage().selectRow(taskName.multiple_users);
|
||||
await taskPage.taskDetails().selectActivityTab();
|
||||
|
||||
const totalComments = await apiService.getInstance().activiti.taskApi.getTaskComments(newTaskId, { 'latestFirst': true });
|
||||
const totalComments = await apiService.getInstance().activiti.taskApi.getTaskComments(newTask.id, { 'latestFirst': true });
|
||||
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
await commentsPage.checkUserIconIsDisplayed();
|
||||
|
@@ -62,14 +62,15 @@ describe('Sorting for process filters', () => {
|
||||
appId = importedApp.id;
|
||||
|
||||
await loginPage.login(user.username, user.password);
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await apiService.getInstance().activiti.modelsApi.deleteModel(appId);
|
||||
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(tenantId);
|
||||
try {
|
||||
await apiService.getInstance().activiti.modelsApi.deleteModel(appId);
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiService.getInstance().activiti.adminTenantsApi.deleteTenant(tenantId);
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
@@ -80,9 +81,9 @@ describe('Sorting for process filters', () => {
|
||||
'filter': { 'sort': 'created-asc', 'name': '', 'state': 'running' }
|
||||
});
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
const firstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const secondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const thirdProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const firstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const secondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const thirdProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickProcessButton();
|
||||
|
||||
@@ -103,9 +104,9 @@ describe('Sorting for process filters', () => {
|
||||
});
|
||||
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
const firstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const secondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const thirdProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const firstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const secondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const thirdProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
|
||||
await apiService.getInstance().activiti.processInstancesApi.deleteProcessInstance(firstProc.id);
|
||||
await apiService.getInstance().activiti.processInstancesApi.deleteProcessInstance(secondProc.id);
|
||||
@@ -132,9 +133,9 @@ describe('Sorting for process filters', () => {
|
||||
});
|
||||
|
||||
const processUtil = new ProcessUtil(apiService);
|
||||
const firstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const secondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const thirdProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const firstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const secondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const thirdProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
|
||||
const deleteFirstProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
const deleteSecondProc = await processUtil.startProcessOfApp(importedApp.name);
|
||||
|
@@ -139,7 +139,7 @@ describe('Info Drawer', () => {
|
||||
await expect(await taskPage.taskDetails().getPriority()).toEqual('40');
|
||||
await taskPage.taskDetails().updatePriority();
|
||||
await taskPage.taskDetails().checkTaskDetailsDisplayed();
|
||||
await expect(await taskPage.taskDetails().getPriority()).toEqual('0');
|
||||
await expect(await taskPage.taskDetails().getPriority()).toEqual('');
|
||||
|
||||
await taskPage.taskDetails().clickCompleteFormTask();
|
||||
});
|
||||
|
@@ -17,8 +17,9 @@
|
||||
|
||||
import { ProcessServiceTabBarPage } from './process-service-tab-bar.page';
|
||||
|
||||
import { Locator, element, by } from 'protractor';
|
||||
import { Locator, element, by, browser } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from './tasks.page';
|
||||
|
||||
export class ProcessServicesPage {
|
||||
|
||||
@@ -34,6 +35,8 @@ export class ProcessServicesPage {
|
||||
async goToApp(applicationName: string): Promise<ProcessServiceTabBarPage> {
|
||||
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
await BrowserActions.click(app);
|
||||
const taskPage = new TasksPage();
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
return new ProcessServiceTabBarPage();
|
||||
}
|
||||
|
||||
@@ -42,6 +45,13 @@ export class ProcessServicesPage {
|
||||
return new ProcessServiceTabBarPage();
|
||||
}
|
||||
|
||||
async goToAppByAppId(appId: string): Promise<void> {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${appId}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
const taskPage = new TasksPage();
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
}
|
||||
|
||||
async getAppIconType(applicationName: string): Promise<string> {
|
||||
const app = element(by.css('mat-card[title="' + applicationName + '"]'));
|
||||
await BrowserVisibility.waitUntilElementIsVisible(app);
|
||||
|
@@ -220,7 +220,7 @@ export class TaskDetailsPage {
|
||||
async updatePriority(priority?: string): Promise<void> {
|
||||
await BrowserActions.click(this.priority);
|
||||
await BrowserActions.clearWithBackSpace(this.priority);
|
||||
await BrowserActions.clearSendKeys(element(by.css('input[data-automation-id="card-textitem-value-priority"]')), priority ? priority : ' ', 500);
|
||||
await BrowserActions.clearSendKeys(element(by.css('input[data-automation-id="card-textitem-value-priority"]')), priority, 500);
|
||||
await this.priority.sendKeys(Key.TAB);
|
||||
await browser.sleep(1000);
|
||||
}
|
||||
|
@@ -57,6 +57,7 @@ describe('Start Task - Task App', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await browser.refresh();
|
||||
await (await (await navigationBarPage.navigateToProcessServicesPage()).goToTaskApp()).clickTasksButton();
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
});
|
||||
@@ -108,6 +109,7 @@ describe('Start Task - Task App', () => {
|
||||
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
await taskPage.taskDetails().checkCompleteFormButtonIsDisplayed();
|
||||
|
||||
await taskPage.taskDetails().waitFormNameEqual(app.formName);
|
||||
});
|
||||
|
||||
|
@@ -98,6 +98,7 @@ describe('Start Process Component', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await apiServiceUserTwo.getInstance().activiti.modelsApi.deleteModel(appCreated.id);
|
||||
await apiServiceUserTwo.getInstance().activiti.modelsApi.deleteModel(simpleAppCreated.id);
|
||||
await apiServiceUserTwo.getInstance().activiti.modelsApi.deleteModel(dateFormAppCreated.id);
|
||||
|
@@ -36,6 +36,7 @@ import { TaskRepresentation } from '@alfresco/js-api';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
|
||||
describe('Task Details - Form', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const tasksListPage = new TasksListPage();
|
||||
const taskDetailsPage = new TaskDetailsPage();
|
||||
@@ -187,6 +188,7 @@ describe('Task Details - Form', () => {
|
||||
const form = await formActions.getFormByName(app.visibilityProcess.formName);
|
||||
await apiService.getInstance().activiti.taskApi.attachForm(newTask.id, { 'formId': form.id });
|
||||
|
||||
await browser.refresh();
|
||||
await (await new NavigationBarPage().navigateToProcessServicesPage()).goToTaskApp();
|
||||
await tasksListPage.checkTaskListIsLoaded();
|
||||
await filtersPage.goToFilter(CONSTANTS.TASK_FILTERS.INV_TASKS);
|
||||
|
@@ -56,6 +56,8 @@ describe('Amount Widget', () => {
|
||||
beforeEach(async() => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Attach Folder widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Attach Folder widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
let appModel;
|
||||
let deployedApp, process;
|
||||
@@ -62,8 +64,9 @@ describe('Attach Folder widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,7 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
|
||||
describe('Checkbox Widget', () => {
|
||||
|
||||
@@ -61,8 +61,7 @@ describe('Checkbox Widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Date and time widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Date and time widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('Date and time widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -30,6 +30,8 @@ import { browser } from 'protractor';
|
||||
import { FormDemoPage } from '.././pages/form-demo.page';
|
||||
import { customDateFormAPS1 } from '../../resources/forms/custom-date-form';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Date widget', () => {
|
||||
|
||||
@@ -38,6 +40,7 @@ describe('Date widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const dateWidget = widget.dateWidget();
|
||||
let appModel;
|
||||
@@ -72,8 +75,9 @@ describe('Date widget', () => {
|
||||
|
||||
describe('Simple App', () => {
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Document Template widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Document Template widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('Document Template widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Dropdown widget', () => {
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.DROPDOWN;
|
||||
@@ -34,6 +35,7 @@ describe('Dropdown widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -60,8 +62,9 @@ describe('Dropdown widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -28,6 +27,7 @@ import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
|
||||
describe('Dynamic Table widget ', () => {
|
||||
|
||||
@@ -62,8 +62,9 @@ describe('Dynamic Table widget ', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
@@ -118,8 +119,9 @@ describe('Dynamic Table widget ', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
@@ -172,8 +174,10 @@ describe('Dynamic Table widget ', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await loginPage.login(processUserModel.username, processUserModel.password);
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.tasksListPage().checkTaskListIsLoaded();
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Header widget', async () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Header widget', async () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('Header widget', async () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Hyperlink widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Hyperlink widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('Hyperlink widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Multi-line Widget', () => {
|
||||
const app = browser.params.resources.Files.WIDGET_CHECK_APP.MULTILINE_TEXT;
|
||||
@@ -34,6 +35,7 @@ describe('Multi-line Widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -60,8 +62,9 @@ describe('Multi-line Widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Number widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Number widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('Number widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('People widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('People widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('People widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
|
||||
describe('Radio Buttons Widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Radio Buttons Widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -62,8 +64,9 @@ describe('Radio Buttons Widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Text widget', () => {
|
||||
|
||||
@@ -35,6 +36,7 @@ describe('Text widget', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -61,8 +63,9 @@ describe('Text widget', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
@@ -84,12 +87,15 @@ describe('Text widget', () => {
|
||||
});
|
||||
|
||||
it('[C268170] Min-max length properties', async () => {
|
||||
await widget.textWidget().setValue(app.FIELD.simpleText, 'TEST');
|
||||
await widget.textWidget().setValue(app.FIELD.textMinMax, 'A');
|
||||
await expect(await widget.textWidget().getErrorMessage(app.FIELD.textMinMax)).toContain('Enter at least 4 characters');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonEnabled()).toEqual(false);
|
||||
await widget.textWidget().setValue(app.FIELD.textMinMax, 'AAAAAAAAAAA');
|
||||
await widget.textWidget().setValue(app.FIELD.textMinMax, '01234567890');
|
||||
await expect(await widget.textWidget().getErrorMessage(app.FIELD.textMinMax)).toContain('Enter no more than 10 characters');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonEnabled()).toEqual(false);
|
||||
await widget.textWidget().setValue(app.FIELD.textMinMax, '123456789');
|
||||
await expect(await taskPage.formFields().isCompleteFormButtonEnabled()).toEqual(true);
|
||||
});
|
||||
|
||||
it('[C268171] Input mask reversed checkbox properties', async () => {
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import {
|
||||
ApiService,
|
||||
ApplicationsUtil,
|
||||
BrowserActions,
|
||||
LoginPage,
|
||||
ProcessUtil,
|
||||
UsersActions,
|
||||
@@ -27,6 +26,8 @@ import {
|
||||
import { browser } from 'protractor';
|
||||
import { TasksPage } from '../pages/tasks.page';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { ProcessServicesPage } from '../pages/process-services.page';
|
||||
|
||||
const widgets = {
|
||||
textOneId: 'text1',
|
||||
@@ -57,6 +58,7 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
const widget = new Widget();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = new ApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
@@ -83,8 +85,8 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
const urlToNavigateTo = `${browser.baseUrl}/activiti/apps/${deployedApp.id}/tasks/`;
|
||||
await BrowserActions.getUrl(urlToNavigateTo);
|
||||
await navigationBarPage.clickHomeButton();
|
||||
await (new ProcessServicesPage()).goToAppByAppId(deployedApp.id);
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.MY_TASKS);
|
||||
await taskPage.formFields().checkFormIsDisplayed();
|
||||
});
|
||||
@@ -113,17 +115,6 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxVariableField);
|
||||
});
|
||||
|
||||
it('[C309649] Should be able to see Checkbox widget when visibility condition refers to a field and a form variable', async () => {
|
||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldVariable);
|
||||
|
||||
await widget.textWidget().setValue(widgets.textOneId, value.displayFieldVariableCheckbox);
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldVariable);
|
||||
|
||||
await widget.textWidget().setValue(widgets.textOneId, value.notDisplayCheckbox);
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldVariable);
|
||||
});
|
||||
|
||||
it('[C311425] Should be able to see Checkbox widget when visibility condition refers to a field and another field', async () => {
|
||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldField);
|
||||
@@ -135,6 +126,17 @@ describe('Process-Services - Visibility conditions', () => {
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldField);
|
||||
});
|
||||
|
||||
it('[C309649] Should be able to see Checkbox widget when visibility condition refers to a field and a form variable', async () => {
|
||||
await widget.textWidget().isWidgetVisible(widgets.textOneId);
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldVariable);
|
||||
|
||||
await widget.textWidget().setValue(widgets.textOneId, value.displayFieldVariableCheckbox);
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxFieldVariable);
|
||||
|
||||
await widget.textWidget().setValue(widgets.textOneId, value.notDisplayCheckbox);
|
||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkboxFieldVariable);
|
||||
});
|
||||
|
||||
it('[C311424] Should be able to see Checkbox widget when visibility condition refers to a variable with specific value', async () => {
|
||||
await widget.checkboxWidget().isCheckboxDisplayed(checkbox.checkboxVariableValue);
|
||||
});
|
||||
|
@@ -34,15 +34,16 @@ const LOG = !!process.env.LOG;
|
||||
|
||||
let arraySpecs = [];
|
||||
|
||||
console.log('Parallel e2e : ' + MAXINSTANCES);
|
||||
console.log('Max fail Retry: ', MAX_RETRIES);
|
||||
|
||||
if (LOG) {
|
||||
console.log('======= PROTRACTOR CONFIGURATION ====== ');
|
||||
console.log('HOST: ', HOST);
|
||||
console.log('BROWSER_RUN : ' + BROWSER_RUN);
|
||||
console.log('SAVE_SCREENSHOT : ' + SAVE_SCREENSHOT);
|
||||
console.log('FOLDER : ' + FOLDER);
|
||||
console.log('MAXINSTANCES : ' + MAXINSTANCES);
|
||||
console.log('LIST_SPECS : ' + LIST_SPECS);
|
||||
console.log('MAX_RETRIES: ', MAX_RETRIES);
|
||||
console.log('SELENIUM_SERVER : ' + SELENIUM_SERVER);
|
||||
}
|
||||
|
||||
@@ -191,7 +192,9 @@ exports.config = {
|
||||
}],
|
||||
|
||||
onCleanUp(results) {
|
||||
retry.onCleanUp(results);
|
||||
if (process.env.CI) {
|
||||
retry.onCleanUp(results);
|
||||
}
|
||||
},
|
||||
|
||||
async onPrepare() {
|
||||
|
@@ -70,7 +70,7 @@ describe('Search Sorting Picker', () => {
|
||||
|
||||
pngA = await uploadActions.uploadFile(pngAModel.location, pngAModel.name, '-my-');
|
||||
pngD = await uploadActions.uploadFile(pngDModel.location, pngDModel.name, '-my-');
|
||||
await browser.sleep(12000);
|
||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
@@ -87,6 +87,8 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
await Promise.all([
|
||||
uploadActions.deleteFileOrFolder(jpgFile.entry.id),
|
||||
uploadActions.deleteFileOrFolder(jpgFileSite.entry.id),
|
||||
@@ -228,6 +230,7 @@ describe('Search Component - Multi-Select Facet', () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(txtFile.entry.id);
|
||||
await apiService.getInstance().core.sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
});
|
||||
|
Reference in New Issue
Block a user