forked from rancher/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate coverage value for both unit and E2E tests (rancher#6690)
* Correct Jest coverage configuration * Add coverage upload * Exclude operationsl scripts from linting * Rephrase title based on pull request title, run and attempt, with fallback for commits * Add instrumentation for E2E coverage report * Add merge logic to the coverage files * Add instrumentalization for Cypress to generate coverage for E2E * Download artifacts before merge coverage in CI * Merge fix * Copy coverage files before artifact upload * Add summary after running tests * Change restriction rules about coverage for pull_request and push * Add documentation for the coverage * Correct test documentation folder restructuring * Add inclusion list for Cypress coverage; add scripts as exclusion * Extend ignored path to be parsed for Jest to improve performances * Workflow cleanup * Checkout current branch head on test runs * Submit separated coverage with different flags
- Loading branch information
Showing
16 changed files
with
537 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"reporter": [ "json", "text-summary"], | ||
"report-dir": "coverage/e2e" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
"autoscroll", | ||
"cacerts", | ||
"chainable", | ||
"Codecov", | ||
"epinio", | ||
"hevi", | ||
"kube", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
type Matcher = '$' | '^' | '~' | '*' | ''; | ||
|
||
// eslint-disable-next-line no-unused-vars | ||
declare namespace Cypress { | ||
interface Chainable { | ||
login(username?: string, password?: string, cacheSession?: boolean): Chainable<Element>; | ||
byLabel(label: string,): Chainable<Element>; | ||
|
||
/** | ||
* Wrapper for cy.get() to simply define the data-testid value that allows you to pass a matcher to find the element. | ||
* @param id Value used for the data-testid attribute of the element. | ||
* @param matcher Matching character used for attribute value: | ||
* - `$`: Suffixed with this value | ||
* - `^`: Prefixed with this value | ||
* - `~`: Contains this value as whitespace separated words | ||
* - `*`: Contains this value | ||
*/ | ||
getId(id: string, matcher?: Matcher): Chainable<Element>; | ||
|
||
/** | ||
* Wrapper for cy.find() to simply define the data-testid value that allows you to pass a matcher to find the element. | ||
* @param id Value used for the data-testid attribute of the element. | ||
* @param matcher Matching character used for attribute value: | ||
* - `$`: Suffixed with this value | ||
* - `^`: Prefixed with this value | ||
* - `~`: Contains this value as whitespace separated words | ||
* - `*`: Contains this value | ||
*/ | ||
findId(id: string, matcher?: Matcher): Chainable<Element>; | ||
|
||
/** | ||
* Override user preferences to default values, allowing to pass custom preferences for a deterministic scenario | ||
* Leave empty for reset to default values | ||
*/ | ||
// eslint-disable-next-line no-undef | ||
userPreferences(preferences?: Partial<UserPreferences>): Chainable<null>; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.