Update tslib/react in response to renaming

This commit is contained in:
porink0424
2024-05-08 17:21:28 +09:00
parent edf7107242
commit e017e3787d
5 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -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 },
+3 -3
View File
@@ -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()
})
}
+4 -4
View File
@@ -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()
})
}
@@ -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()
})
}
+3 -3
View File
@@ -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()
})
}