Skip to content

Commit

Permalink
Fix checks link in stats page (kubewarden#537)
Browse files Browse the repository at this point in the history
Signed-off-by: Cintia Sanchez Garcia <[email protected]>
  • Loading branch information
cynthia-sg authored Aug 31, 2022
1 parent 0149bfd commit c30a6d5
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 2 deletions.
6 changes: 5 additions & 1 deletion web/src/layout/stats/ProgressBarInLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ const ProgressBarInLine = (props: Props) => {
<div className={styles.progressTitle}>
<span className="d-inline-block d-md-none">{props.title}</span>
<span className="d-none d-md-inline-block">
<button onClick={() => props.onSelectCheck(props.name)} className={`btn btn-link p-0 ${styles.btn}`}>
<button
aria-label={`Search projects with passed ${props.title} check`}
onClick={() => props.onSelectCheck(props.name)}
className={`btn btn-link p-0 ${styles.btn}`}
>
{props.title}
</button>
</span>
Expand Down
8 changes: 8 additions & 0 deletions web/src/layout/stats/__snapshots__/Checks.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ exports[`Checks creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Analytics check"
class="btn btn-link p-0 btn"
>
Analytics
Expand Down Expand Up @@ -111,6 +112,7 @@ exports[`Checks creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Artifact Hub badge check"
class="btn btn-link p-0 btn"
>
Artifact Hub badge
Expand Down Expand Up @@ -172,6 +174,7 @@ exports[`Checks creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed CLA check"
class="btn btn-link p-0 btn"
>
CLA
Expand Down Expand Up @@ -236,6 +239,7 @@ exports[`Checks creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Community meeting check"
class="btn btn-link p-0 btn"
>
Community meeting
Expand Down Expand Up @@ -297,6 +301,7 @@ exports[`Checks creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed DCO check"
class="btn btn-link p-0 btn"
>
DCO
Expand Down Expand Up @@ -361,6 +366,7 @@ exports[`Checks creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed OpenSSF badge check"
class="btn btn-link p-0 btn"
>
OpenSSF badge
Expand Down Expand Up @@ -425,6 +431,7 @@ exports[`Checks creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Recent release check"
class="btn btn-link p-0 btn"
>
Recent release
Expand Down Expand Up @@ -486,6 +493,7 @@ exports[`Checks creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Slack presence check"
class="btn btn-link p-0 btn"
>
Slack presence
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ exports[`ProgressBarInLine creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Governance check"
class="btn btn-link p-0 btn"
>
Governance
Expand Down
29 changes: 29 additions & 0 deletions web/src/layout/stats/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Adopters check"
class="btn btn-link p-0 btn"
>
Adopters
Expand Down Expand Up @@ -1574,6 +1575,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Changelog check"
class="btn btn-link p-0 btn"
>
Changelog
Expand Down Expand Up @@ -1635,6 +1637,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Code of conduct check"
class="btn btn-link p-0 btn"
>
Code of conduct
Expand Down Expand Up @@ -1698,6 +1701,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Contributing check"
class="btn btn-link p-0 btn"
>
Contributing
Expand Down Expand Up @@ -1759,6 +1763,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Governance check"
class="btn btn-link p-0 btn"
>
Governance
Expand Down Expand Up @@ -1820,6 +1825,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Maintainers check"
class="btn btn-link p-0 btn"
>
Maintainers
Expand Down Expand Up @@ -1884,6 +1890,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Readme check"
class="btn btn-link p-0 btn"
>
Readme
Expand Down Expand Up @@ -1951,6 +1958,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Roadmap check"
class="btn btn-link p-0 btn"
>
Roadmap
Expand Down Expand Up @@ -2012,6 +2020,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Website check"
class="btn btn-link p-0 btn"
>
Website
Expand Down Expand Up @@ -2086,6 +2095,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed License found check"
class="btn btn-link p-0 btn"
>
License found
Expand Down Expand Up @@ -2147,6 +2157,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Approved license check"
class="btn btn-link p-0 btn"
>
Approved license
Expand Down Expand Up @@ -2208,6 +2219,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed License scanning check"
class="btn btn-link p-0 btn"
>
License scanning
Expand Down Expand Up @@ -2284,6 +2296,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Artifact Hub badge check"
class="btn btn-link p-0 btn"
>
Artifact Hub badge
Expand Down Expand Up @@ -2345,6 +2358,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed CLA check"
class="btn btn-link p-0 btn"
>
CLA
Expand Down Expand Up @@ -2409,6 +2423,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Community meeting check"
class="btn btn-link p-0 btn"
>
Community meeting
Expand Down Expand Up @@ -2470,6 +2485,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed DCO check"
class="btn btn-link p-0 btn"
>
DCO
Expand Down Expand Up @@ -2534,6 +2550,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed OpenSSF badge check"
class="btn btn-link p-0 btn"
>
OpenSSF badge
Expand Down Expand Up @@ -2598,6 +2615,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Recent release check"
class="btn btn-link p-0 btn"
>
Recent release
Expand Down Expand Up @@ -2659,6 +2677,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Slack presence check"
class="btn btn-link p-0 btn"
>
Slack presence
Expand Down Expand Up @@ -2734,6 +2753,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Binary artifacts check"
class="btn btn-link p-0 btn"
>
Binary artifacts
Expand Down Expand Up @@ -2799,6 +2819,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Code review check"
class="btn btn-link p-0 btn"
>
Code review
Expand Down Expand Up @@ -2860,6 +2881,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Dangerous workflow check"
class="btn btn-link p-0 btn"
>
Dangerous workflow
Expand Down Expand Up @@ -2921,6 +2943,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Dependency update tool check"
class="btn btn-link p-0 btn"
>
Dependency update tool
Expand Down Expand Up @@ -2982,6 +3005,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Maintained check"
class="btn btn-link p-0 btn"
>
Maintained
Expand Down Expand Up @@ -3050,6 +3074,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed SBOM check"
class="btn btn-link p-0 btn"
>
SBOM
Expand Down Expand Up @@ -3111,6 +3136,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Security policy check"
class="btn btn-link p-0 btn"
>
Security policy
Expand Down Expand Up @@ -3172,6 +3198,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Signed releases check"
class="btn btn-link p-0 btn"
>
Signed releases
Expand Down Expand Up @@ -3233,6 +3260,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Token permissions check"
class="btn btn-link p-0 btn"
>
Token permissions
Expand Down Expand Up @@ -3307,6 +3335,7 @@ exports[`StatsView creates snapshot 1`] = `
class="d-none d-md-inline-block"
>
<button
aria-label="Search projects with passed Trademark disclaimer check"
class="btn btn-link p-0 btn"
>
Trademark disclaimer
Expand Down
Loading

0 comments on commit c30a6d5

Please sign in to comment.