Skip to content

Commit

Permalink
rename visaulization to artifact preview
Browse files Browse the repository at this point in the history
  • Loading branch information
pnaik1 committed Oct 9, 2024
1 parent 25e1a44 commit 3194d1a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class ArtifactRightDrawer extends Contextual<HTMLDivElement> {
}

findVisualizationTab() {
return this.find().findByRole('tab', { name: 'Visualization' });
return this.find().findByRole('tab', { name: 'Artifact preview' });
}

findIframeContent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ describe('Artifacts', () => {
);
});
});
describe('Pipeline run visualization tab', () => {
describe('Pipeline run Artifact preview tab', () => {
beforeEach(() => {
cy.interceptOdh(
'GET /api/service/pipelines/:namespace/:serviceName/apis/v2beta1/artifacts/:artifactId',
Expand All @@ -224,7 +224,7 @@ describe('Artifacts', () => {
initMlmdIntercepts(projectName);
});

it('check for visualization', () => {
it('check for Artifact preview', () => {
pipelineRunDetails.visit(
projectName,
mockPipeline.pipeline_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('PipelineRunDrawerRightContent', () => {

expect(tabs).toHaveLength(2);
expect(screen.getByRole('tab', { name: 'Artifact details' })).toBeVisible();
expect(screen.getByRole('tab', { name: 'Visualization' })).toBeVisible();
expect(screen.getByRole('tab', { name: 'Artifact preview' })).toBeVisible();
});

it('renders task drawer tabs when the task prop is of type "groupTask"', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type ArtifactNodeDrawerContentProps = Omit<

enum ArtifactNodeDrawerTab {
Details = 'details',
Visualization = 'visualization',
ArtifactPreview = 'artifactPreview',
}

export const ArtifactNodeDrawerContent: React.FC<ArtifactNodeDrawerContentProps> = ({
Expand Down Expand Up @@ -66,9 +66,9 @@ export const ArtifactNodeDrawerContent: React.FC<ArtifactNodeDrawerContentProps>
</Tab>
{isMetricsArtifactType(artifact.getType()) && (
<Tab
eventKey={ArtifactNodeDrawerTab.Visualization}
title={<TabTitleText>Visualization</TabTitleText>}
aria-label="Visualization"
eventKey={ArtifactNodeDrawerTab.ArtifactPreview}
title={<TabTitleText>Artifact preview</TabTitleText>}
aria-label="Artifact preview"
>
<ArtifactVisualization artifact={artifact} />
</Tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ describe('ArtifactNodeDrawerContent', () => {
),
);

await user.click(screen.getByRole('tab', { name: 'Visualization' }));
await user.click(screen.getByRole('tab', { name: 'Artifact preview' }));
expect(screen.getByRole('heading', { name: 'Scalar metrics' })).toBeVisible();
});

Expand Down Expand Up @@ -154,7 +154,7 @@ describe('ArtifactNodeDrawerContent', () => {
),
);

await user.click(screen.getByRole('tab', { name: 'Visualization' }));
await user.click(screen.getByRole('tab', { name: 'Artifact preview' }));
expect(screen.getByRole('heading', { name: 'ROC curve' })).toBeVisible();
});

Expand All @@ -179,7 +179,7 @@ describe('ArtifactNodeDrawerContent', () => {
</BrowserRouter>,
);

await user.click(screen.getByRole('tab', { name: 'Visualization' }));
await user.click(screen.getByRole('tab', { name: 'Artifact preview' }));
expect(screen.getByRole('heading', { name: 'Confusion matrix metrics' })).toBeVisible();
});

Expand All @@ -202,7 +202,7 @@ describe('ArtifactNodeDrawerContent', () => {
</BrowserRouter>,
);

expect(screen.queryByRole('tab', { name: 'Visualization' })).toBeNull();
expect(screen.queryByRole('tab', { name: 'Artifact preview' })).toBeNull();
});

it('should not render "Model" visualization drawer tab', async () => {
Expand All @@ -224,7 +224,7 @@ describe('ArtifactNodeDrawerContent', () => {
</BrowserRouter>,
);

expect(screen.queryByRole('tab', { name: 'Visualization' })).toBeNull();
expect(screen.queryByRole('tab', { name: 'Artifact preview' })).toBeNull();
});
});

Expand Down

0 comments on commit 3194d1a

Please sign in to comment.