Skip to content

feat(@angular/cli) override suite in the protractor config #8354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 3, 2018

Conversation

aniruddhadas9
Copy link
Contributor

feat(@angular/cli) override suite in the protractor config

resolves: 807
Override suite in the protractor config.
Can send in multiple suite by comma seperated values (ng e2e --suite=suite1.ts, suite2.ts).

Issue link
github.com//issues/807
github.com//pull/3551

@aniruddhadas9 aniruddhadas9 mentioned this pull request Nov 10, 2017
@filipesilva filipesilva self-requested a review November 20, 2017 11:57
@filipesilva filipesilva self-assigned this Nov 20, 2017
Copy link
Contributor

@filipesilva filipesilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a nice feature, thanks for taking it on. It's important to verify it works and that we don't break it in the future, so can you add a e2e test please?

A good place would be in https://github.com/angular/angular-cli/tree/master/tests/e2e/tests/test.

@aniruddhadas9
Copy link
Contributor Author

@filipesilva started writing e2e and will append them to this pull request.

@dallasacook
Copy link

@filipesilva Have the changes met your requests?

@dallasacook
Copy link

@aniruddhadas9 can you take a look at why the CI checks are failing for this? I would love to see this feature merged.

@aniruddhadas9
Copy link
Contributor Author

@dallasacook sure, I will look into it and fix this build issue.

@aniruddhadas9
Copy link
Contributor Author

aniruddhadas9 commented Dec 26, 2017

@dallasacook @filipesilva, I have updated code and test case. I have manually tested all possible scenario to make sure everything works fine. The Travis job is failing due to committing message, I think it because of the merge commit happened when I updated code from the base and merged my code. Please let me know if anything else needs to be taken care off.

Copy link
Contributor

@filipesilva filipesilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the whitespace changes in tests/e2e/assets/1.0.0-proj/protractor.conf.js I think everything looks good!

CI is failing because of the commit message, yes... there's two things you need to do:

  • have a single commit instead of 9 commits
  • change the commit message to feat(@angular/cli): override suite in the protractor config (notice the :)

You can do both with git rebase master -i.

@@ -17,15 +17,16 @@ exports.config = {
jasmineNodeOpts: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the changes to this file? It's true that they are just harmless whitespace, but they are also unnecessary so we shouldn't change it without a good reason.

@@ -34,6 +34,21 @@ export default function () {
.then(() => copyFile('./e2e/renamed-app.e2e-spec.ts', './e2e/another-app.e2e-spec.ts'))
.then(() => ng('e2e', '--specs', './e2e/renamed-app.e2e-spec.ts',
'--specs', './e2e/another-app.e2e-spec.ts'))
// Suites block need to be added in the protractor.conf.js file to test suites
.then(() => replaceInFile('protractor.conf.js', `allScriptsTimeout: 11000,`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good test. I tried to do this without the your PR and e2e broke with Error: Unknown test suite: app.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you :). Yap, I also tried same and some other combination and thought to add suites and then test it.

resolves: 807
Override suite in the protractor config.
Can send in multiple suite by comma seperated values (ng e2e --suite=suite1.ts, suite2.ts).

Issue link
 github.com/angular/issues/807
 github.com/angular/pull/3551
@aniruddhadas9 aniruddhadas9 force-pushed the aniruddhadas9-patch-1 branch from 40e7532 to 1e60634 Compare January 2, 2018 22:29
@aniruddhadas9
Copy link
Contributor Author

@filipesilva Thanks for reviewing :) . Now merged all of them to one commit and removed formatting related changes in the protractor.conf.js file. I think everything will go fine now.

@aniruddhadas9
Copy link
Contributor Author

@filipesilva its failing due to unable to connect to server now.


Cloning into 'angular/angular-cli'...
fatal: unable to access 'https://github.com/angular/angular-cli.git/': Failed to connect to github.com port 443: Connection timed out
The command "eval git clone --depth=50 https://github.com/angular/angular-cli.git angular/angular-cli " failed. Retrying, 2 of 3.
Cloning into 'angular/angular-cli'...
fatal: unable to access 'https://github.com/angular/angular-cli.git/': Failed to connect to github.com port 443: Connection timed out
The command "eval git clone --depth=50 https://github.com/angular/angular-cli.git angular/angular-cli " failed. Retrying, 3 of 3.
Cloning into 'angular/angular-cli'...
fatal: unable to access 'https://github.com/angular/angular-cli.git/': Failed to connect to github.com port 443: Connection timed out
The command "eval git clone --depth=50 https://github.com/angular/angular-cli.git angular/angular-cli " failed 3 times.
Failed to clone from GitHub.
Checking GitHub status (https://status.github.com/api/last-message.json):
good
Everything operating normally.
2017-11-28T00:03:47Z

@filipesilva filipesilva merged commit 265eb96 into angular:master Jan 3, 2018
@filipesilva
Copy link
Contributor

@aniruddhadas9 thanks for taking the time to implement this feature! It should be on the next minor version, 1.7 (we don't publish features on patch version 1.6.x).

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants