UI Tests for Object Detection Widgets in Model Overview (#2295)
* od widget test ckpt * auto lint fixes
This commit is contained in:
Родитель
024d904f1d
Коммит
3b6043a1c0
|
@ -149,6 +149,9 @@ export enum Locators {
|
|||
ModelOverviewMetricChartBars = "#ModelOverview #ModelOverviewMetricChart .highcharts-bar-series > rect",
|
||||
ModelOverviewConfusionMatrix = "#ModelOverview #modelOverviewConfusionMatrix",
|
||||
ModelOverviewConfusionMatrixHeatmap = "#ModelOverview #ModelOverviewConfusionMatrix",
|
||||
ModelOverviewAggregateMethod = "#ModelOverview #modelOverviewAggregateMethod",
|
||||
ModelOverviewClassSelector = "#ModelOverview #modelOverviewClassSelection",
|
||||
ModelOverviewIoUThresholdSlider = "#ModelOverview #modelOverviewIoUThreshold",
|
||||
MissingParameterPlaceholder = "#ModelOverview #MissingParameterPlaceholder",
|
||||
CounterfactualHeader = "#ModelAssessmentDashboard span:contains('What-If counterfactuals')",
|
||||
DataAnalysisPivot = "#dataAnalysisPivot",
|
||||
|
|
|
@ -55,7 +55,7 @@ export function describeModelOverview(
|
|||
|
||||
if (datasetShape.modelOverviewData?.hasModelOverviewComponent) {
|
||||
it("should have 'Model overview' component in the initial state", () => {
|
||||
ensureAllModelOverviewBasicElementsArePresent();
|
||||
ensureAllModelOverviewBasicElementsArePresent(datasetShape);
|
||||
ensureAllModelOverviewDatasetCohortsViewBasicElementsArePresent(
|
||||
datasetShape,
|
||||
false,
|
||||
|
@ -65,7 +65,7 @@ export function describeModelOverview(
|
|||
});
|
||||
|
||||
it("should show 'Feature cohorts' view when selected", () => {
|
||||
ensureAllModelOverviewBasicElementsArePresent();
|
||||
ensureAllModelOverviewBasicElementsArePresent(datasetShape);
|
||||
cy.get(Locators.ModelOverviewCohortViewFeatureCohortViewButton).click();
|
||||
ensureAllModelOverviewFeatureCohortsViewBasicElementsArePresent(
|
||||
datasetShape,
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
// Licensed under the MIT License.
|
||||
|
||||
import { Locators } from "../Constants";
|
||||
import { IModelAssessmentData } from "../IModelAssessmentData";
|
||||
|
||||
export function ensureAllModelOverviewBasicElementsArePresent(): void {
|
||||
export function ensureAllModelOverviewBasicElementsArePresent(
|
||||
datasetShape: IModelAssessmentData
|
||||
): void {
|
||||
cy.get(Locators.ModelOverviewHeader).should("exist");
|
||||
cy.get(Locators.ModelOverviewDescription).should("exist");
|
||||
cy.get(Locators.ModelOverviewCohortViewSelector).should("exist");
|
||||
|
@ -13,4 +16,10 @@ export function ensureAllModelOverviewBasicElementsArePresent(): void {
|
|||
3
|
||||
);
|
||||
cy.get(Locators.ModelOverviewMetricSelection).should("exist");
|
||||
|
||||
if (datasetShape.isObjectDetection) {
|
||||
cy.get(Locators.ModelOverviewAggregateMethod).should("exist");
|
||||
cy.get(Locators.ModelOverviewClassSelector).should("exist");
|
||||
cy.get(Locators.ModelOverviewIoUThresholdSlider).should("exist");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ export class ObjectDetectionWidgets extends React.PureComponent<IObjectDetection
|
|||
styles={FluentUIStyles.smallDropdownStyle}
|
||||
/>
|
||||
<Slider
|
||||
id="iouThreshold"
|
||||
id="modelOverviewIoUThreshold"
|
||||
label={
|
||||
localization.ModelAssessment.ModelOverview.iouThresholdDropdown.name
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче