From e017e3787d1829de03818ebb296d68bf87bc2189 Mon Sep 17 00:00:00 2001 From: porink0424 Date: Wed, 8 May 2024 17:21:28 +0900 Subject: [PATCH] Update tslib/react in response to renaming --- tslib/react/src/MockStudies.ts | 2 +- tslib/react/test/PlotHistory.test.tsx | 6 +++--- tslib/react/test/PlotImportance.test.tsx | 8 ++++---- tslib/react/test/PlotIntermediateValues.test.tsx | 6 +++--- tslib/react/test/TrialTable.test.tsx | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tslib/react/src/MockStudies.ts b/tslib/react/src/MockStudies.ts index 367262f7..50b94fac 100644 --- a/tslib/react/src/MockStudies.ts +++ b/tslib/react/src/MockStudies.ts @@ -28,7 +28,7 @@ const useMockStudies = () => { export const useMockStudy = (studyId: number | undefined) => { const mockStudies = useMockStudies() - const mockStudy = mockStudies.find((study) => study.study_id === studyId) + const mockStudy = mockStudies.find((study) => study.id === studyId) const mockImportance: Optuna.ParamImportance[][] = [ [ { name: "dropout_l0", importance: 0.07990265450296263 }, diff --git a/tslib/react/test/PlotHistory.test.tsx b/tslib/react/test/PlotHistory.test.tsx index 71235baf..8ad43ad3 100644 --- a/tslib/react/test/PlotHistory.test.tsx +++ b/tslib/react/test/PlotHistory.test.tsx @@ -24,10 +24,10 @@ describe("PlotHistory Tests", async () => { } for (const study of window.mockStudies) { - test(`PlotHistory (study name: ${study.study_name})`, () => { - setup({ study, dataTestId: `plot-history-${study.study_id}` }) + test(`PlotHistory (study name: ${study.name})`, () => { + setup({ study, dataTestId: `plot-history-${study.id}` }) expect( - screen.getByTestId(`plot-history-${study.study_id}`) + screen.getByTestId(`plot-history-${study.id}`) ).toBeInTheDocument() }) } diff --git a/tslib/react/test/PlotImportance.test.tsx b/tslib/react/test/PlotImportance.test.tsx index 5b2d26ab..f97bcc53 100644 --- a/tslib/react/test/PlotImportance.test.tsx +++ b/tslib/react/test/PlotImportance.test.tsx @@ -29,15 +29,15 @@ describe("PlotImportance Tests", async () => { } for (const study of window.mockStudies) { - test(`PlotImportance (study name: ${study.study_name})`, () => { - const importance = window.mockImportances[study.study_name] ?? [] + test(`PlotImportance (study name: ${study.name})`, () => { + const importance = window.mockImportances[study.name] ?? [] setup({ study, importance, - dataTestId: `plot-importance-${study.study_id}`, + dataTestId: `plot-importance-${study.id}`, }) expect( - screen.getByTestId(`plot-importance-${study.study_id}`) + screen.getByTestId(`plot-importance-${study.id}`) ).toBeInTheDocument() }) } diff --git a/tslib/react/test/PlotIntermediateValues.test.tsx b/tslib/react/test/PlotIntermediateValues.test.tsx index c98b726f..33e94b87 100644 --- a/tslib/react/test/PlotIntermediateValues.test.tsx +++ b/tslib/react/test/PlotIntermediateValues.test.tsx @@ -28,10 +28,10 @@ describe("PlotIntermediateValues Tests", async () => { } for (const study of window.mockStudies) { - test(`PlotIntermediateValues (study name: ${study.study_name})`, () => { - setup({ study, dataTestId: `plot-intermediatevalues-${study.study_id}` }) + test(`PlotIntermediateValues (study name: ${study.name})`, () => { + setup({ study, dataTestId: `plot-intermediatevalues-${study.id}` }) expect( - screen.getByTestId(`plot-intermediatevalues-${study.study_id}`) + screen.getByTestId(`plot-intermediatevalues-${study.id}`) ).toBeInTheDocument() }) } diff --git a/tslib/react/test/TrialTable.test.tsx b/tslib/react/test/TrialTable.test.tsx index 0ce0e206..5a547ba1 100644 --- a/tslib/react/test/TrialTable.test.tsx +++ b/tslib/react/test/TrialTable.test.tsx @@ -24,10 +24,10 @@ describe("TrialTable Tests", async () => { } for (const study of window.mockStudies) { - test(`TrialTable (study name: ${study.study_name})`, () => { - setup({ study, dataTestId: `trial-table-${study.study_id}` }) + test(`TrialTable (study name: ${study.name})`, () => { + setup({ study, dataTestId: `trial-table-${study.id}` }) expect( - screen.getByTestId(`trial-table-${study.study_id}`) + screen.getByTestId(`trial-table-${study.id}`) ).toBeInTheDocument() }) }