Shields: Bower badge shows void instead of alpha

Created on 26 Sep 2017  路  5Comments  路  Source: badges/shields

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

Most helpful comment

Added 馃槃

All 5 comments

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

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.

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.

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.

Added 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PyvesB picture PyvesB  路  3Comments

paulmelnikow picture paulmelnikow  路  3Comments

salaros picture salaros  路  3Comments

najeeb-ur-rehman picture najeeb-ur-rehman  路  3Comments

AlexWayfer picture AlexWayfer  路  3Comments