-
Notifications
You must be signed in to change notification settings - Fork 438
Async/Await support for e2e tests #306
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
Conversation
|
@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. |
|
@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 👍 |
|
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. |
|
@VladimirMakaev Just leave this PR open with these changes since it contains the modifications to the |
|
I'll have a look at the parent project will try to get the PR there soon |
|
Sent the PR out mgechev/angular-seed#1642 |
|
@NathanWalker The PR is merged in the parent project. There is a slight fix with |
|
Thanks @VladimirMakaev I will do the merge later tonight or tomorrow for sure 👍 |
|
@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. |
#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.jsonfile. But we still want to compile the main application for es5This PR consist of the following
clientfolder intoe2efolder. This is required to support proper detection of another project by VS Code. Separatetsconfig.jsonis used for that foldermakeTsProjectto make it nicer to use{ target: 'es2015' }is used inbuild.js.e2e.tsis used as a workaround to the global variable used inside of themakeTsProjectto 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.selectDropdownByValuehas been madeasyncand the wait removed from it's signature