Skip to content

How to build with ng e2e and run config file via protractor-flake? #100

@idanilovqa

Description

@idanilovqa

Hi there!
We are trying to make protractor-flake work with building our code before running the tests.
Right now all I got working is a command like this "protractor-flake --parser standard --max-attempts=3 -- protractor.conf.js" which is good to run protractor-flake tests on an already built enviroment.

However, every time I try something like "protractor-flake --parser standard --max-attempts=3 -- ng e2e" or similar, I get different errors and nothing works.

What I tried:

  1. Adding flake configuration without protractorConfig to angular.json, and then running npm run flake ("protractor-flake --parser standard --max-attempts=3 -- ng flake./protractor.conf.js") results in three idle and instant re-tries with the message "Error: Error: more than one config file specified"

  2. Executing "protractor-flake --parser standard --max-attempts=3 -- ng e2e" with ./protractor.conf.js defined in e2e/protractorConfig property in angular.json results in the same message and behavior.

  3. Adding the whole "protractor-flake --parser standard --max-attempts=3 -- ./protractor.conf.js" line to e2e/protractorConfig in angular.json and running it via "npm run e2e" command results in code actually being built, but after build is done it all fail with the message:

"[11:03:12] E/configParser - Error code: 105
[11:03:13] E/configParser - Error message: failed loading configuration file C:\Users\ilia.danilov\WebStormProjects\dashboard_frontend\protractor-flake --parser standard --max-attempts=3 -- .\protractor.conf.js
[11:03:13] E/configParser - Error: Cannot find module 'C:\Users\ilia.danilov\WebStormProjects\dashboard_frontend\protractor-flake --parser standard --max-attempts=3 -- .\protractor.conf.js'"

Please, advise what can be done. I searched all internet and never found a single example of using protractor-flake with abgular-cli.

"protractor-flake": "version": "3.3.0",
"protractor": "version": "5.4.1",
"@types/node": "^6.0.117",
"@angular/cli": "^6.2.3".

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions