mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
Increase timeout and modify login async (#4795)
* increase timeout and modify login async * run e2e if testing is changed * improve cdk fix * fix travis update projects * disable ghostMode lite server * lint fix * fix timeout * multiple try * Update content-services-e2e.sh * Update search-e2e.sh * Update process-services-e2e.sh * Update core-e2e.sh * Update protractor.conf.ts * fix unit * remove async * increqase notification time * 3 parallel * dix path issue in save * small refactor protractor ts * fix save * create license check first script adf cli * modify regex check * refactor notification history component * decrease notification * fix notification message problem * fix test * update packages wit high risk * revert cahnge login sso e2e * fix dep * fix documentation duplication and issue * fix after review * fix after review * try 6 parallel test * back to 3 parallel test no real time improve with 6
This commit is contained in:
@@ -15,12 +15,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, NotificationHistoryPage } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { CreateFolderDialog } from '../../pages/adf/dialog/createFolderDialog';
|
||||
import { NotificationPage } from '../../pages/adf/notificationPage';
|
||||
import { MetadataViewPage } from '../../pages/adf/metadataViewPage';
|
||||
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser, Key } from 'protractor';
|
||||
@@ -30,7 +28,7 @@ describe('Create folder directive', function () {
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const createFolderDialog = new CreateFolderDialog();
|
||||
const notificationPage = new NotificationPage();
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
const metadataViewPage = new MetadataViewPage();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
@@ -91,7 +89,7 @@ describe('Create folder directive', function () {
|
||||
|
||||
contentServicesPage.createNewFolder(folderName);
|
||||
|
||||
notificationPage.checkNotifyContains('There\'s already a folder with this name. Try a different name.');
|
||||
notificationHistoryPage.checkNotifyContains('There\'s already a folder with this name. Try a different name.');
|
||||
});
|
||||
|
||||
it('[C260157] Should be possible create a folder under a folder with the same name', () => {
|
||||
|
||||
@@ -24,7 +24,7 @@ import { browser } from 'protractor';
|
||||
describe('Notifications Component', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const notificationPage = new NotificationPage();
|
||||
const notificationHistoryPage = new NotificationPage();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
@@ -43,74 +43,74 @@ describe('Notifications Component', () => {
|
||||
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
notificationPage.goToNotificationsPage();
|
||||
notificationHistoryPage.goToNotificationsPage();
|
||||
|
||||
notificationPage.enterDurationField(3000);
|
||||
notificationHistoryPage.enterDurationField(3000);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterEach( () => {
|
||||
browser.executeScript(`document.querySelector('button[data-automation-id="notification-custom-dismiss-button"]').click();`);
|
||||
notificationPage.enterDurationField(3000);
|
||||
notificationHistoryPage.enterDurationField(3000);
|
||||
});
|
||||
|
||||
it('[C279977] Should show notification when the message is not empty and button is clicked', () => {
|
||||
notificationPage.enterMessageField('Notification test');
|
||||
notificationPage.clickNotificationButton();
|
||||
notificationPage.checkNotificationSnackBarIsDisplayedWithMessage('Notification test');
|
||||
notificationHistoryPage.enterMessageField('Notification test');
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.checkNotificationSnackBarIsDisplayedWithMessage('Notification test');
|
||||
});
|
||||
|
||||
it('[C279979] Should not show notification when the message is empty and button is clicked', () => {
|
||||
notificationPage.clearMessage();
|
||||
notificationPage.clickNotificationButton();
|
||||
notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
notificationHistoryPage.clearMessage();
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C279978] Should show notification with action when the message is not empty and button is clicked', () => {
|
||||
notificationPage.enterMessageField('Notification test');
|
||||
notificationPage.clickActionToggle();
|
||||
notificationPage.clickNotificationButton();
|
||||
notificationPage.checkNotificationSnackBarIsDisplayedWithMessage('Notification test');
|
||||
notificationPage.clickActionButton();
|
||||
notificationPage.checkActionEvent();
|
||||
notificationPage.clickActionToggle();
|
||||
notificationHistoryPage.enterMessageField('Notification test');
|
||||
notificationHistoryPage.clickActionToggle();
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.checkNotificationSnackBarIsDisplayedWithMessage('Notification test');
|
||||
notificationHistoryPage.clickActionButton();
|
||||
notificationHistoryPage.checkActionEvent();
|
||||
notificationHistoryPage.clickActionToggle();
|
||||
});
|
||||
|
||||
it('[C279981] Should show notification with action when the message is not empty and custom configuration button is clicked', () => {
|
||||
notificationPage.enterMessageField('Notification test');
|
||||
notificationPage.clickNotificationButton();
|
||||
notificationPage.checkNotificationSnackBarIsDisplayed();
|
||||
notificationHistoryPage.enterMessageField('Notification test');
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.checkNotificationSnackBarIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C279987] Should show custom notification during a limited time when a duration is added', () => {
|
||||
notificationPage.enterMessageField('Notification test');
|
||||
notificationPage.enterDurationField(1000);
|
||||
notificationPage.clickNotificationButton();
|
||||
notificationPage.checkNotificationSnackBarIsDisplayed();
|
||||
notificationHistoryPage.enterMessageField('Notification test');
|
||||
notificationHistoryPage.enterDurationField(1000);
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.checkNotificationSnackBarIsDisplayed();
|
||||
browser.sleep(1500);
|
||||
notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
notificationHistoryPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C280000] Should show notification with action when the message is not empty and custom button is clicked', () => {
|
||||
notificationPage.enterMessageField('Notification test');
|
||||
notificationPage.clickActionToggle();
|
||||
notificationPage.clickNotificationButton();
|
||||
notificationPage.checkNotificationSnackBarIsDisplayedWithMessage('Notification test');
|
||||
notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
notificationPage.clickNotificationButton();
|
||||
notificationPage.clickActionButton();
|
||||
notificationPage.checkActionEvent();
|
||||
notificationPage.clickActionToggle();
|
||||
notificationHistoryPage.enterMessageField('Notification test');
|
||||
notificationHistoryPage.clickActionToggle();
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.checkNotificationSnackBarIsDisplayedWithMessage('Notification test');
|
||||
notificationHistoryPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
notificationHistoryPage.clickActionButton();
|
||||
notificationHistoryPage.checkActionEvent();
|
||||
notificationHistoryPage.clickActionToggle();
|
||||
});
|
||||
|
||||
it('[C280001] Should meet configuration when a custom notification is set', () => {
|
||||
notificationPage.enterMessageField('Notification test');
|
||||
notificationPage.enterDurationField(1000);
|
||||
notificationPage.selectHorizontalPosition('Right');
|
||||
notificationPage.selectVerticalPosition('Top');
|
||||
notificationPage.selectDirection('Left to right');
|
||||
notificationPage.clickNotificationButton();
|
||||
expect(notificationPage.getConfigObject()).toBe('{"direction": "ltr", "duration": "1000", "horizontalPosition": "right", "verticalPosition": "top"}');
|
||||
notificationHistoryPage.enterMessageField('Notification test');
|
||||
notificationHistoryPage.enterDurationField(1000);
|
||||
notificationHistoryPage.selectHorizontalPosition('Right');
|
||||
notificationHistoryPage.selectVerticalPosition('Top');
|
||||
notificationHistoryPage.selectDirection('Left to right');
|
||||
notificationHistoryPage.clickNotificationButton();
|
||||
expect(notificationHistoryPage.getConfigObject()).toBe('{"direction": "ltr", "duration": "1000", "horizontalPosition": "right", "verticalPosition": "top"}');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -16,18 +16,16 @@
|
||||
*/
|
||||
|
||||
import { PermissionsPage } from '../../pages/adf/permissionsPage';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
import resources = require('../../util/resources');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import { StringUtil, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { StringUtil, BrowserActions, LoginPage, NotificationHistoryPage } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { FolderModel } from '../../models/ACS/folderModel';
|
||||
import { ViewerPage } from '../../pages/adf/viewerPage';
|
||||
import { NotificationPage } from '../../pages/adf/notificationPage';
|
||||
import { MetadataViewPage } from '../../pages/adf/metadataViewPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
||||
@@ -44,7 +42,7 @@ describe('Permissions Component', function () {
|
||||
|
||||
const viewerPage = new ViewerPage();
|
||||
const metadataViewPage = new MetadataViewPage();
|
||||
const notificationPage = new NotificationPage();
|
||||
const notificationPage = new NotificationHistoryPage();
|
||||
const uploadDialog = new UploadDialog();
|
||||
let fileOwnerUser, filePermissionUser, file;
|
||||
const fileModel = new FileModel({
|
||||
@@ -300,8 +298,12 @@ describe('Permissions Component', function () {
|
||||
|
||||
afterEach(async (done) => {
|
||||
|
||||
await uploadActions.deleteFilesOrFolder(alfrescoJsApi, file.entry.id);
|
||||
try {
|
||||
await uploadActions.deleteFilesOrFolder(alfrescoJsApi, file.entry.id);
|
||||
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
done();
|
||||
|
||||
});
|
||||
@@ -587,7 +589,6 @@ describe('Permissions Component', function () {
|
||||
permissionsPage.clickPermissionInheritedButton();
|
||||
|
||||
notificationPage.checkNotifyContains('You are not allowed to change permissions');
|
||||
notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
|
||||
permissionsPage.clickAddPermissionButton();
|
||||
|
||||
|
||||
@@ -23,10 +23,9 @@ import resources = require('../../util/resources');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
import { StringUtil, NotificationHistoryPage } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { ViewerPage } from '../../pages/adf/viewerPage';
|
||||
import { NotificationPage } from '../../pages/adf/notificationPage';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import { MetadataViewPage } from '../../pages/adf/metadataViewPage';
|
||||
import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
||||
@@ -44,7 +43,7 @@ describe('Permissions Component', function () {
|
||||
const viewerPage = new ViewerPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const metadataViewPage = new MetadataViewPage();
|
||||
const notificationPage = new NotificationPage();
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
const uploadDialog = new UploadDialog();
|
||||
|
||||
let folderOwnerUser, consumerUser, siteConsumerUser, contributorUser, managerUser, collaboratorUser;
|
||||
@@ -224,11 +223,11 @@ describe('Permissions Component', function () {
|
||||
|
||||
contentServicesPage.metadataContent('Site' + fileModel.name);
|
||||
|
||||
notificationPage.checkNotifyContains('You don\'t have access to do this.');
|
||||
notificationHistoryPage.checkNotifyContains('You don\'t have access to do this.');
|
||||
|
||||
contentServicesPage.uploadFile(fileModel.location);
|
||||
|
||||
notificationPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
|
||||
});
|
||||
|
||||
@@ -254,7 +253,7 @@ describe('Permissions Component', function () {
|
||||
|
||||
contentServicesPage.metadataContent('Site' + fileModel.name);
|
||||
|
||||
notificationPage.checkNotifyContains('You don\'t have access to do this.');
|
||||
notificationHistoryPage.checkNotifyContains('You don\'t have access to do this.');
|
||||
|
||||
contentServicesPage.uploadFile(testFileModel.location).checkContentIsDisplayed(testFileModel.name);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, BrowserActions, LocalStorageUtil } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, LocalStorageUtil, NotificationHistoryPage } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { ViewerPage } from '../../pages/adf/viewerPage';
|
||||
@@ -38,6 +38,7 @@ describe('Share file', () => {
|
||||
const shareDialog = new ShareDialog();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
const uploadActions = new UploadActions();
|
||||
@@ -101,7 +102,7 @@ describe('Share file', () => {
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickShareLinkButton();
|
||||
shareDialog.checkNotificationWithMessage('Link copied to the clipboard');
|
||||
notificationHistoryPage.checkNotifyContains('Link copied to the clipboard');
|
||||
});
|
||||
|
||||
it('[C286543] Should be possible to close Share dialog', () => {
|
||||
@@ -179,7 +180,7 @@ describe('Share file', () => {
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickShareLinkButton();
|
||||
shareDialog.checkNotificationWithMessage('Link copied to the clipboard');
|
||||
notificationHistoryPage.checkNotifyContains('Link copied to the clipboard');
|
||||
const sharedLink = await shareDialog.getShareLink();
|
||||
BrowserActions.getUrl(sharedLink);
|
||||
viewerPage.checkFileNameIsDisplayed(pngFileModel.name);
|
||||
@@ -190,13 +191,13 @@ describe('Share file', () => {
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickShareLinkButton();
|
||||
shareDialog.checkNotificationWithMessage('Link copied to the clipboard');
|
||||
notificationHistoryPage.checkNotifyContains('Link copied to the clipboard');
|
||||
const sharedLink = await shareDialog.getShareLink();
|
||||
shareDialog.clickCloseButton();
|
||||
contentServicesPage.clickShareButton();
|
||||
shareDialog.checkDialogIsDisplayed();
|
||||
shareDialog.clickShareLinkButton();
|
||||
shareDialog.checkNotificationWithMessage('Link copied to the clipboard');
|
||||
notificationHistoryPage.checkNotifyContains('Link copied to the clipboard');
|
||||
const secondSharedLink = await shareDialog.getShareLink();
|
||||
expect(sharedLink).toEqual(secondSharedLink);
|
||||
BrowserActions.getUrl(sharedLink);
|
||||
|
||||
@@ -17,14 +17,11 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { StringUtil, LoginPage, NotificationHistoryPage } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
||||
import { UploadToggles } from '../../pages/adf/dialog/uploadToggles';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { NotificationPage } from '../../pages/adf/notificationPage';
|
||||
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
@@ -45,7 +42,7 @@ describe('Upload - User permission', () => {
|
||||
let acsUser;
|
||||
let acsUserTwo;
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const notificationPage = new NotificationPage();
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
|
||||
const emptyFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
|
||||
@@ -169,7 +166,7 @@ describe('Upload - User permission', () => {
|
||||
|
||||
contentServicesPage.uploadFile(emptyFile.location);
|
||||
|
||||
notificationPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
});
|
||||
|
||||
xit('[C279916] Should not be allowed to upload a folder in folder with consumer permissions', () => {
|
||||
@@ -194,7 +191,7 @@ describe('Upload - User permission', () => {
|
||||
|
||||
contentServicesPage.uploadFolder(folder.location);
|
||||
|
||||
notificationPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { VersionManagePage } from '../../pages/adf/versionManagerPage';
|
||||
import { UploadDialog } from '../../pages/adf/dialog/uploadDialog';
|
||||
import { NotificationPage } from '../../pages/adf/notificationPage';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
@@ -34,7 +33,7 @@ import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import { NodeActions } from '../../actions/ACS/node.actions';
|
||||
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
import { StringUtil, NotificationHistoryPage } from '@alfresco/adf-testing';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
|
||||
describe('Version component permissions', () => {
|
||||
@@ -43,7 +42,7 @@ describe('Version component permissions', () => {
|
||||
const versionManagePage = new VersionManagePage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const uploadDialog = new UploadDialog();
|
||||
const notificationPage = new NotificationPage();
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
const contentServices = new ContentServicesPage();
|
||||
let site;
|
||||
|
||||
@@ -198,7 +197,7 @@ describe('Version component permissions', () => {
|
||||
it('[C277197] Should a user with Consumer permission not be able to upload a new version for a file with different creator', () => {
|
||||
contentServices.versionManagerContent(differentCreatorFile.name);
|
||||
|
||||
notificationPage.checkNotifyContains(`You don't have access to do this`);
|
||||
notificationHistoryPage.checkNotifyContains(`You don't have access to do this`);
|
||||
});
|
||||
|
||||
it('[C277201] Should a user with Consumer permission not be able to upload a new version for a locked file', () => {
|
||||
@@ -259,7 +258,7 @@ describe('Version component permissions', () => {
|
||||
it('[C277198] Should a user with Contributor permission not be able to upload a new version for a file with different creator', () => {
|
||||
contentServices.versionManagerContent(differentCreatorFile.name);
|
||||
|
||||
notificationPage.checkNotifyContains(`You don't have access to do this`);
|
||||
notificationHistoryPage.checkNotifyContains(`You don't have access to do this`);
|
||||
});
|
||||
|
||||
it('[C277202] Should be disabled the option for a locked file', () => {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, NotificationHistoryPage } from '@alfresco/adf-testing';
|
||||
import { DataTablePage } from '../../pages/adf/demo-shell/dataTablePage';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
@@ -23,7 +23,6 @@ import { browser } from 'protractor';
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { NotificationPage } from '../../pages/adf/notificationPage';
|
||||
import { DropActions } from '../../actions/drop.actions';
|
||||
import resources = require('../../util/resources');
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
@@ -37,7 +36,7 @@ describe('Datatable component', () => {
|
||||
const acsUser = new AcsUserModel();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const dataTableComponent = new DataTableComponentPage();
|
||||
const notificationPage = new NotificationPage();
|
||||
const notificationHistoryPage = new NotificationHistoryPage();
|
||||
const dragAndDrop = new DropActions();
|
||||
const pngFile = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
@@ -118,23 +117,23 @@ describe('Datatable component', () => {
|
||||
dataTablePage.mouseOverNameColumn('Name 2');
|
||||
dataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
dataTablePage.clickOnNameColumn('Name 2');
|
||||
notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
notificationHistoryPage.checkNotifyNotContains('Name 2');
|
||||
});
|
||||
|
||||
it('[C307046] No tooltip is displayed when hover over a column that has default value for copyContent property', () => {
|
||||
dataTablePage.mouseOverCreatedByColumn('Created One');
|
||||
dataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
dataTablePage.clickOnCreatedByColumn('Created One');
|
||||
notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
notificationHistoryPage.checkNotifyNotContains('Created One');
|
||||
});
|
||||
|
||||
it('[C307040] A column value with copyContent set to true is copied when clicking on it', () => {
|
||||
dataTablePage.mouseOverIdColumn('1');
|
||||
expect(dataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
dataTablePage.clickOnIdColumn('1');
|
||||
notificationPage.checkNotifyContains('Text copied to clipboard');
|
||||
notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
dataTablePage.clickOnIdColumn('2');
|
||||
notificationPage.checkNotifyContains('Text copied to clipboard');
|
||||
notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
dataTablePage.pasteClipboard();
|
||||
expect(dataTablePage.getClipboardInputText()).toEqual('2');
|
||||
});
|
||||
@@ -150,23 +149,23 @@ describe('Datatable component', () => {
|
||||
copyContentDataTablePage.mouseOverNameColumn('Second');
|
||||
copyContentDataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
copyContentDataTablePage.clickOnNameColumn('Second');
|
||||
notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
notificationHistoryPage.checkNotifyNotContains('Second');
|
||||
});
|
||||
|
||||
it('[C307075] No tooltip is displayed when hover over a column that has default value for copyContent property', () => {
|
||||
copyContentDataTablePage.mouseOverCreatedByColumn('Created one');
|
||||
copyContentDataTablePage.dataTable.copyContentTooltipIsNotDisplayed();
|
||||
copyContentDataTablePage.clickOnCreatedByColumn('Created one');
|
||||
notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
notificationHistoryPage.checkNotifyNotContains('Created One');
|
||||
});
|
||||
|
||||
it('[C307073] A column value with copyContent set to true is copied when clicking on it', () => {
|
||||
copyContentDataTablePage.mouseOverIdColumn('1');
|
||||
expect(copyContentDataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
copyContentDataTablePage.clickOnIdColumn('1');
|
||||
notificationPage.checkNotifyContains('Text copied to clipboard');
|
||||
notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
copyContentDataTablePage.clickOnIdColumn('2');
|
||||
notificationPage.checkNotifyContains('Text copied to clipboard');
|
||||
notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
copyContentDataTablePage.pasteClipboard();
|
||||
expect(copyContentDataTablePage.getClipboardInputText()).toEqual('2');
|
||||
});
|
||||
@@ -175,7 +174,7 @@ describe('Datatable component', () => {
|
||||
dataTablePage.mouseOverIdColumn('1');
|
||||
expect(dataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
dataTablePage.clickOnIdColumn('1');
|
||||
notificationPage.checkNotifyContains('Text copied to clipboard');
|
||||
notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
dataTablePage.pasteClipboard();
|
||||
expect(dataTablePage.getClipboardInputText()).toEqual('1');
|
||||
});
|
||||
@@ -185,7 +184,7 @@ describe('Datatable component', () => {
|
||||
copyContentDataTablePage.mouseOverJsonColumn(2);
|
||||
expect(copyContentDataTablePage.getCopyContentTooltip()).toEqual('Click to copy');
|
||||
copyContentDataTablePage.clickOnJsonColumn(2);
|
||||
notificationPage.checkNotifyContains('Text copied to clipboard');
|
||||
notificationHistoryPage.checkNotifyContains('Text copied to clipboard');
|
||||
copyContentDataTablePage.pasteClipboard();
|
||||
expect(copyContentDataTablePage.getClipboardInputText()).toContain(jsonValue);
|
||||
});
|
||||
@@ -201,12 +200,11 @@ describe('Datatable component', () => {
|
||||
it('[C307984] Should trigger the event handling header-drop and cell-drop', () => {
|
||||
const dragAndDropHeader = dragAndDropDataTablePage.getDropTargetIdColumnHeader();
|
||||
dragAndDrop.dropFile(dragAndDropHeader, pngFile.location);
|
||||
notificationPage.checkNotifyContains('Dropped data on [ id ] header');
|
||||
notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||
notificationHistoryPage.checkNotifyContains('Dropped data on [ id ] header');
|
||||
|
||||
const dragAndDropCell = dragAndDropDataTablePage.getDropTargetIdColumnCell(1);
|
||||
dragAndDrop.dropFile(dragAndDropCell, pngFile.location);
|
||||
notificationPage.checkNotifyContains('Dropped data on [ id ] cell');
|
||||
notificationHistoryPage.checkNotifyContains('Dropped data on [ id ] cell');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -55,12 +55,17 @@ describe('Login component - SSO', () => {
|
||||
|
||||
describe('SSO Login Error for login component', () => {
|
||||
|
||||
it('[C299205] Should display the login error message when the SSO identity service is wrongly configured', async () => {
|
||||
await settingsPage.setProviderEcmSso(browser.params.testConfig.adf.url,
|
||||
afterEach(() => {
|
||||
browser.executeScript('window.sessionStorage.clear();');
|
||||
browser.executeScript('window.localStorage.clear();');
|
||||
});
|
||||
|
||||
it('[C299205] Should display the login error message when the SSO identity service is wrongly configured', () => {
|
||||
settingsPage.setProviderEcmSso(browser.params.testConfig.adf.url,
|
||||
'http://aps22/auth/realms/alfresco',
|
||||
browser.params.testConfig.adf.hostIdentity, false, true, 'alfresco');
|
||||
await loginSSOPage.clickOnSSOButton();
|
||||
await loginSSOPage.checkLoginErrorIsDisplayed();
|
||||
loginSSOPage.clickOnSSOButton();
|
||||
loginSSOPage.checkLoginErrorIsDisplayed();
|
||||
expect(loginSSOPage.getLoginErrorMessage()).toContain('SSO Authentication server unreachable');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,19 +7,20 @@ let targetProxy = (PROXY_HOST_ADF || HOST);
|
||||
let fallback = require('connect-history-api-fallback');
|
||||
|
||||
module.exports = {
|
||||
ghostMode : false,
|
||||
'port': 4200,
|
||||
open: false,
|
||||
server: {
|
||||
middleware: {
|
||||
1: proxy('/alfresco', {
|
||||
target: targetProxy,
|
||||
"target": targetProxy,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
"^/alfresco/alfresco": ""
|
||||
}
|
||||
}),
|
||||
2: proxy('/activiti-app', {
|
||||
target: targetProxy,
|
||||
"target": targetProxy,
|
||||
changeOrigin: true,
|
||||
"pathRewrite": {
|
||||
"^/activiti-app/activiti-app": ""
|
||||
|
||||
@@ -172,7 +172,7 @@ export class DataTablePage {
|
||||
}
|
||||
|
||||
clickOnJsonColumn(rowNumber) {
|
||||
return this.dataTable.clickElement(this.dataTable.getCellByRowNumberAndColumnName(rowNumber - 1, this.columns.json));
|
||||
return BrowserActions.click(this.dataTable.getCellByRowNumberAndColumnName(rowNumber - 1, this.columns.json));
|
||||
}
|
||||
|
||||
clickOnNameColumn(name) {
|
||||
|
||||
@@ -164,6 +164,7 @@ export class TaskListDemoPage {
|
||||
}
|
||||
|
||||
clickResetButton() {
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
BrowserActions.click(this.resetButton);
|
||||
}
|
||||
|
||||
|
||||
@@ -83,12 +83,6 @@ export class ShareDialog {
|
||||
BrowserVisibility.waitUntilElementIsPresent(this.shareToggleDisabled);
|
||||
}
|
||||
|
||||
checkNotificationWithMessage(message) {
|
||||
BrowserVisibility.waitUntilElementIsPresent(
|
||||
element(by.cssContainingText('simple-snack-bar', message))
|
||||
);
|
||||
}
|
||||
|
||||
dialogIsClosed() {
|
||||
BrowserVisibility.waitUntilElementIsStale(this.shareDialog);
|
||||
}
|
||||
|
||||
@@ -30,8 +30,7 @@ export class FiltersPage {
|
||||
|
||||
goToFilter(filterName) {
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
const filter = element(by.css(`span[data-automation-id="${filterName}_filter"]`));
|
||||
BrowserActions.click(filter);
|
||||
BrowserActions.clickExecuteScript(`span[data-automation-id="${filterName}_filter"]`);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -139,6 +139,7 @@ export class TaskDetailsPage {
|
||||
}
|
||||
|
||||
clickForm() {
|
||||
BrowserActions.closeMenuAndDialogs();
|
||||
BrowserActions.click(this.formNameField);
|
||||
}
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ describe('Attachment list action menu for processes', () => {
|
||||
|
||||
viewerPage.checkFileNameIsDisplayed(pngFile.name);
|
||||
viewerPage.clickCloseButton();
|
||||
browser.sleep(10000);
|
||||
|
||||
processFiltersPage.clickRunningFilterButton();
|
||||
processFiltersPage.selectFromProcessList(processName.active);
|
||||
|
||||
@@ -140,7 +140,6 @@ describe('Attachment list action menu for processes', () => {
|
||||
attachmentListPage.clickAttachFileButton(pngFile.location);
|
||||
|
||||
processDetailsPage.clickCancelProcessButton();
|
||||
browser.sleep(10000);
|
||||
processFiltersPage.clickCompletedFilterButton();
|
||||
|
||||
processDetailsPage.checkProcessTitleIsDisplayed();
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"id":"process-c5040521-f596-4748-b3c5-15c8b9868906","extensions":{"properties":{"7cf99919-ca35-41a5-a7b0-289e05d44604":{"id":"7cf99919-ca35-41a5-a7b0-289e05d44604","name":"nameString","type":"string","required":true,"value":"string"},"059e303d-07d6-4fbc-9121-557419db3ca8":{"id":"059e303d-07d6-4fbc-9121-557419db3ca8","name":"name","type":"date","required":true,"value":"date"}},"mappings":{}}}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://bpmn.io/schema/bpmn" id="sample-diagram" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
|
||||
<process id="process-c5040521-f596-4748-b3c5-15c8b9868906" name="processwithvariables" isExecutable="true">
|
||||
<startEvent id="StartEvent_1"></startEvent>
|
||||
<sequenceFlow id="SequenceFlow_0yx7uuw" sourceRef="StartEvent_1" targetRef="Task_13kpt3a"></sequenceFlow>
|
||||
<userTask id="Task_13kpt3a" name="taskVariable"></userTask>
|
||||
<endEvent id="EndEvent_1whqpi5"></endEvent>
|
||||
<sequenceFlow id="SequenceFlow_1a3uiw2" sourceRef="Task_13kpt3a" targetRef="EndEvent_1whqpi5"></sequenceFlow>
|
||||
</process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_process-c5040521-f596-4748-b3c5-15c8b9868906">
|
||||
<bpmndi:BPMNPlane bpmnElement="process-c5040521-f596-4748-b3c5-15c8b9868906" id="BPMNPlane_process-c5040521-f596-4748-b3c5-15c8b9868906">
|
||||
<bpmndi:BPMNShape bpmnElement="StartEvent_1" id="BPMNShape_StartEvent_1">
|
||||
<omgdc:Bounds height="36.0" width="36.0" x="412.0" y="240.0"></omgdc:Bounds>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape bpmnElement="Task_13kpt3a" id="BPMNShape_Task_13kpt3a">
|
||||
<omgdc:Bounds height="80.0" width="100.0" x="498.0" y="218.0"></omgdc:Bounds>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape bpmnElement="EndEvent_1whqpi5" id="BPMNShape_EndEvent_1whqpi5">
|
||||
<omgdc:Bounds height="36.0" width="36.0" x="648.0" y="240.0"></omgdc:Bounds>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge bpmnElement="SequenceFlow_0yx7uuw" id="BPMNEdge_SequenceFlow_0yx7uuw">
|
||||
<omgdi:waypoint x="448.0" y="258.0"></omgdi:waypoint>
|
||||
<omgdi:waypoint x="498.0" y="258.0"></omgdi:waypoint>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge bpmnElement="SequenceFlow_1a3uiw2" id="BPMNEdge_SequenceFlow_1a3uiw2">
|
||||
<omgdi:waypoint x="598.0" y="258.0"></omgdi:waypoint>
|
||||
<omgdi:waypoint x="648.0" y="258.0"></omgdi:waypoint>
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</definitions>
|
||||
@@ -0,0 +1 @@
|
||||
{"id":"process-75651812-d60b-4a4c-892f-55eb095705c8","extensions":{"properties":{},"mappings":{}}}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://bpmn.io/schema/bpmn" id="sample-diagram" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
|
||||
<process id="process-75651812-d60b-4a4c-892f-55eb095705c8" name="simpleProcess" isExecutable="true">
|
||||
<startEvent id="StartEvent_1"></startEvent>
|
||||
<sequenceFlow id="SequenceFlow_0jdd7i3" sourceRef="StartEvent_1" targetRef="Task_1gp4t4s"></sequenceFlow>
|
||||
<userTask id="Task_1gp4t4s" name="taskSimple"></userTask>
|
||||
<endEvent id="EndEvent_05442a5"></endEvent>
|
||||
<sequenceFlow id="SequenceFlow_00wy043" sourceRef="Task_1gp4t4s" targetRef="EndEvent_05442a5"></sequenceFlow>
|
||||
</process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_process-75651812-d60b-4a4c-892f-55eb095705c8">
|
||||
<bpmndi:BPMNPlane bpmnElement="process-75651812-d60b-4a4c-892f-55eb095705c8" id="BPMNPlane_process-75651812-d60b-4a4c-892f-55eb095705c8">
|
||||
<bpmndi:BPMNShape bpmnElement="StartEvent_1" id="BPMNShape_StartEvent_1">
|
||||
<omgdc:Bounds height="36.0" width="36.0" x="412.0" y="240.0"></omgdc:Bounds>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape bpmnElement="Task_1gp4t4s" id="BPMNShape_Task_1gp4t4s">
|
||||
<omgdc:Bounds height="80.0" width="100.0" x="498.0" y="218.0"></omgdc:Bounds>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape bpmnElement="EndEvent_05442a5" id="BPMNShape_EndEvent_05442a5">
|
||||
<omgdc:Bounds height="36.0" width="36.0" x="648.0" y="240.0"></omgdc:Bounds>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge bpmnElement="SequenceFlow_0jdd7i3" id="BPMNEdge_SequenceFlow_0jdd7i3">
|
||||
<omgdi:waypoint x="448.0" y="258.0"></omgdi:waypoint>
|
||||
<omgdi:waypoint x="498.0" y="258.0"></omgdi:waypoint>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge bpmnElement="SequenceFlow_00wy043" id="BPMNEdge_SequenceFlow_00wy043">
|
||||
<omgdi:waypoint x="598.0" y="258.0"></omgdi:waypoint>
|
||||
<omgdi:waypoint x="648.0" y="258.0"></omgdi:waypoint>
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</definitions>
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"name":"simpleapp","version":"1","description":""}
|
||||
+4
-4
@@ -19,7 +19,7 @@ const HOST_SSO = process.env.URL_HOST_SSO_ADF;
|
||||
const HOST_IDENTITY = process.env.URL_HOST_IDENTITY;
|
||||
const TIMEOUT = parseInt(process.env.TIMEOUT, 10);
|
||||
const PROXY = process.env.PROXY_HOST_ADF;
|
||||
const DEBUG = process.env.DEBUG;
|
||||
const LOG = process.env.LOG;
|
||||
const BPM_HOST = process.env.URL_HOST_BPM_ADF || "bpm";
|
||||
const OAUTH_HOST = process.env.URL_HOST_SSO_ADF || "keycloak";
|
||||
const OAUTH_CLIENDID = process.env.OAUTH_CLIENDID || "activiti";
|
||||
@@ -49,7 +49,7 @@ const appConfig = {
|
||||
}
|
||||
};
|
||||
|
||||
if (DEBUG) {
|
||||
if (LOG) {
|
||||
console.log('======= test.config.js hostBPM ====== ');
|
||||
console.log('hostBPM : ' + (HOST_BPM || PROXY || HOST));
|
||||
console.log('EMAIL : ' + (EMAIL));
|
||||
@@ -125,7 +125,7 @@ module.exports = {
|
||||
baseUrl = HOST;
|
||||
}
|
||||
|
||||
if (DEBUG) {
|
||||
if (LOG) {
|
||||
console.log('hostSso baseUrl : ' + baseUrl);
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ module.exports = {
|
||||
baseUrl = HOST;
|
||||
}
|
||||
|
||||
if (DEBUG) {
|
||||
if (LOG) {
|
||||
console.log('hostIdentity baseUrl : ' + baseUrl);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user