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

Bower badge shows void instead of alpha #1098

Closed
limonte opened this issue Sep 26, 2017 · 5 comments
Closed

Bower badge shows void instead of alpha #1098

limonte opened this issue Sep 26, 2017 · 5 comments

Comments

@limonte
Copy link

limonte commented Sep 26, 2017

Actual result: "void"
Expected result: "v1.0.0-alpha7"

There's the v1.0.0-alpha7 tag: https://github.com/vaadin/vaadin-checkbox/releases/tag/v1.0.0-alpha7

@ritwickdey
Copy link
Contributor

Hi, this is for your package on pre-release version. (not stable version).

I've made a PR #1099 on it.
You can access it through /bower/vpre/vaadin-checkbox.svg (BTW, on Bower, it is "v1.0.0-alpha6").


image





image

@paulmelnikow
Copy link
Member

Seems like there is also a usability issue here. Instead of displaying void when there are no releases, we should display something more user-friendly, like no releases. @ritwickdey Maybe you could test that case in your pull request, possibly using a mocked server response, and add a fix.

@ritwickdey
Copy link
Contributor

Hi @paulmelnikow , I've made changes & added 9 tests (including for invalid packages). But Is it possible to test for this 'no releases' label ? beacuse if I test it from any real package, soon or later that package may get official release. That time, it test will be failed.

@paulmelnikow
Copy link
Member

The way to accomplish that is using the intercept() method in your test. It lets you intercept the request that would be made to the server, and provide a fake response. Then the test doesn't hit the server at all! It's not perfect, since the fake response can get out of skew with what the real server would return, though it helps you test that your code is working as intended. There's some commentary in the service test readme and a working example in the cran tests.

@ritwickdey
Copy link
Contributor

Added 😄

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

3 participants