Disable control flow e2e ADF (#4954)

* update project script possible different JS-API

* first commit no controll flow

* second commit no controll flow

* third commit no controll flow

* 4 commit no controll flow

* 5 commit no controll flow

* 6 commit no controll flow

* 7 commit no controll flow

* 8 commit no controll flow

* 9 commit no controll flow

* 10 commit no controll flow

* 11 commit no controll flow

* 12 commit no controll flow

* 13 commit no controll flow

* 14 commit no controll flow

* 15 commit no controll flow

* 16 commit no controll flow

* 17 commit no controll flow

* 18 commit no controll flow

* 19 commit no controll flow

* 20 commit no controll flow

* remove wdpromise, protractor promise and deferred promises

* - fixed some incorrect “expect” calls
- fixed some matchers
- removed “return this;” when not needed
- added a few more await-s

* forgot a file

* fix some failing tests

* replaced driver calls with browser calls and enabled back waitForAngular

* fix rightClick methods and hopefully some tests

* fix settings-component

* some more fixes for core and content tests

* try to fix some more issues

* linting

* revert some changes, allowing download on headless chrome won’t work with multiple browser instances

* fixes for Search tests

* try to remove some wait calls

* fix build

* increase allScriptsTimeout and try another protractor and web driver version

* improve navigation methods

* some fixes for notification history and login sso

* forgot a space

* fix packages and enable some screenshots

* navigation bar fixes

* fix some test

* some fixes for notification history and navigation bar
use correct visibility method in attachFileWidget test

* fix searching and another fix for navigation

* try solve sso login

* some more fixes

* refactor async forEach into for..of

* try fix for search tests

* resolve rebabse problems

* remove install

* fix lint

* fix core e2e

* fix core e2e

* fix core e2e

* fix ps tests

* fix some tests

* fix core e2e

* fix core e2e

* fix core

* fix some issues PS

* fix core

* fix core

* fix some ps test

* fix rebase issues

* remove save

* fix url regressed after rebase

* fix url regressed after rebase

* fix ps and core

* fix lint

* more parallel e2e ps

* fix some ps cloud test

* some cloud fix

* fix lint

* fix some test

* remove files to be ignored

* out-tsc

* improve one cs test

* fix candidate base app

* fix ps test

* remove click function

* clean methods alrady present in browser action

* try ugly wait

* move wait

* remove duplicate call

* remove underscore

* fix after review

* fix imports

* minor cosmetic fixes

* fix comments test
This commit is contained in:
Eugenio Romano
2019-08-17 14:32:02 +02:00
committed by GitHub
parent 4f3cf669f2
commit 83412bb9b6
328 changed files with 17653 additions and 18793 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { LoginSSOPage, SettingsPage, LoginPage } from '@alfresco/adf-testing';
import { LoginSSOPage, SettingsPage, LoginPage, BrowserVisibility } from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { NavigationBarPage } from '../../../pages/adf/navigationBarPage';
@@ -29,21 +29,6 @@ describe('Login component - SSO', () => {
const silentLogin = false;
let implicitFlow;
it('[C280665] Should be possible change the logout redirect URL', async () => {
await settingsPage.setProviderEcmSso(browser.params.testConfig.adf.url,
browser.params.testConfig.adf.hostSso,
browser.params.testConfig.adf.hostIdentity, false, true, browser.params.config.oauth2.clientId, '/login');
await loginSSOPage.clickOnSSOButton();
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
await navigationBarPage.clickLogoutButton();
browser.sleep(2000);
browser.getCurrentUrl().then((actualUrl) => {
expect(actualUrl).toEqual(browser.params.testConfig.adf.url + '/login');
});
});
describe('Login component - SSO Grant type password (implicit flow false)', () => {
it('[C299158] Should be possible to login with SSO, with grant type password (Implicit Flow false)', async () => {
@@ -63,28 +48,18 @@ describe('Login component - SSO', () => {
await loginPage.enterPassword(browser.params.testConfig.adf.adminPassword);
await loginPage.clickSignInButton();
let isDisplayed = false;
await BrowserVisibility.waitUntilElementIsVisible(loginPage.sidenavLayout);
browser.wait(() => {
loginPage.header.isDisplayed().then(
() => {
isDisplayed = true;
},
() => {
isDisplayed = false;
}
);
return isDisplayed;
}, browser.params.testConfig.main.timeout, 'Element is not visible ' + loginPage.header.locator());
});
});
describe('Login component - SSO implicit Flow', () => {
afterEach(() => {
navigationBarPage.clickLogoutButton();
browser.executeScript('window.sessionStorage.clear();');
browser.executeScript('window.localStorage.clear();');
afterEach(async () => {
await navigationBarPage.clickLogoutButton();
await browser.executeScript('window.sessionStorage.clear();');
await browser.executeScript('window.localStorage.clear();');
await browser.refresh();
});
it('[C261050] Should be possible login with SSO', async () => {
@@ -96,7 +71,7 @@ describe('Login component - SSO', () => {
});
it('[C280667] Should be redirect directly to keycloak without show the login page with silent login', async () => {
await settingsPage.setProviderEcmSso(browser.params.testConfig.adf_acs.host,
await settingsPage.setProviderEcmSso(browser.params.testConfig.adf_acs.host,
browser.params.testConfig.adf.hostSso,
browser.params.testConfig.adf.hostIdentity, true, true, browser.params.config.oauth2.clientId);
await loginSSOPage.loginSSOIdentityService(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);