-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2587 from mturley/dw-initial-cypress-tests
Add missing cypress tests for initial Distributed Workloads views, fix minor architecture issues, factor out components for sections of the Workload Status tab
- Loading branch information
Showing
18 changed files
with
387 additions
and
157 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { PrometheusQueryResponse } from '~/types'; | ||
|
||
type MockPrometheusDWQueryType = { | ||
result?: { value: [number, string] }[]; | ||
}; | ||
|
||
export const mockPrometheusDWQuery = ({ | ||
result, | ||
}: MockPrometheusDWQueryType): { | ||
code?: number; | ||
response: PrometheusQueryResponse; | ||
} => ({ | ||
code: 200, | ||
response: { | ||
status: 'success', | ||
data: { | ||
resultType: 'vector', | ||
result: result ?? [], | ||
}, | ||
}, | ||
}); |
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,26 @@ | ||
import { PrometheusQueryRangeResponse, PrometheusQueryRangeResponseDataResult } from '~/types'; | ||
|
||
type MockPrometheusDWQueryRangeType = { | ||
result?: PrometheusQueryRangeResponseDataResult[]; | ||
}; | ||
|
||
export const mockPrometheusDWQueryRange = ({ | ||
result, | ||
}: MockPrometheusDWQueryRangeType): { | ||
code?: number; | ||
response: PrometheusQueryRangeResponse; | ||
} => ({ | ||
code: 200, | ||
response: { | ||
status: 'success', | ||
data: { | ||
resultType: 'matrix', | ||
result: result ?? [ | ||
{ | ||
metric: {}, | ||
values: [], | ||
}, | ||
], | ||
}, | ||
}, | ||
}); |
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
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
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
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
66 changes: 0 additions & 66 deletions
66
...end/src/pages/distributedWorkloads/global/GlobalDistributedWorkloadsProjectMetricsTab.tsx
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.