Skip to content
This repository has been archived by the owner on Oct 6, 2018. It is now read-only.

Make the test cases work with Webdriver IO v4.0.5 #9

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

leutloff
Copy link

@leutloff leutloff commented Apr 8, 2016

I am interested in getting this package work with latest Webdriver IO v4.0.5.

Therefore I have changed the test cases to work with the synchronous version of the Webdriver IO. The wdio is used to run the test cases. The angular-client.js has a local variable setting a time to wait. Setting this time to 2000 ms making the test cases work. Setting this variable to 0 make the tests fail.

The missing step to fix issue #8 is the real integration into Angular JS. It is not obvious to me what changes are required to make the browser variable use the provided hooks.

The wdio.conf.js is prepared to execute the tests on sauselabs, too.
(It is copied from my working project: https://github.com/leutloff/e2e-webdriverio-mocha-tdd-example)

@christian-bromann
Copy link
Contributor

@leutloff thanks for your contribution. I would be also interested to get this working. I would like to have this as a service though. It could overwrite all necessary commands in the before hooks so that user can seamlessly use WebdriverIO with Angular if the service is embedded

@christian-bromann
Copy link
Contributor

So here are the things that I see have to be done:

  • make a service out if this project
  • rename project to wdio-angular-service
  • mark old package as deprecated in NPM
  • overwrite WebdriverIO commands for AngularJS within the service
  • publish as new service and add it to the cli configurator in WebdriverIO

It would be also nice if this service could add some enhancements that are implemented in Protractor. I am not a big Protractor expert but there might be features that are required and often used when testing AngularJS applications

@leutloff what do you think?

@leutloff
Copy link
Author

leutloff commented Apr 8, 2016

Sounds good to me.

But I am new to Javascript, Webdriver IO and Angular JS...
What is required to "make a service". Is there a template/example I can look at?

(btw. Cool, the Travis CI works with Phantom JS the same as my local Chrome based runs.)

@christian-bromann
Copy link
Contributor

Yeah check out the wdio-sauce-service. We need something like that but without the launcher part.

@leutloff
Copy link
Author

leutloff commented Apr 8, 2016

Okay. Looks good. May be I can give it a try on Sunday. We will see...

@leutloff
Copy link
Author

I have added grunt and renamed/moved the existing source a little around to come in line with the wdio-sauce-service. But after updating to latest packages I am now getting this message when running grunt:

Running "babel:dist" (babel) task
Warning: Plugin 0 specified in "base" provided an invalid property of "__esModule" Use --force to continue.

I'm knowing nothing about babel except the purpose... Searching the web for this warning hasn't solved the problem. 8-(

@christian-bromann: What is now the best way to proceed? Revert to the older babel packages (version NN) or fix the root cause by ...?

@christian-bromann
Copy link
Contributor

@leutloff thanks for the work! I will take a look to find the root cause

@leutloff
Copy link
Author

@christian-bromann: root cause found: The plugin 'object-assign' has to be renamed to 'transform-object-assign' the same way as the providing package was renamed. Now babel compiles again.

@leutloff
Copy link
Author

@christian-bromann: Now I have a first guess on how the service may work. babel transpiles without a message. Now I want to start the tests using wdio. Adding the new service to wdio fails, because there is no wdio-angular-service found. This is expected because this new service is not installed in the expected directory. What is the correct place to add this new service for testing? The wdio-sauce-service and wdio-selenium-standalone-service are not using tests so far. So I cann't get the information from there.

Any hints what needs to be changed to make this work is very appreciated, too.

@christian-bromann
Copy link
Contributor

@christian-bromann
Copy link
Contributor

@leutloff any news on this?

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.

2 participants