bcgov / nr-frontend-starting-app

This repository holds a simple Web app using React, to get team started with integrations, authentication and deeployments.
Apache License 2.0
3 stars 1 forks source link

fix tests to match the carbon update #21

Closed dogivalfer closed 2 years ago

dogivalfer commented 2 years ago

Description

All the existing tests were fixed to work with the carbon design update and more test cases were added including some negative cases.

Fixes # 192

Type of change

How Has This Been Tested?

Tested locally with the environment URL pointing to the PR link.

Checklist

Further comments

github-actions[bot] commented 2 years ago

DEV deployments have completed successfully! Frontend: [https://nrfesampleapp-21-app.apps.silver.devops.gov.bc.ca/]()

dogivalfer commented 2 years ago

@mgaseta Added the test case, I'd forgotten this one the first time :sweat:. Also made changes to allow direct import fixtures JSON files.

sonarcloud[bot] commented 2 years ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

github-actions[bot] commented 2 years ago

Coverage report

Coverage after merging test/update_test_carbon into main will be
46.70%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   App.tsx100%100%100%100%
src/components/Card
   index.tsx100%100%100%100%
src/components/CardLoader
   index.tsx60%100%0%75%6
src/components/Footer
   index.tsx100%100%100%100%
src/components/FooterBox
   index.ts100%100%100%100%
src/components/FooterLink
   index.ts100%100%100%100%
src/components/Header
   index.tsx100%100%100%100%
src/components/HeaderBanner
   index.tsx100%100%100%100%
src/components/HeaderBox
   index.tsx100%100%100%100%
src/components/HeaderImage
   index.tsx100%100%100%100%
src/components/HeaderTitle
   index.tsx100%100%100%100%
src/components/Label
   index.tsx100%100%100%100%
src/components/LoaderBox
   index.tsx100%100%100%100%
src/components/TextInput
   index.tsx100%100%100%100%
src/components/UserTable
   index.tsx33.33%100%0%50%12, 24, 29
src/layout/PublicLayout
   index.tsx100%100%100%100%
src/service
   FetchApi.ts4%0%0%7.14%10, 18–20, 20, 20, 20–21, 24, 41–42, 44, 44–45, 47, 50, 53, 9, 9
   GetExceptionResponse.ts14.29%0%0%20%4, 4–6, 9
src/views/Form
   index.tsx10%0%0%13.33%100, 104–105, 107, 107, 107–109, 111–112, 116–117, 119, 119, 119–121, 123–124, 128–129, 131, 131, 131, 131, 131–133, 133, 133–135, 135–136, 139–140, 142, 142–143, 147–148, 148–149, 153–155, 158–160, 163–164, 167, 176, 176, 183, 183, 20, 22–24, 26–28, 30–31, 33–34, 36–39, 41–43, 45–46, 49–53, 55, 55–57, 57, 57–60, 60–62, 68–72, 74, 78–79, 84–88, 90, 94–98
src/views/Home
   index.tsx100%100%100%100%
src/views/Table
   index.tsx60%100%0%75%6
github-actions[bot] commented 2 years ago

Your Pull Request code is being promoted! Please follow the link below. Main Merge Workflow