Skip to content

Commit

Permalink
OSCI-5444: do not show waive button for not-required tests
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Stepanov <astepano@redhat.com>
  • Loading branch information
Andrei-Stepanov authored and mgrabovsky committed Jul 31, 2023
1 parent 67c42c8 commit aa850f6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/utils/artifactUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -797,12 +797,17 @@ const SATISFIED_REQUIREMENT_TYPES: GreenwaveRequirementTypesType[] = [
'test-result-passed',
];

const isRequirementSatisfied = (state: StateGreenwaveType): boolean =>
_.includes(SATISFIED_REQUIREMENT_TYPES, state.requirement?.type);
const isRequirementSatisfied = (state: StateGreenwaveType): boolean => {
if (!state.requirement) {
return true;
}
return _.includes(SATISFIED_REQUIREMENT_TYPES, state.requirement?.type);
};

/**
* Should we display a waive button for this result in the dashboard?
* Show the button only if the test is blocking gating.
* Greenwave shows all known tests from ResultsDB.
* @param state The state object of the test result in question.
*/
export const isResultWaivable = (state: StateType): boolean => {
Expand Down

0 comments on commit aa850f6

Please sign in to comment.