How to use the protractor.browser.params function in protractor

To help you get started, we’ve selected a few protractor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openshift / console / frontend / integration-tests / protractor.conf.ts View on Github external
onComplete: async () => {
    const consoleLogStream = createWriteStream(`${screenshotsDir}/browser.log`, { flags: 'a' });
    browserLogs.forEach((log) => {
      const { level, message } = log;
      const messageStr = _.isArray(message) ? message.join(' ') : message;
      consoleLogStream.write(`${format.apply(null, [`[${level.name}]`, messageStr])}\n`);
    });

    const url = await browser.getCurrentUrl();
    console.log('Last browser URL: ', url);

    // Use projects if OpenShift so non-admin users can run tests. We need the fully-qualified name
    // since we're using kubectl instead of oc.
    const resource =
      browser.params.openshift === 'true' ? 'projects.project.openshift.io' : 'namespaces';
    await browser.close();
    execSync(
      `if kubectl get ${resource} ${testName} 2> /dev/null; then kubectl delete ${resource} ${testName}; fi`,
    );
  },
  afterLaunch: (exitCode) => {
github process-engine / bpmn-studio / test / e2e / src / diagrams / letTestDiagram.ts View on Github external
export class LETTestDiagram {
    public name: string =  'let_test';
    public userTaskId: string = 'Task_1yftx0l';
    public manualTaskId: string = 'Task_0u4cnp4';
    public callActivityId: string = 'Task_0f8akhm';
    public emptyActivityId: string = 'Task_064hsv6';
    public correlationId: string;
    public processInstanceId: string;
    public userTaskDynamicUiUrl: string;

    public callActivityTargetDiagramId: string;

    // Define Instances
    private _processEngineUrl: string = browser.params.processEngineUrl;
    private _http: HttpClient = new HttpClient(this._processEngineUrl);
    private _applicationUrl: string = browser.params.aureliaUrl;
    private _processEngineActionTimeout: number = browser.params.processEngineActionTimeout;

    constructor(callActivityTargetDiagramId: string) {
      this.callActivityTargetDiagramId = callActivityTargetDiagramId;
    }

    public async deployDiagram(): Promise {
      const requestDestination: string = `/api/management/v1/process_models/${this.name}/update`;
      const requestPayload: IRequestPayload = {
        xml: `
github process-engine / bpmn-studio / test / e2e / src / minimap.spec.ts View on Github external
describe('Minimap view', () => {

  let bpmnIo: BpmnIo;
  let minimap: Minimap;
  let general: General;
  let navBar: NavBar;
  let processModel: ProcessModel;
  let solutionExplorer: SolutionExplorer;
  let statusBar: StatusBar;

  let processModelId: string;

  const aureliaUrl: string = browser.params.aureliaUrl;
  const defaultTimeoutMS: number = browser.params.defaultTimeoutMS;

  const expectedConditions: ProtractorExpectedConditions = protractor.ExpectedConditions;

  beforeAll(() => {
    bpmnIo = new BpmnIo();
    minimap = new Minimap();
    general = new General();
    navBar = new NavBar();
    processModel = new ProcessModel();
    solutionExplorer = new SolutionExplorer();
    statusBar = new StatusBar();

    processModelId = processModel.getProcessModelId();

    // Create a new process definition by POST REST call
github process-engine / bpmn-studio / test / e2e / src / pages / solutionExplorer.ts View on Github external
public async openDiagramByClick(diagramName: string): Promise {
    const diagramEntry: ElementFinder = this._getDiagramEntry(diagramName);
    await browser.wait(ExpectedConditions.visibilityOf(diagramEntry), browser.params.defaultTimeoutMS);

    return diagramEntry.click();
  }
github cloudfoundry / stratos / src / test-e2e / helpers / request-helpers.ts View on Github external
newRequest(defaults: Partial = {
    headers: {
      'Content-Type': 'application/json',
      Accept: 'application/json'
    },
    resolveWithFullResponse: true,
    jar: request.jar(),
    timeout: 30000
  }) {
    const skipSSLValidation = browser.params.skipSSLValidation;
    if (skipSSLValidation) {
      process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
    } else if (browser.params.caCert) {
      let caCertFile = join(__dirname, '..', 'dev-ssl');
      caCertFile = join(caCertFile, browser.params.caCert);
      if (existsSync(caCertFile)) {
        const ca = readFileSync(caCertFile);
        defaults.agentOptions = {
          ca
        };
      }
    }

    return request.defaults(defaults);
  }
github Alfresco / alfresco-ng2-components / e2e / process-services-cloud / people-group-cloud-component.e2e.ts View on Github external
describe('People Groups Cloud Component', () => {
        const loginSSOPage = new LoginSSOPage();
        const navigationBarPage = new NavigationBarPage();
        const peopleGroupCloudComponentPage = new PeopleGroupCloudComponentPage();
        const peopleCloudComponent = new PeopleCloudComponentPage();
        const groupCloudComponentPage = new GroupCloudComponentPage();
        let identityService: IdentityService;
        let groupIdentityService: GroupIdentityService;
        let rolesService: RolesService;
        const apiService = new ApiService(
            browser.params.config.oauth2.clientId,
            browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers
        );

        let apsUser;
        let testUser;
        let activitiUser;
        let noRoleUser;
        let groupUser;
        let groupAdmin;
        let groupNoRole;
        let apsUserRoleId: string;
        let apsAdminRoleId: string;
        let users = [];
        let groups = [];

        beforeAll(async () => {
github Alfresco / alfresco-ng2-components / e2e / content-services / upload / user-permission.e2e.ts View on Github external
describe('Upload - User permission', () => {

    const contentServicesPage = new ContentServicesPage();
    const uploadDialog = new UploadDialog();
    const loginPage = new LoginPage();
    let acsUser;
    let acsUserTwo;
    const navigationBarPage = new NavigationBarPage();
    const notificationHistoryPage = new NotificationHistoryPage();

    const emptyFile = new FileModel({
        'name': browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_name,
        'location': browser.params.resources.Files.ADF_DOCUMENTS.TXT_0B.file_location
    });

    const pngFile = new FileModel({
        'name': browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
        'location': browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_location
    });

    const pdfFile = new FileModel({
        'name': browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
        'location': browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_location
    });

    beforeAll(async () => {
        this.alfrescoJsApi = new AlfrescoApi({
            provider: 'ECM',
github Alfresco / alfresco-ng2-components / e2e / content-services / upload / upload-dialog.e2e.ts View on Github external
provider: 'ECM',
        hostEcm: browser.params.testConfig.adf_acs.host
    });
    const uploadActions = new UploadActions(this.alfrescoJsApi);

    const firstPdfFileModel = new FileModel({
        'name': browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
        'location': browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_location
    });
    const docxFileModel = new FileModel({
        'name': browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_name,
        'location': browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_location
    });
    const pdfFileModel = new FileModel({
        'name': browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
        'location': browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_location
    });
    const pngFileModelTwo = new FileModel({
        'name': browser.params.resources.Files.ADF_DOCUMENTS.PNG_B.file_name,
        'location': browser.params.resources.Files.ADF_DOCUMENTS.PNG_B.file_location
    });
    const pngFileModel = new FileModel({
        'name': browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
        'location': browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_location
    });
    const filesLocation = [pdfFileModel.location, docxFileModel.location, pngFileModel.location, firstPdfFileModel.location];
    const filesName = [pdfFileModel.name, docxFileModel.name, pngFileModel.name, firstPdfFileModel.name];

    beforeAll(async () => {

        await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);
        await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
github Alfresco / alfresco-ng2-components / e2e / content-services / document-list / document-list-copy-move.e2e.ts View on Github external
describe('Document List Component - Actions', () => {

    const loginPage = new LoginPage();
    const contentServicesPage = new ContentServicesPage();
    const contentListPage = contentServicesPage.getDocumentList();
    const contentNodeSelector = new ContentNodeSelectorDialogPage();
    const paginationPage = new PaginationPage();
    const breadCrumbDropdownPage = new BreadCrumbDropdownPage();
    const breadCrumbPage = new BreadCrumbPage();
    const infinitePaginationPage = new InfinitePaginationPage(element(by.css('adf-content-node-selector')));

    const alfrescoJsApi = new AlfrescoApi({
        provider: 'ECM',
        hostEcm: browser.params.testConfig.adf.url
    });
    const uploadActions = new UploadActions(alfrescoJsApi);

    describe('Folder Actions - Copy and Move', () => {

        const folderModel1 = new FolderModel({ 'name': StringUtil.generateRandomString() });
        const folderModel2 = new FolderModel({ 'name': StringUtil.generateRandomString() });
        const folderModel3 = new FolderModel({ 'name': StringUtil.generateRandomString() });
        const folderModel4 = new FolderModel({ 'name': StringUtil.generateRandomString() });
        const folderModel5 = new FolderModel({ 'name': StringUtil.generateRandomString() });
        const folderModel6 = new FolderModel({ 'name': StringUtil.generateRandomString() });

        let folder1, folder2, folder3, folder4, folder5, folder6;

        let folders;
        const contentServicesUser = new AcsUserModel();
github Alfresco / alfresco-ng2-components / e2e / search / components / search-slider.e2e.ts View on Github external
describe('Search Slider Filter', () => {

    const loginPage = new LoginPage();
    const searchDialog = new SearchDialog();
    const searchFilters = new SearchFiltersPage();
    const sizeSliderFilter = searchFilters.sizeSliderFilterPage();
    const searchResults = new SearchResultsPage();
    const navigationBarPage = new NavigationBarPage();
    const dataTable = new DataTableComponentPage();

    const acsUser = new AcsUserModel();

    const file2BytesModel = new FileModel({
        'name': browser.params.resources.Files.ADF_DOCUMENTS.UNSUPPORTED.file_name,
        'location': browser.params.resources.Files.ADF_DOCUMENTS.UNSUPPORTED.file_location
    });

    let file2Bytes;
    this.alfrescoJsApi = new AlfrescoApi({
        provider: 'ECM',
        hostEcm: browser.params.testConfig.adf_acs.host
    });
    const uploadActions = new UploadActions(this.alfrescoJsApi);

    beforeAll(async () => {

        await this.alfrescoJsApi.login(browser.params.testConfig.adf.adminEmail, browser.params.testConfig.adf.adminPassword);

        await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);