Skip to content

Conversation

@VladimirMakaev
Copy link
Contributor

#305

Async/Await is only supported in es2015+ target (and it doesn't seem to be supported for es5 anytime soon) but that's a very nice and neat feature for writing e2e tests as many constructs in nodejs selenium is based on promises and as tests are getting more complicated more and more friction is expected when using promises.

In order to do that e2e tests should be built with another tsconfig.json file. But we still want to compile the main application for es5

This PR consist of the following

  • e2e tests and framework moved outside of client folder into e2e folder. This is required to support proper detection of another project by VS Code. Separate tsconfig.json is used for that folder
  • additional config variables added to E2E locations to follow the seed patterns
  • typing is added to makeTsProject to make it nicer to use
  • the option { target: 'es2015' } is used in build.js.e2e.ts is used as a workaround to the global variable used inside of the makeTsProject to support more than one project at the same time. @NathanWalker we could think of fixing it in some way but I don't think a new function is a good idea either.
  • selectDropdownByValue has been made async and the wait removed from it's signature

@NathanWalker
Copy link
Owner

@VladimirMakaev This is really excellent, great work. I'm wondering if Minko may also like this in the parent seed (https://github.com/mgechev/angular-seed), I'll create an issue to ask.

@NathanWalker
Copy link
Owner

NathanWalker commented Nov 18, 2016

@VladimirMakaev Please fork the parent seed: https://github.com/mgechev/angular-seed, then drop the same code in the fork and submit a PR there. These changes would be excellent there as well. Once @mgechev merges in the parent, then they will end up in this seed (since this seed mirrors all changes there). And your work will help not only user's of this seed, but both 👍

@NathanWalker
Copy link
Owner

When you submit changes there, you can just use standard jasmine (since the shorthand tools are only available here). Once I merge the parent changes in, I'll convert back to shorthand as you have here in this PR so you don't need to worry about that.

@NathanWalker
Copy link
Owner

@VladimirMakaev Just leave this PR open with these changes since it contains the modifications to the selectDropdownByValue. Once merged in parent, I'll refactor that in here.

@VladimirMakaev
Copy link
Contributor Author

I'll have a look at the parent project will try to get the PR there soon

@VladimirMakaev
Copy link
Contributor Author

Sent the PR out mgechev/angular-seed#1642

@VladimirMakaev
Copy link
Contributor Author

@NathanWalker The PR is merged in the parent project. There is a slight fix with tslint working for e2e too. Let me know if you need any help integrating it here

@NathanWalker
Copy link
Owner

Thanks @VladimirMakaev I will do the merge later tonight or tomorrow for sure 👍

@NathanWalker
Copy link
Owner

@VladimirMakaev I have merged the parent seed changes in which included this and I made the adjustments needed for this seed. Thank you again!! 👍 I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants