mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[no-issue] Parallel run e2e and e2e common action refactoring (#4702)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ErrorPage, LoginSSOPage, SettingsPage } from '@alfresco/adf-testing';
|
||||
import { ErrorPage, LoginSSOPage, SettingsPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import TestConfig = require('../../test.config');
|
||||
import { browser } from 'protractor';
|
||||
|
||||
@@ -29,7 +29,8 @@ describe('Auth Guard SSO', () => {
|
||||
settingsPage.setProviderEcmSso(TestConfig.adf.url, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, false, true, 'alfresco');
|
||||
loginSSOPage.clickOnSSOButton();
|
||||
await loginSSOPage.loginSSOIdentityService(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
browser.get(TestConfig.adf.url + '/cloud/simple-app');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/cloud/simple-app');
|
||||
browser.driver.sleep(1000);
|
||||
expect(errorPage.getErrorCode()).toBe('403');
|
||||
});
|
||||
|
||||
|
@@ -42,9 +42,9 @@ describe('Datatable component - selection', () => {
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
navigationBarPage.navigateToDatatable();
|
||||
await navigationBarPage.navigateToDatatable();
|
||||
|
||||
done();
|
||||
});
|
||||
@@ -52,14 +52,10 @@ describe('Datatable component - selection', () => {
|
||||
it('[C213258] Should be possible change the selection modes when change the selectionMode property', () => {
|
||||
dataTablePage.selectRow('2');
|
||||
dataTableComponent.checkRowIsSelected('Id', '2');
|
||||
dataTablePage.getNumberOfSelectedRows().then((result) => {
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
expect(dataTablePage.getNumberOfSelectedRows()).toEqual(1);
|
||||
dataTablePage.selectRow('3');
|
||||
dataTableComponent.checkRowIsSelected('Id', '3');
|
||||
dataTablePage.getNumberOfSelectedRows().then((result) => {
|
||||
expect(result).toEqual(1);
|
||||
});
|
||||
expect(dataTablePage.getNumberOfSelectedRows()).toEqual(1);
|
||||
dataTablePage.selectSelectionMode('Multiple');
|
||||
dataTablePage.selectRow('1');
|
||||
dataTableComponent.checkRowIsSelected('Id', '1');
|
||||
|
@@ -54,7 +54,7 @@ describe('Datatable component', () => {
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, ErrorPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, ErrorPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { AcsUserModel } from '../models/ACS/acsUserModel';
|
||||
import TestConfig = require('../test.config');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
@@ -34,24 +34,22 @@ describe('Error Component', () => {
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
|
||||
});
|
||||
|
||||
it('[C277302] Should display the error 403 when access to unauthorized page - My Change', () => {
|
||||
browser.get(TestConfig.adf.url + '/error/403');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/error/403');
|
||||
expect(errorPage.getErrorCode()).toBe('403');
|
||||
expect(errorPage.getErrorTitle()).toBe('You don\'t have permission to access this server.');
|
||||
expect(errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
|
||||
});
|
||||
|
||||
it('[C280563] Should back home button navigate to the home page', () => {
|
||||
browser.get(TestConfig.adf.url + '/error/404');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/error/404');
|
||||
|
||||
errorPage.clickBackButton();
|
||||
|
||||
@@ -59,7 +57,7 @@ describe('Error Component', () => {
|
||||
});
|
||||
|
||||
it('[C280564] Should secondary button by default redirect to report-issue URL', () => {
|
||||
browser.get(TestConfig.adf.url + '/error/403');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/error/403');
|
||||
|
||||
errorPage.clickSecondButton();
|
||||
|
||||
@@ -67,14 +65,14 @@ describe('Error Component', () => {
|
||||
});
|
||||
|
||||
it('[C277304] Should display the error 404 when access to not found page', () => {
|
||||
browser.get(TestConfig.adf.url + '/error/404');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/error/404');
|
||||
expect(errorPage.getErrorCode()).toBe('404');
|
||||
expect(errorPage.getErrorTitle()).toBe('An error occurred.');
|
||||
expect(errorPage.getErrorDescription()).toBe('We couldn’t find the page you were looking for.');
|
||||
});
|
||||
|
||||
it('[C307029] Should display Unknown message when error is undefined', () => {
|
||||
browser.get(TestConfig.adf.url + '/error/501');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/error/501');
|
||||
expect(errorPage.getErrorCode()).toBe('UNKNOWN');
|
||||
expect(errorPage.getErrorTitle()).toBe('We hit a problem.');
|
||||
expect(errorPage.getErrorDescription()).toBe('Looks like something went wrong.');
|
||||
|
@@ -62,23 +62,19 @@ describe('Header Component', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(user.email, user.password);
|
||||
|
||||
await loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async(done) => {
|
||||
|
||||
loginPage.loginToProcessServicesUsingUserModel(user);
|
||||
|
||||
navigationBarPage.clickHeaderDataButton();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async(done) => {
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.activiti.adminTenantsApi.deleteTenant(tenantId);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -94,33 +90,23 @@ describe('Header Component', () => {
|
||||
|
||||
it('[C279996] Should be able to show/hide menu button', () => {
|
||||
headerPage.clickShowMenuButton();
|
||||
|
||||
navigationBarPage.checkMenuButtonIsNotDisplayed();
|
||||
|
||||
headerPage.clickShowMenuButton();
|
||||
|
||||
navigationBarPage.checkMenuButtonIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C279999] Should be able to change the colour between primary, accent and warn', () => {
|
||||
headerPage.changeHeaderColor(names.color_accent);
|
||||
|
||||
navigationBarPage.checkToolbarColor(names.color_accent);
|
||||
|
||||
headerPage.changeHeaderColor(names.color_primary);
|
||||
|
||||
navigationBarPage.checkToolbarColor(names.color_primary);
|
||||
|
||||
headerPage.changeHeaderColor(names.color_warn);
|
||||
|
||||
navigationBarPage.checkToolbarColor(names.color_warn);
|
||||
});
|
||||
|
||||
it('[C280552] Should be able to change the colour of the header by typing a hex code', () => {
|
||||
headerPage.addHexCodeColor(names.color_custom);
|
||||
|
||||
navigationBarPage.checkToolbarColor(names.color_custom);
|
||||
|
||||
});
|
||||
|
||||
it('[C279997] Should be able to change the title of the app', () => {
|
||||
@@ -137,23 +123,18 @@ describe('Header Component', () => {
|
||||
|
||||
it('[C280553] Should be able to set a hyperlink to the logo', () => {
|
||||
headerPage.addLogoHyperlink(names.urlPath_logo_link);
|
||||
|
||||
navigationBarPage.clickAppLogo(names.logo_title);
|
||||
|
||||
settingsPage.checkProviderDropdownIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C286517] Should be able to set a hyperlink to the logo text', () => {
|
||||
headerPage.addLogoHyperlink(names.urlPath_logo_link);
|
||||
|
||||
navigationBarPage.clickAppLogoText();
|
||||
|
||||
settingsPage.checkProviderDropdownIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C280554] Should be able to customise the tooltip-text of the logo', () => {
|
||||
headerPage.addLogoTooltip(names.logo_tooltip);
|
||||
|
||||
navigationBarPage.checkLogoTooltip(names.logo_tooltip);
|
||||
});
|
||||
|
||||
|
@@ -37,10 +37,8 @@ describe('Universal Icon component', function () {
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
@@ -15,10 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, LocalStorageUtil } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../pages/adf/contentServicesPage';
|
||||
import { InfinitePaginationPage } from '../pages/adf/core/infinitePaginationPage';
|
||||
import { ConfigEditorPage } from '../pages/adf/configEditorPage';
|
||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
|
||||
import { AcsUserModel } from '../models/ACS/acsUserModel';
|
||||
@@ -35,7 +34,6 @@ describe('Enable infinite scrolling', () => {
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const infinitePaginationPage = new InfinitePaginationPage();
|
||||
const configEditorPage = new ConfigEditorPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
@@ -66,7 +64,7 @@ describe('Enable infinite scrolling', () => {
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
fileNames = Util.generateSequenceFiles(1, nrOfFiles, files.base, files.extension);
|
||||
deleteFileNames = Util.generateSequenceFiles(1, nrOfDeletedFiles, files.base, files.extension);
|
||||
@@ -133,14 +131,11 @@ describe('Enable infinite scrolling', () => {
|
||||
});
|
||||
|
||||
it('[C299202] Should not display load more button when all the files are already displayed', () => {
|
||||
navigationBarPage.clickConfigEditorButton();
|
||||
configEditorPage.clickInfinitePaginationConfiguration();
|
||||
configEditorPage.clickClearButton();
|
||||
configEditorPage.enterConfiguration('30');
|
||||
configEditorPage.clickSaveButton();
|
||||
LocalStorageUtil.setUserPreference('paginationSize', '30');
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
|
||||
contentServicesPage.doubleClickRow(folderModel.name);
|
||||
|
||||
contentServicesPage.enableInfiniteScrolling();
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { browser } from 'protractor';
|
||||
|
||||
import { LoginPage, SettingsPage, ErrorPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, SettingsPage, ErrorPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { ProcessServicesPage } from '../../pages/adf/process-services/processServicesPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
@@ -72,20 +72,20 @@ describe('Login component', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C276746] Should display the right information in user-info when a different users logs in', () => {
|
||||
loginPage.loginToContentServicesUsingUserModel(userA);
|
||||
it('[C276746] Should display the right information in user-info when a different users logs in', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(userA);
|
||||
userInfoPage.clickUserProfile();
|
||||
expect(userInfoPage.getContentHeaderTitle()).toEqual(userA.firstName + ' ' + userA.lastName);
|
||||
expect(userInfoPage.getContentEmail()).toEqual(userA.email);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(userB);
|
||||
await loginPage.loginToContentServicesUsingUserModel(userB);
|
||||
userInfoPage.clickUserProfile();
|
||||
expect(userInfoPage.getContentHeaderTitle()).toEqual(userB.firstName + ' ' + userB.lastName);
|
||||
expect(userInfoPage.getContentEmail()).toEqual(userB.email);
|
||||
});
|
||||
|
||||
it('[C299206] Should redirect the user without the right access role on a forbidden page', () => {
|
||||
loginPage.loginToContentServicesUsingUserModel(userA);
|
||||
it('[C299206] Should redirect the user without the right access role on a forbidden page', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(userA);
|
||||
navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
expect(errorPage.getErrorCode()).toBe('403');
|
||||
expect(errorPage.getErrorTitle()).toBe('You don\'t have permission to access this server.');
|
||||
@@ -177,6 +177,7 @@ describe('Login component', () => {
|
||||
it('[C260049] Should be possible to login to Process Services with Content Services disabled', () => {
|
||||
loginPage.goToLoginPage();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderBpm();
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
@@ -188,17 +189,19 @@ describe('Login component', () => {
|
||||
it('[C260050] Should be possible to login to Content Services with Process Services disabled', () => {
|
||||
loginPage.goToLoginPage();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcm();
|
||||
loginPage.login(TestConfig.adf.adminUser, TestConfig.adf.adminPassword);
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
loginPage.waitForElements();
|
||||
});
|
||||
|
||||
it('[C260051] Should be able to login to both Content Services and Process Services', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
navigationBarPage.navigateToProcessServicesPage();
|
||||
@@ -210,16 +213,18 @@ describe('Login component', () => {
|
||||
});
|
||||
|
||||
it('[C277754] Should the user be redirect to the login page when the Content Service session expire', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
browser.executeScript('window.localStorage.removeItem("ticket-ECM");').then(async () => {
|
||||
await browser.get(TestConfig.adf.url + '/files');
|
||||
loginPage.waitForElements();
|
||||
});
|
||||
|
||||
browser.executeScript('window.localStorage.removeItem("ticket-ECM");');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/files');
|
||||
loginPage.waitForElements();
|
||||
});
|
||||
|
||||
it('[C279932] Should successRoute property change the landing page when the user Login', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.enableSuccessRouteSwitch();
|
||||
loginPage.enterSuccessRoute('activiti');
|
||||
@@ -228,15 +233,18 @@ describe('Login component', () => {
|
||||
});
|
||||
|
||||
it('[C279931] Should the user be redirect to the login page when the Process Service session expire', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
browser.executeScript('window.localStorage.removeItem("ticket-BPM");').then(async () => {
|
||||
await browser.get(TestConfig.adf.url + '/activiti');
|
||||
loginPage.waitForElements();
|
||||
});
|
||||
browser.executeScript('window.localStorage.removeItem("ticket-BPM");');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/activiti');
|
||||
loginPage.waitForElements();
|
||||
});
|
||||
|
||||
it('[C279930] Should a user still be logged-in when open a new tab', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
|
||||
@@ -245,15 +253,17 @@ describe('Login component', () => {
|
||||
browser.getAllWindowHandles().then((handles) => {
|
||||
|
||||
browser.switchTo().window(handles[1]).then(() => {
|
||||
browser.get(TestConfig.adf.url + '/activiti');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/activiti');
|
||||
processServicesPage.checkApsContainer();
|
||||
browser.get(TestConfig.adf.url + '/files');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/files');
|
||||
contentServicesPage.checkAcsContainer();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('[C279933] Should be possible change the login component logo when logoImageUrl is changed', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.enableLogoSwitch();
|
||||
loginPage.enterLogo('https://rawgit.com/Alfresco/alfresco-ng2-components/master/assets/angular2.png');
|
||||
@@ -261,7 +271,7 @@ describe('Login component', () => {
|
||||
});
|
||||
|
||||
it('[C291854] Should be possible login in valid credentials', () => {
|
||||
browser.get(TestConfig.adf.url);
|
||||
BrowserActions.getUrl(TestConfig.adf.url);
|
||||
loginPage.waitForElements();
|
||||
expect(loginPage.getSignInButtonIsEnabled()).toBe(false);
|
||||
loginPage.enterUsername(invalidUsername);
|
||||
|
@@ -52,10 +52,10 @@ 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', () => {
|
||||
settingsPage.setProviderEcmSso(TestConfig.adf.url, 'http://aps22/auth/realms/alfresco', TestConfig.adf.hostIdentity, false, true, 'alfresco');
|
||||
loginSSOPage.clickOnSSOButton();
|
||||
loginSSOPage.checkLoginErrorIsDisplayed();
|
||||
it('[C299205] Should display the login error message when the SSO identity service is wrongly configured', async() => {
|
||||
await settingsPage.setProviderEcmSso(TestConfig.adf.url, 'http://aps22/auth/realms/alfresco', TestConfig.adf.hostIdentity, false, true, 'alfresco');
|
||||
await loginSSOPage.clickOnSSOButton();
|
||||
await loginSSOPage.checkLoginErrorIsDisplayed();
|
||||
expect(loginSSOPage.getLoginErrorMessage()).toContain('SSO Authentication server unreachable');
|
||||
});
|
||||
});
|
||||
|
@@ -68,6 +68,8 @@ describe('Login component - Redirect', () => {
|
||||
});
|
||||
|
||||
it('[C213838] Should after login in CS be redirect to Login page when try to access to PS', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcm();
|
||||
loginPage.login(user.id, user.password);
|
||||
|
||||
@@ -80,6 +82,8 @@ describe('Login component - Redirect', () => {
|
||||
});
|
||||
|
||||
it('[C260085] Should after login in PS be redirect to Login page when try to access to CS', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderBpm();
|
||||
|
||||
loginPage.enableSuccessRouteSwitch();
|
||||
@@ -96,6 +100,9 @@ describe('Login component - Redirect', () => {
|
||||
});
|
||||
|
||||
it('[C260081] Should after login in BOTH not be redirect to Login page when try to access to CS or PS', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
|
||||
settingsPage.setProviderEcmBpm();
|
||||
|
||||
loginPage.login(adminUserModel.id, adminUserModel.password);
|
||||
@@ -108,71 +115,66 @@ describe('Login component - Redirect', () => {
|
||||
});
|
||||
|
||||
it('[C260088] Should be re-redirect to the request URL after login when try to access to a protect URL ', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcm();
|
||||
loginPage.login(user.id, user.password);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(TestConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(TestConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
contentServicesPage.waitForTableBody();
|
||||
|
||||
contentServicesPage.waitForTableBody();
|
||||
navigationBarPage.clickLogoutButton();
|
||||
|
||||
navigationBarPage.clickLogoutButton();
|
||||
logoutPage.checkLogoutSectionIsDisplayed();
|
||||
|
||||
logoutPage.checkLogoutSectionIsDisplayed();
|
||||
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
loginPage.waitForElements();
|
||||
|
||||
loginPage.waitForElements();
|
||||
loginPage.enterUsername(user.id);
|
||||
loginPage.enterPassword(user.password);
|
||||
loginPage.clickSignInButton();
|
||||
loginPage.login(user.id, user.password);
|
||||
|
||||
navigationBarPage.checkMenuButtonIsDisplayed();
|
||||
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(TestConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(TestConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
it('[C299161] Should redirect user to requested URL after reloading login page', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcm();
|
||||
loginPage.login(user.id, user.password);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(TestConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(TestConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
contentServicesPage.waitForTableBody();
|
||||
|
||||
contentServicesPage.waitForTableBody();
|
||||
navigationBarPage.clickLogoutButton();
|
||||
|
||||
navigationBarPage.clickLogoutButton();
|
||||
logoutPage.checkLogoutSectionIsDisplayed();
|
||||
|
||||
logoutPage.checkLogoutSectionIsDisplayed();
|
||||
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
loginPage.waitForElements();
|
||||
browser.refresh();
|
||||
loginPage.waitForElements();
|
||||
|
||||
navigationBarPage.openContentServicesFolder(uploadedFolder.entry.id);
|
||||
loginPage.waitForElements();
|
||||
browser.refresh();
|
||||
loginPage.waitForElements();
|
||||
loginPage.enterUsername(user.id);
|
||||
loginPage.enterPassword(user.password);
|
||||
loginPage.clickSignInButton();
|
||||
|
||||
loginPage.enterUsername(user.id);
|
||||
loginPage.enterPassword(user.password);
|
||||
loginPage.clickSignInButton();
|
||||
navigationBarPage.checkMenuButtonIsDisplayed();
|
||||
|
||||
navigationBarPage.checkMenuButtonIsDisplayed();
|
||||
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(TestConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
browser.getCurrentUrl().then((actualUrl) => {
|
||||
expect(actualUrl).toEqual(TestConfig.adf.url + '/files/' + uploadedFolder.entry.id);
|
||||
});
|
||||
|
||||
});
|
||||
|
@@ -23,6 +23,8 @@ describe('Login component - Remember Me', () => {
|
||||
const loginPage = new LoginPage();
|
||||
|
||||
beforeAll((done) => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
done();
|
||||
});
|
||||
|
@@ -95,7 +95,7 @@ describe('Pagination - returns to previous page when current is empty', () => {
|
||||
|
||||
pngFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, pngFileInfo.location, pngFileInfo.name, lastFolderResponse.entry.id);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
|
@@ -15,8 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, SettingsPage } from '@alfresco/adf-testing';
|
||||
import { browser, protractor } from 'protractor';
|
||||
import { LoginPage, SettingsPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { protractor } from 'protractor';
|
||||
import { AcsUserModel } from '../models/ACS/acsUserModel';
|
||||
import { NavigationBarPage } from '../pages/adf/navigationBarPage';
|
||||
import { ProcessServicesPage } from '../pages/adf/process-services/processServicesPage';
|
||||
@@ -49,7 +49,7 @@ describe('Settings component', () => {
|
||||
loginPage.waitForElements();
|
||||
});
|
||||
|
||||
it('[C291946] Should not save BPM Settings changes when User clicks Back button', () => {
|
||||
xit('[C291946] Should not save BPM Settings changes when User clicks Back button', () => {
|
||||
settingsPage.setProvider(settingsPage.getBpmOption(), 'BPM');
|
||||
settingsPage.setProcessServicesURL('http://myenvUrl.co.uk');
|
||||
settingsPage.clickBackButton();
|
||||
@@ -60,7 +60,7 @@ describe('Settings component', () => {
|
||||
|
||||
});
|
||||
|
||||
it('[C291947] Should not save ECM Settings changes when User clicks Back button', () => {
|
||||
xit('[C291947] Should not save ECM Settings changes when User clicks Back button', () => {
|
||||
settingsPage.setProvider(settingsPage.getEcmOption(), 'ECM');
|
||||
settingsPage.setContentServicesURL('http://myenvUrl.co.uk');
|
||||
settingsPage.clickBackButton();
|
||||
@@ -72,6 +72,8 @@ describe('Settings component', () => {
|
||||
});
|
||||
|
||||
it('[C291948] Should save ALL Settings changes when User clicks Apply button', () => {
|
||||
loginPage.goToLoginPage();
|
||||
loginPage.clickSettingsIcon();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.waitForElements();
|
||||
settingsPage.goToSettingsPage();
|
||||
@@ -170,7 +172,7 @@ describe('Settings component', () => {
|
||||
expect(settingsPage.getApplyButton().isEnabled()).toBe(true);
|
||||
settingsPage.clickBackButton();
|
||||
loginPage.waitForElements();
|
||||
browser.get(TestConfig.adf.url + '/activiti');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/activiti');
|
||||
processServicesPage.checkApsContainer();
|
||||
processServicesPage.checkAppIsDisplayed('Task App');
|
||||
});
|
||||
@@ -197,7 +199,7 @@ describe('Settings component', () => {
|
||||
expect(settingsPage.getApplyButton().isEnabled()).toBe(true);
|
||||
settingsPage.clickBackButton();
|
||||
loginPage.waitForElements();
|
||||
browser.get(TestConfig.adf.url + '/files');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/files');
|
||||
contentServicesPage.checkAcsContainer();
|
||||
});
|
||||
|
||||
@@ -227,9 +229,9 @@ describe('Settings component', () => {
|
||||
expect(settingsPage.getApplyButton().isEnabled()).toBe(true);
|
||||
settingsPage.clickBackButton();
|
||||
loginPage.waitForElements();
|
||||
browser.get(TestConfig.adf.url + '/files');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/files');
|
||||
contentServicesPage.checkAcsContainer();
|
||||
browser.get(TestConfig.adf.url + '/activiti');
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/activiti');
|
||||
processServicesPage.checkApsContainer();
|
||||
processServicesPage.checkAppIsDisplayed('Task App');
|
||||
});
|
||||
|
@@ -30,7 +30,7 @@ describe('User Info - SSO', () => {
|
||||
let silentLogin, identityUser;
|
||||
let identityService: IdentityService;
|
||||
|
||||
beforeAll(async () => {
|
||||
beforeAll(async (done) => {
|
||||
const apiService = new ApiService('alfresco', TestConfig.adf.url, TestConfig.adf.hostSso, 'ECM');
|
||||
await apiService.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
@@ -39,17 +39,21 @@ describe('User Info - SSO', () => {
|
||||
|
||||
silentLogin = false;
|
||||
settingsPage.setProviderEcmSso(TestConfig.adf.url, TestConfig.adf.hostSso, TestConfig.adf.hostIdentity, silentLogin, true, 'alfresco');
|
||||
|
||||
loginSSOPage.clickOnSSOButton();
|
||||
|
||||
loginSSOPage.loginSSOIdentityService(identityUser.email, identityUser.password);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await identityService.deleteIdentityUser(identityUser.idIdentityService);
|
||||
if (identityService) {
|
||||
await identityService.deleteIdentityUser(identityUser.idIdentityService);
|
||||
}
|
||||
});
|
||||
|
||||
it('[C290066] Should display UserInfo when login using SSO', () => {
|
||||
|
||||
navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
userInfoPage.clickUserProfile();
|
||||
expect(userInfoPage.getSsoHeaderTitle()).toEqual(identityUser.firstName + ' ' + identityUser.lastName);
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage, SettingsPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { UserInfoPage } from '@alfresco/adf-testing';
|
||||
|
||||
import { AcsUserModel } from '../models/ACS/acsUserModel';
|
||||
@@ -28,11 +28,9 @@ import resources = require('../util/resources');
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UsersActions } from '../actions/users.actions';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('User Info component', () => {
|
||||
|
||||
const settingsPage = new SettingsPage();
|
||||
const loginPage = new LoginPage();
|
||||
const userInfoPage = new UserInfoPage();
|
||||
let processUserModel, contentUserModel;
|
||||
@@ -71,10 +69,9 @@ describe('User Info component', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
xit('[C260111] Should display UserInfo when Process Services and Content Services are enabled', () => {
|
||||
loginPage.goToLoginPage();
|
||||
settingsPage.setProviderEcmBpm();
|
||||
loginPage.login(contentUserModel.id, contentUserModel.password);
|
||||
xit('[C260111] Should display UserInfo when Process Services and Content Services are enabled', async () => {
|
||||
await loginPage.loginToAllUsingUserModel(contentUserModel);
|
||||
|
||||
userInfoPage.clickUserProfile();
|
||||
|
||||
expect(userInfoPage.getContentHeaderTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
|
||||
@@ -108,10 +105,8 @@ describe('User Info component', () => {
|
||||
userInfoPage.closeUserProfile();
|
||||
});
|
||||
|
||||
it('[C260113] Should display UserInfo when Content Services is enabled and Process Services is disabled', () => {
|
||||
loginPage.goToLoginPage();
|
||||
settingsPage.setProviderEcm();
|
||||
loginPage.login(contentUserModel.id, contentUserModel.password);
|
||||
it('[C260113] Should display UserInfo when Content Services is enabled and Process Services is disabled', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(contentUserModel);
|
||||
|
||||
userInfoPage.clickUserProfile();
|
||||
userInfoPage.dialogIsDisplayed();
|
||||
@@ -128,10 +123,8 @@ describe('User Info component', () => {
|
||||
userInfoPage.dialogIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C260115] Should display UserInfo when Process Services is enabled and Content Services is disabled', () => {
|
||||
loginPage.goToLoginPage();
|
||||
settingsPage.setProviderBpm();
|
||||
loginPage.login(processUserModel.email, processUserModel.password);
|
||||
it('[C260115] Should display UserInfo when Process Services is enabled and Content Services is disabled', async () => {
|
||||
await loginPage.loginToProcessServicesUsingUserModel(contentUserModel);
|
||||
|
||||
userInfoPage.clickUserProfile();
|
||||
|
||||
@@ -147,22 +140,18 @@ describe('User Info component', () => {
|
||||
userInfoPage.closeUserProfile();
|
||||
});
|
||||
|
||||
it('[C260117] Should display UserInfo with profile image uploaded in ACS', async(done) => {
|
||||
browser.controlFlow().execute(async() => {
|
||||
await PeopleAPI.updateAvatarViaAPI(contentUserModel, acsAvatarFileModel, '-me-');
|
||||
await PeopleAPI.getAvatarViaAPI(4, contentUserModel, '-me-', function () {});
|
||||
it('[C260117] Should display UserInfo with profile image uploaded in ACS', async () => {
|
||||
await PeopleAPI.updateAvatarViaAPI(contentUserModel, acsAvatarFileModel, '-me-');
|
||||
await PeopleAPI.getAvatarViaAPI(4, contentUserModel, '-me-', function () {
|
||||
});
|
||||
|
||||
loginPage.goToLoginPage();
|
||||
settingsPage.setProviderEcm();
|
||||
loginPage.login(contentUserModel.id, contentUserModel.password);
|
||||
await loginPage.loginToContentServicesUsingUserModel(contentUserModel);
|
||||
|
||||
userInfoPage.clickUserProfile();
|
||||
|
||||
userInfoPage.checkACSProfileImage();
|
||||
userInfoPage.APSProfileImageNotDisplayed();
|
||||
userInfoPage.closeUserProfile();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C260118] Should display UserInfo with profile image uploaded in APS', async () => {
|
||||
@@ -170,9 +159,8 @@ describe('User Info component', () => {
|
||||
await this.alfrescoJsApi.login(contentUserModel.email, contentUserModel.password);
|
||||
await users.changeProfilePictureAps(this.alfrescoJsApi, apsAvatarFileModel.getLocation());
|
||||
|
||||
loginPage.goToLoginPage();
|
||||
settingsPage.setProviderBpm();
|
||||
loginPage.login(processUserModel.email, processUserModel.password);
|
||||
await loginPage.loginToProcessServicesUsingUserModel(contentUserModel);
|
||||
|
||||
userInfoPage.clickUserProfile();
|
||||
|
||||
userInfoPage.checkAPSProfileImage();
|
||||
@@ -181,13 +169,11 @@ describe('User Info component', () => {
|
||||
userInfoPage.closeUserProfile();
|
||||
});
|
||||
|
||||
it('[C260120] Should not display profile image in UserInfo when deleted in ACS', () => {
|
||||
PeopleAPI.deleteAvatarViaAPI(contentUserModel, '-me-');
|
||||
it('[C260120] Should not display profile image in UserInfo when deleted in ACS', async () => {
|
||||
await PeopleAPI.deleteAvatarViaAPI(contentUserModel, '-me-');
|
||||
|
||||
loginPage.goToLoginPage();
|
||||
await loginPage.loginToContentServicesUsingUserModel(contentUserModel);
|
||||
|
||||
settingsPage.setProviderEcm();
|
||||
loginPage.login(contentUserModel.id, contentUserModel.password);
|
||||
userInfoPage.clickUserProfile();
|
||||
|
||||
userInfoPage.checkInitialImage();
|
||||
|
@@ -79,7 +79,7 @@ describe('Viewer', () => {
|
||||
|
||||
uploadedArchives = await uploadActions.uploadFolder(this.alfrescoJsApi, archiveFolderInfo.location, archiveFolderUploaded.entry.id);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
|
@@ -80,8 +80,8 @@ describe('Viewer', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C272813] Should be redirected to site when opening and closing a file in a site', () => {
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
it('[C272813] Should be redirected to site when opening and closing a file in a site', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
navigationBarPage.goToSite(site);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
@@ -103,7 +103,7 @@ describe('Viewer', () => {
|
||||
|
||||
uploadedOthers = await uploadActions.uploadFolder(this.alfrescoJsApi, otherFolderInfo.location, otherFolderUploaded.entry.id);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
|
@@ -79,7 +79,7 @@ describe('Viewer', () => {
|
||||
|
||||
uploadedExcels = await uploadActions.uploadFolder(this.alfrescoJsApi, excelFolderInfo.location, excelFolderUploaded.entry.id);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
@@ -96,7 +96,7 @@ describe('Viewer', () => {
|
||||
uploadedExcels.forEach((currentFile) => {
|
||||
if (currentFile.entry.name !== '.DS_Store') {
|
||||
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.checkFileIsLoaded(currentFile.entry.name);
|
||||
viewerPage.clickCloseButton();
|
||||
}
|
||||
});
|
||||
|
@@ -89,7 +89,7 @@ describe('Viewer', () => {
|
||||
|
||||
uploadedImgRenditionFolderInfo = await uploadActions.uploadFolder(this.alfrescoJsApi, imgRenditionFolderInfo.location, imgFolderRenditionUploaded.entry.id);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
|
@@ -30,6 +30,7 @@ import { AcsUserModel } from '../../../models/ACS/acsUserModel';
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../../../actions/ACS/upload.actions';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
describe('Viewer', () => {
|
||||
|
||||
@@ -80,9 +81,11 @@ describe('Viewer', () => {
|
||||
|
||||
uploadedPpt = await uploadActions.uploadFolder(this.alfrescoJsApi, pptFolderInfo.location, pptFolderUploaded.entry.id);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
browser.driver.sleep(15000);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -97,7 +100,7 @@ describe('Viewer', () => {
|
||||
uploadedPpt.forEach((currentFile) => {
|
||||
if (currentFile.entry.name !== '.DS_Store') {
|
||||
contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.checkFileIsLoaded(currentFile.entry.name);
|
||||
viewerPage.clickCloseButton();
|
||||
}
|
||||
});
|
||||
|
@@ -80,7 +80,7 @@ describe('Viewer', () => {
|
||||
|
||||
uploadedTexts = await uploadActions.uploadFolder(this.alfrescoJsApi, textFolderInfo.location, textFolderUploaded.entry.id);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
|
@@ -80,7 +80,7 @@ describe('Viewer', () => {
|
||||
|
||||
uploadedWords = await uploadActions.uploadFolder(this.alfrescoJsApi, wordFolderInfo.location, wordFolderUploaded.entry.id);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
done();
|
||||
|
@@ -80,8 +80,8 @@ describe('Info Drawer', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
beforeEach(async() => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
navigationBarPage.goToSite(site);
|
||||
contentServicesPage.checkAcsContainer();
|
||||
|
@@ -111,7 +111,7 @@ describe('Content Services Viewer', () => {
|
||||
const unsupportedFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, unsupportedFile.location, unsupportedFile.name, '-my-');
|
||||
Object.assign(unsupportedFile, unsupportedFileUploaded.entry);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
@@ -383,11 +383,9 @@ describe('Content Services Viewer', () => {
|
||||
viewerPage.clickCloseButton();
|
||||
});
|
||||
|
||||
it('[C269109] Should not be able to open thumbnail pane before the pdf is loaded', () => {
|
||||
it('[C269109] Should not be able to open thumbnail panel before the pdf is loaded', () => {
|
||||
viewerPage.viewFile(pdfFile.name);
|
||||
|
||||
browser.driver.sleep(3000); // wait open file
|
||||
|
||||
viewerPage.checkThumbnailsBtnIsDisabled();
|
||||
|
||||
viewerPage.checkCloseButtonIsDisplayed();
|
||||
|
@@ -57,7 +57,7 @@ describe('Viewer', () => {
|
||||
|
||||
txtFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, txtFileInfo.location, txtFileInfo.name, '-my-');
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
|
@@ -74,7 +74,7 @@ describe('Viewer', () => {
|
||||
|
||||
jsFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, jsFileInfo.location, jsFileInfo.name, '-my-');
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
done();
|
||||
});
|
||||
@@ -88,7 +88,6 @@ describe('Viewer', () => {
|
||||
describe('Viewer extension', () => {
|
||||
|
||||
it('[C297698] Should be able to add an extension for code editor viewer', () => {
|
||||
navigationBarPage.checkAboutButtonIsDisplayed();
|
||||
navigationBarPage.clickAboutButton();
|
||||
|
||||
monacoExtensionPage.checkMonacoPluginIsDisplayed();
|
||||
|
@@ -70,7 +70,7 @@ describe('Viewer - properties', () => {
|
||||
pngFileUploaded = await uploadActions.uploadFile(this.alfrescoJsApi, fileForOverlay.location, fileForOverlay.name, '-my-');
|
||||
Object.assign(fileForOverlay, pngFileUploaded.entry);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
contentServicesPage.goToDocumentList();
|
||||
|
||||
|
@@ -25,7 +25,7 @@ import { ShareDialog } from '../../pages/adf/dialog/shareDialog';
|
||||
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
import resources = require('../../util/resources');
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
import { StringUtil, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
@@ -98,16 +98,16 @@ describe('Viewer', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
beforeEach(async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
});
|
||||
|
||||
it('[C260105] Should be able to open an image file shared via API', () => {
|
||||
browser.get(TestConfig.adf.url + '/preview/s/' + pngFileShared.entry.id);
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/preview/s/' + pngFileShared.entry.id);
|
||||
viewerPage.checkImgContainerIsDisplayed();
|
||||
browser.get(TestConfig.adf.url);
|
||||
BrowserActions.getUrl(TestConfig.adf.url);
|
||||
navigationBarPage.clickLogoutButton();
|
||||
browser.get(TestConfig.adf.url + '/preview/s/' + pngFileShared.entry.id);
|
||||
BrowserActions.getUrl(TestConfig.adf.url + '/preview/s/' + pngFileShared.entry.id);
|
||||
viewerPage.checkImgContainerIsDisplayed();
|
||||
});
|
||||
|
||||
@@ -122,13 +122,13 @@ describe('Viewer', () => {
|
||||
browser.controlFlow().execute(async () => {
|
||||
const sharedLink = await shareDialog.getShareLink();
|
||||
|
||||
await browser.get(sharedLink);
|
||||
await BrowserActions.getUrl(sharedLink);
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.checkFileNameIsDisplayed(wordFileInfo.name);
|
||||
|
||||
await browser.get(TestConfig.adf.url);
|
||||
await BrowserActions.getUrl(TestConfig.adf.url);
|
||||
navigationBarPage.clickLogoutButton();
|
||||
await browser.get(sharedLink);
|
||||
await BrowserActions.getUrl(sharedLink);
|
||||
viewerPage.checkFileIsLoaded();
|
||||
viewerPage.checkFileNameIsDisplayed(wordFileInfo.name);
|
||||
});
|
||||
|
Reference in New Issue
Block a user