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

Travis build is broken with selenium-webdriver tests. #1773

Closed
ponelat opened this issue Nov 21, 2015 · 9 comments · Fixed by swagger-api/swagger-js#637
Closed

Travis build is broken with selenium-webdriver tests. #1773

ponelat opened this issue Nov 21, 2015 · 9 comments · Fixed by swagger-api/swagger-js#637

Comments

@ponelat
Copy link
Member

ponelat commented Nov 21, 2015

By some magic, if I build with node.js 4.2.2 the tests run. If I build with 0.10 (as travis is configured to) it fails.

Initially I thought this was related to browserify, but swagger-ui just concats its files!

@ponelat
Copy link
Member Author

ponelat commented Nov 21, 2015

Looks like I've narrowed it down to swagger-client@2.1.7
Might be a simple fix (like updating the IDs)

@ponelat
Copy link
Member Author

ponelat commented Nov 21, 2015

So... the fix is not so simple...
Turns out the bug is quite deep... its in the browser-shim for Buffer feross/buffer#79

@ponelat
Copy link
Member Author

ponelat commented Nov 21, 2015

A possible workaround is to force a downgrade of buffer in swagger-js to something that works

@fehguy
Copy link
Contributor

fehguy commented Nov 21, 2015

Eww yes we can go to 3.4.3 in js if we can verify that it works

@ponelat
Copy link
Member Author

ponelat commented Nov 21, 2015

I've tested locally

PS: this didn't just break the tests. It broke Swagger-UI. I tested the above by serving up swagger-ui, as well with Chrome 46 and firefox (?)

swagger-ui@master ( with swagger-client@2.1.7 ) , built on node.js <= 0.12.x would produce a browser error and stall.

@fehguy
Copy link
Contributor

fehguy commented Nov 23, 2015

how could it break swagger-ui? there is no node process in the runtime of that, unless it's causing it to build incorrectly.

@ponelat
Copy link
Member Author

ponelat commented Nov 23, 2015

at build time, it adds the erroneous module to it.

TLDR;
I built with node 0.10 and added the files to this branch... https://github.com/swagger-api/swagger-ui/tree/showcase/built-with-0.10
Serve it and see, you'll get a browser error that stalls it.

To repeat...

Where pwd is swagger-ui

 cd to .../../.swagger-ui
 docker run -it -v `pwd`:/usr/app node:0.10 bash
 cd /usr/app npm i && npm run build
 exit
 # Serve swagger-ui/dist and see

@Udayakumarg
Copy link

Hi All,

I am trying to Automate Swagger using selenium. Seleinium is not able to identify the elements, Please let me know what are the setup's required to do.

@ponelat
Copy link
Member Author

ponelat commented Aug 14, 2017

I imagine you might need to wait for the javascript to render the page first. Once its loaded, you can use any old selector to find the elements.

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

Successfully merging a pull request may close this issue.

3 participants