Skip to content
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

How to run end-to-end tests against local devenv? #6

Open
ericgriffis opened this issue Feb 22, 2018 · 5 comments
Open

How to run end-to-end tests against local devenv? #6

ericgriffis opened this issue Feb 22, 2018 · 5 comments

Comments

@ericgriffis
Copy link

I'm at NYU Libraries and we're implementing Primo NUI customizations, influenced greatly by your wonderful work on this repo. We've attempted end-to-end testing in a variety of frameworks but have been unsuccessful so far. I was able to run your e2e tests against your production primo, but I can't seem to run them against a local devenv, which it appears you all have done (due to the localhost in the config). When I attempt to run it against a local devenv, it doesn't load the page at all – it remains stuck on the loading symbol. That's true whether I use your customization views, ours, or none at all on my local devenv.

How were you able to run the Protractor e2e tests against a local devenv? Did you have to configure the devenv or tests in any special way? Any advice on this and automated testing of Primo NUI in general would be greatly appreciated.

@muratseyhan
Copy link
Contributor

Sorry for getting back so late. I am no longer working at Royal Danish Library, but I know that we ran them against our local environment too. If you still have the issue, could you check out the browser console and describe what you see? Otherwise, it would be great to know how you handled the issue.

@ericgriffis
Copy link
Author

Thanks for the reply @muratseyhan – The browser console isn't showing any errors when we run via Protractor, but Protractor is giving the error "Angular could not be found on the page … : angular never provided resumeBootstrap." I've read that this may be caused by BrowserSync, but I can't find a way to disable BrowserSync in the devenv and I've opened up an issue with them in that regard.

Is this an issue you encountered? Were you running the primo UI locally using the devenv or in some custom way?

@muratseyhan
Copy link
Contributor

Just to make sure, you are running the app locally while trying this, right?

We were using the devenv. IIRC, the only configuration we had on the devenv was the PROXY_SERVER in gulp/config.js. I will try to reproduce this when I will have the chance.

@ericgriffis
Copy link
Author

@muratseyhan Yes I was running the app locally (via the devenv). I also tried pointing to another proxy server over http and I got the same result. I can't point to a proxy server over https, however, because the devenv is running locally in http. Did you setup the devenv to run over https locally perhaps?

@muratseyhan
Copy link
Contributor

Hi @ericgriffis!

I finally had the chance to try this out. I was able to run the tests on a local server on Ubuntu 17.10. Some of the tests failed, but that's probably expected. They ran on protractor 5.3.0. I had to degrade to node v6.9.2 and install JDK to get protractor run.

Also, it seemed to work the same both with HTTP and HTTPS proxy URLs.

$ npm -v
3.10.9

$ node -v
v6.9.2

$ java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

I did a quick search on the error you receive, and it seemed to me like the error you received might be specific to some versions of protractor. Could you give it another try with the versions I used?

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

No branches or pull requests

2 participants