Commit Graph

4 Commits

Author SHA1 Message Date
Pierre-Yves B
1f29c22d3d Migrated most service tests to use new expectBadge (#3122) 2019-02-28 21:43:23 +00:00
Paul Melnikow
2d7be31b0c Validate query params in BaseService (#3042)
This is a mid-sized PR that adds query param validation to BaseService and updates most of the services which use query param validation to use it. There are a couple minor tweaks I made along the way.

Fix #2676
2019-02-20 22:24:47 -05:00
Paul Melnikow
24bc7bcfc3 Combine some badge examples using drop-downs, tweak some titles (#3037)
This updates several badges to take advantage of the change from #2882.
2019-02-18 23:04:25 -05:00
Yves M
ee1a3564f0 Add Mozilla HTTP Observatory badge [MozillaObservatory] (#2935)
* Begin adding a Mozilla Observatory badge (#2912)

* Update tests to add `_shields_test` style

* Add grade D and E tests

* Use Shields color scheme

See https://github.com/badges/shields/issues/2912#issuecomment-461692102

Resolves https://github.com/badges/shields/pull/2935#pullrequestreview-201432260

* Fix grade response validation regex

A bit related to https://github.com/badges/shields/pull/2935#pullrequestreview-201430779

* Add the host query param via `qs`

Resolves https://github.com/badges/shields/pull/2935#pullrequestreview-201431030

* Make integration test on `observatory.mozilla.org`

- Use `observatory.mozilla.org` instead of `httpforever.com` which redirects to `observatory.mozilla.org` anyway
- Use Joi to validate response

* Define label using `defaultBadgeData`

Resolves https://github.com/badges/shields/pull/2935#pullrequestreview-201431659

* Use short hand `createServiceTester` function helper in tests

Resolves https://github.com/badges/shields/pull/2935#pullrequestreview-201431898

* Make strict API response validation

See https://github.com/badges/shields/pull/2935#discussion_r255097377

* Use the `POST` API endpoint to trigger new scan

See https://github.com/badges/shields/issues/2912#issuecomment-462064216

* Handle unfinished states

See https://github.com/badges/shields/issues/2912#issuecomment-462064216

* Split in two separate badges, with and without score

See https://github.com/badges/shields/issues/2912#issuecomment-461692102

* Add a `publish` parameter to include the result in public list

See https://github.com/badges/shields/issues/2912#issuecomment-461764463

* Add documentation

* Update tester importer

* Remove redundant example keywords

Resolves https://github.com/badges/shields/pull/2935#discussion_r257086115

* Minor doc update

* Embed `which` parameter in examples

* Remove root path from pattern in examples

Resolves https://github.com/badges/shields/pull/2935#pullrequestreview-204582763 and https://github.com/badges/shields/pull/2935#pullrequestreview-204582728

* Pass missing `which` parameter to render in examples

Resolves https://github.com/badges/shields/pull/2935#discussion_r257525827
2019-02-18 10:11:44 -06:00