From 7022d0327c534448519785a1a3342945ed55072d Mon Sep 17 00:00:00 2001 From: EmmaLRussell Date: Wed, 13 Sep 2023 17:56:25 +0100 Subject: [PATCH 1/4] unnamed functions and exported method return types --- app/static/src/app/store/sensitivity/actions.ts | 2 +- app/static/src/app/store/sensitivity/sensitivity.ts | 7 ++++--- app/static/src/app/userMessages.ts | 13 +++++++------ app/static/src/app/utils.ts | 9 ++++----- .../tests/unit/components/basic/basicApp.test.ts | 1 + app/static/tests/unit/components/fit/fitApp.test.ts | 1 + .../unit/components/help/markdownPanel.test.ts | 1 + .../components/stochastic/stochasticApp.test.ts | 1 + 8 files changed, 20 insertions(+), 15 deletions(-) diff --git a/app/static/src/app/store/sensitivity/actions.ts b/app/static/src/app/store/sensitivity/actions.ts index 0d97ff7cf..cf9af5f0a 100644 --- a/app/static/src/app/store/sensitivity/actions.ts +++ b/app/static/src/app/store/sensitivity/actions.ts @@ -64,7 +64,7 @@ export const runSensitivity = ( endTime: number, context: ActionContext, multiSensitivity = false -) => { +): void => { const { rootState, commit, dispatch, getters, rootGetters } = context; diff --git a/app/static/src/app/store/sensitivity/sensitivity.ts b/app/static/src/app/store/sensitivity/sensitivity.ts index c10f8b971..55278d506 100644 --- a/app/static/src/app/store/sensitivity/sensitivity.ts +++ b/app/static/src/app/store/sensitivity/sensitivity.ts @@ -1,15 +1,16 @@ import { + SensitivityParameterSettings, SensitivityPlotExtreme, SensitivityPlotType, SensitivityScaleType, - SensitivityState, + SensitivityState, SensitivityUpdateRequiredReasons, SensitivityVariationType } from "./state"; import { mutations } from "./mutations"; import { actions } from "./actions"; import { getters } from "./getters"; -export const defaultSensitivityParamSettings = () => ({ +export const defaultSensitivityParamSettings = (): SensitivityParameterSettings => ({ parameterToVary: null, scaleType: SensitivityScaleType.Arithmetic, variationType: SensitivityVariationType.Percentage, @@ -20,7 +21,7 @@ export const defaultSensitivityParamSettings = () => ({ customValues: [] }); -export const noSensitivityUpdateRequired = () => ({ +export const noSensitivityUpdateRequired = (): SensitivityUpdateRequiredReasons => ({ modelChanged: false, parameterValueChanged: false, endTimeChanged: false, diff --git a/app/static/src/app/userMessages.ts b/app/static/src/app/userMessages.ts index f639692f9..d6c9968c9 100644 --- a/app/static/src/app/userMessages.ts +++ b/app/static/src/app/userMessages.ts @@ -79,28 +79,29 @@ export default { } }, multiSensitivity: { - runSummary: (solutionCount: number) => `${sensType(true)} run produced ${solutionCount} solutions.`, + runSummary: (solutionCount: number): string => `${sensType(true)} run produced ${solutionCount} solutions.`, updateReasons: { prefix: "Status is out of date:" } }, sensitivity: { - compileRequiredForOptions: (multiSens: boolean) => "Please compile a valid model in order to set " + compileRequiredForOptions: (multiSens: boolean): string => "Please compile a valid model in order to set " + `${sensType(multiSens)} options.`, - compileRequiredForUpdate: (multiSens: boolean) => "Model code has been updated. " + compileRequiredForUpdate: (multiSens: boolean): string => "Model code has been updated. " + `Compile code and Run ${sensType(multiSens)} to update.`, invalidSettings: "Invalid settings", - notRunYet: (multiSens: boolean) => `${sensType(multiSens)} has not been run.`, + notRunYet: (multiSens: boolean): string => `${sensType(multiSens)} has not been run.`, updateReasons: { prefix: "Plot is out of date:", modelChanged: "model code has been recompiled", parameterValueChanged: "parameters have been changed", - sensitivityOptionsChanged: (multiSens: boolean) => `${sensType(multiSens)} options have been changed`, + sensitivityOptionsChanged: + (multiSens: boolean): string => `${sensType(multiSens)} options have been changed`, endTimeChanged: "end time has changed", numberOfReplicatesChanged: "number of replicates has changed", advancedSettingsChanged: "advanced settings have been changed", unknown: "unknown reasons, contact the administrator, as this is unexpected", - suffix: (multiSens: boolean) => `Run ${sensType(multiSens)} to update` + suffix: (multiSens: boolean): string => `Run ${sensType(multiSens)} to update` } }, sessions: { diff --git a/app/static/src/app/utils.ts b/app/static/src/app/utils.ts index 1a874a4f4..c875a1aca 100644 --- a/app/static/src/app/utils.ts +++ b/app/static/src/app/utils.ts @@ -228,7 +228,7 @@ export const anyTrue = (x: Dict): boolean => { return Object.values(x).some((el: boolean) => el); }; -export const runPlaceholderMessage = (selectedVariables: string[], sensitivity: boolean) => { +export const runPlaceholderMessage = (selectedVariables: string[], sensitivity: boolean): string => { const notRunYet = sensitivity ? userMessages.sensitivity.notRunYet(false) : userMessages.run.notRunYet; return selectedVariables.length ? notRunYet : userMessages.model.noVariablesSelected; }; @@ -243,7 +243,8 @@ const extractValuesFromTags = (values: Tag[], paramValues: OdinUserType | null) return extracted.filter((x) => x !== undefined) as number[]; }; -export const convertAdvancedSettingsToOdin = (advancedSettings: AdvancedSettings, paramValues: OdinUserType | null) => { +export const convertAdvancedSettingsToOdin = (advancedSettings: AdvancedSettings, + paramValues: OdinUserType | null): AdvancedSettingsOdin => { const flattenedObject = Object.fromEntries(Object.entries(advancedSettings) .map(([key, value]) => { let cleanVal: number | number[] | null | undefined; @@ -259,7 +260,7 @@ export const convertAdvancedSettingsToOdin = (advancedSettings: AdvancedSettings return [key, cleanVal]; })) as Record; - const advancedSettingsOdin: AdvancedSettingsOdin = { + return { atol: flattenedObject[AdvancedOptions.tol], rtol: flattenedObject[AdvancedOptions.tol], maxSteps: flattenedObject[AdvancedOptions.maxSteps], @@ -267,6 +268,4 @@ export const convertAdvancedSettingsToOdin = (advancedSettings: AdvancedSettings stepSizeMin: flattenedObject[AdvancedOptions.stepSizeMin], tcrit: flattenedObject[AdvancedOptions.tcrit] }; - - return advancedSettingsOdin; }; diff --git a/app/static/tests/unit/components/basic/basicApp.test.ts b/app/static/tests/unit/components/basic/basicApp.test.ts index 41be2a80f..62a9362e5 100644 --- a/app/static/tests/unit/components/basic/basicApp.test.ts +++ b/app/static/tests/unit/components/basic/basicApp.test.ts @@ -1,6 +1,7 @@ // Mock the import of third party packages to prevent errors jest.mock("plotly.js-basic-dist-min", () => ({})); jest.mock("../../../../src/app/components/help/MarkdownItImport.ts", () => { + // eslint-disable-next-line func-names return function () { return { use: jest.fn().mockReturnValue({ diff --git a/app/static/tests/unit/components/fit/fitApp.test.ts b/app/static/tests/unit/components/fit/fitApp.test.ts index 3b6124303..7abb56f25 100644 --- a/app/static/tests/unit/components/fit/fitApp.test.ts +++ b/app/static/tests/unit/components/fit/fitApp.test.ts @@ -2,6 +2,7 @@ jest.mock("plotly.js-basic-dist-min", () => ({})); jest.mock("plotly.js-basic-dist-min", () => ({})); jest.mock("../../../../src/app/components/help/MarkdownItImport.ts", () => { + // eslint-disable-next-line func-names return function () { return { use: jest.fn().mockReturnValue({ diff --git a/app/static/tests/unit/components/help/markdownPanel.test.ts b/app/static/tests/unit/components/help/markdownPanel.test.ts index 15c33d286..b6b83a270 100644 --- a/app/static/tests/unit/components/help/markdownPanel.test.ts +++ b/app/static/tests/unit/components/help/markdownPanel.test.ts @@ -16,6 +16,7 @@ jest.mock("markdown-it-mathjax", () => ({ __esModule: true, default: () => mockM jest.mock("../../../../src/app/components/help/MarkdownItImport.ts", () => { // mock constructor - this cannot be an arrow function, see // https://stackoverflow.com/questions/47402005 + // eslint-disable-next-line func-names return function () { return { use: mockMarkdownItUse diff --git a/app/static/tests/unit/components/stochastic/stochasticApp.test.ts b/app/static/tests/unit/components/stochastic/stochasticApp.test.ts index 632a8601b..386240e2e 100644 --- a/app/static/tests/unit/components/stochastic/stochasticApp.test.ts +++ b/app/static/tests/unit/components/stochastic/stochasticApp.test.ts @@ -1,5 +1,6 @@ // Mock the import of third party packages to prevent errors jest.mock("../../../../src/app/components/help/MarkdownItImport.ts", () => { + // eslint-disable-next-line func-names return function () { return { use: jest.fn().mockReturnValue({ From d4bbeb6e27738d0ced34857ba6ef27ca8a19d5a7 Mon Sep 17 00:00:00 2001 From: EmmaLRussell Date: Fri, 15 Sep 2023 10:37:10 +0100 Subject: [PATCH 2/4] more lint warnings eliminated --- app/static/src/app/components/WodinPlot.vue | 2 ++ app/static/src/app/components/fit/FitTab.vue | 6 +++--- .../app/components/mixins/includeConfiguredTabs.ts | 10 ++++++++-- .../src/app/components/options/OptionsTab.vue | 6 +++--- .../src/app/components/options/ParameterSetView.vue | 3 ++- app/static/src/app/components/run/RunPlot.vue | 4 ++-- .../src/app/components/sensitivity/support.ts | 2 +- app/static/src/app/directives/help.ts | 6 +++--- app/static/src/app/directives/tooltip.ts | 13 ++++++++----- app/static/src/app/excel/wodinExcelDownload.ts | 5 +++-- app/static/src/app/plot.ts | 2 +- app/static/src/app/router.ts | 7 +++++-- app/static/src/app/serialise.ts | 10 +++++----- app/static/src/app/store/model/getters.ts | 2 +- app/static/src/app/types/utilTypes.ts | 2 +- 15 files changed, 48 insertions(+), 32 deletions(-) diff --git a/app/static/src/app/components/WodinPlot.vue b/app/static/src/app/components/WodinPlot.vue index cd05e94ec..81b4f0429 100644 --- a/app/static/src/app/components/WodinPlot.vue +++ b/app/static/src/app/components/WodinPlot.vue @@ -43,6 +43,7 @@ export default defineComponent({ // Only used as an indicator that redraw is required when this changes - the data to display is calculated by // plotData function using these solutions redrawWatches: { + // eslint-disable-next-line @typescript-eslint/no-explicit-any type: Array as PropType, required: true }, @@ -70,6 +71,7 @@ export default defineComponent({ const yAxisRange = computed(() => store.state.graphSettings.yAxisRange as YAxisRange); const updateAxesRange = () => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any const plotLayout = (plot.value as any).layout; const yRange = plotLayout.yaxis?.range; if (plotLayout) { diff --git a/app/static/src/app/components/fit/FitTab.vue b/app/static/src/app/components/fit/FitTab.vue index e2bfa9d77..e0577c0f7 100644 --- a/app/static/src/app/components/fit/FitTab.vue +++ b/app/static/src/app/components/fit/FitTab.vue @@ -26,7 +26,7 @@ diff --git a/app/static/src/app/components/mixins/includeConfiguredTabs.ts b/app/static/src/app/components/mixins/includeConfiguredTabs.ts index 6c17f70ca..ebe070308 100644 --- a/app/static/src/app/components/mixins/includeConfiguredTabs.ts +++ b/app/static/src/app/components/mixins/includeConfiguredTabs.ts @@ -1,8 +1,14 @@ import { Store } from "vuex"; -import { computed } from "vue"; +import { computed, ComputedRef } from "vue"; import { AppState, VisualisationTab } from "../../store/appState/state"; -export default (store: Store, fixedTabNames: string[]) => { +export interface IncludeConfiguredTabsMixin { + helpTabName: ComputedRef, + multiSensitivityTabName: ComputedRef, + rightTabNames: ComputedRef +} + +export default (store: Store, fixedTabNames: string[]): IncludeConfiguredTabsMixin => { const helpTabName = computed(() => { if (store.state.config?.help?.markdown?.length) { return store.state.config.help.tabName || "Explanation"; // default if markdown but no tab name diff --git a/app/static/src/app/components/options/OptionsTab.vue b/app/static/src/app/components/options/OptionsTab.vue index e5b413d0f..b708e3fc5 100644 --- a/app/static/src/app/components/options/OptionsTab.vue +++ b/app/static/src/app/components/options/OptionsTab.vue @@ -30,7 +30,7 @@ diff --git a/app/static/src/app/components/options/ParameterSetView.vue b/app/static/src/app/components/options/ParameterSetView.vue index 617422552..32b6fd209 100644 --- a/app/static/src/app/components/options/ParameterSetView.vue +++ b/app/static/src/app/components/options/ParameterSetView.vue @@ -159,7 +159,8 @@ export default defineComponent({ } }; const saveButton = ref(null); - const cancelEditDisplayName = (event: any) => { + const cancelEditDisplayName = (event: FocusEvent) => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any if (event.relatedTarget && event.relatedTarget === (saveButton.value as any).$el) return; store.commit(`run/${RunMutation.TurnOffDisplayNameError}`, props.parameterSet.name); newDisplayName.value = props.parameterSet.displayName; diff --git a/app/static/src/app/components/run/RunPlot.vue b/app/static/src/app/components/run/RunPlot.vue index 28d39b419..c86f466ec 100644 --- a/app/static/src/app/components/run/RunPlot.vue +++ b/app/static/src/app/components/run/RunPlot.vue @@ -19,7 +19,7 @@ import { } from "../../plot"; import WodinPlot from "../WodinPlot.vue"; import { RunGetter } from "../../store/run/getters"; -import { OdinSolution } from "../../types/responseTypes"; +import { OdinSolution, Times } from "../../types/responseTypes"; import { Dict } from "../../types/utilTypes"; import { runPlaceholderMessage } from "../../utils"; import { ParameterSet } from "../../store/run/state"; @@ -88,7 +88,7 @@ export default defineComponent({ Object.keys(parameterSetSolutions.value).forEach((name) => { const paramSetSln = parameterSetSolutions.value[name]; - const paramSetResult = paramSetSln!(options as any); + const paramSetResult = paramSetSln!(options as Times); const dash = lineStylesForParamSets.value[name]; if (paramSetResult) { diff --git a/app/static/src/app/components/sensitivity/support.ts b/app/static/src/app/components/sensitivity/support.ts index e4fcde5bb..46b38d0b0 100644 --- a/app/static/src/app/components/sensitivity/support.ts +++ b/app/static/src/app/components/sensitivity/support.ts @@ -22,7 +22,7 @@ export const sensitivityUpdateRequiredExplanation = (reasons: SensitivityUpdateR return `${prefix} ${joinStringsSentence(explanation)}. ${help.suffix(multiSens)}.`; }; -export const verifyValidPlotSettingsTime = (state: AppState, commit: Commit) => { +export const verifyValidPlotSettingsTime = (state: AppState, commit: Commit): void => { // update plot settings' end time to be valid before we use it const { plotSettings } = state.sensitivity; let endTime = plotSettings.time; diff --git a/app/static/src/app/directives/help.ts b/app/static/src/app/directives/help.ts index a16fa8559..8bdbaf389 100644 --- a/app/static/src/app/directives/help.ts +++ b/app/static/src/app/directives/help.ts @@ -11,13 +11,13 @@ const getHelpBinding = (binding: DirectiveBinding) => { }; export default { - mounted(el: HTMLElement, binding: DirectiveBinding) { + mounted(el: HTMLElement, binding: DirectiveBinding): void { tooltip.mounted(el, getHelpBinding(binding)); }, - beforeUpdate(el: HTMLElement, binding: DirectiveBinding) { + beforeUpdate(el: HTMLElement, binding: DirectiveBinding): void { tooltip.beforeUpdate(el, getHelpBinding(binding)); }, - beforeUnmount(el: HTMLElement) { + beforeUnmount(el: HTMLElement): void { tooltip.beforeUnmount(el); } }; diff --git a/app/static/src/app/directives/tooltip.ts b/app/static/src/app/directives/tooltip.ts index c6e737f60..cce8089b8 100644 --- a/app/static/src/app/directives/tooltip.ts +++ b/app/static/src/app/directives/tooltip.ts @@ -10,7 +10,7 @@ export interface ToolTipSettings { } export default { - mounted(el: HTMLElement, binding: DirectiveBinding) { + mounted(el: HTMLElement, binding: DirectiveBinding): void { const { value } = binding; el.setAttribute("data-bs-toggle", "tooltip"); @@ -38,7 +38,7 @@ export default { }); } }, - beforeUpdate(el: HTMLElement, binding: DirectiveBinding) { + beforeUpdate(el: HTMLElement, binding: DirectiveBinding): void { const { value } = binding; let tooltip = Tooltip.getInstance(el); @@ -47,6 +47,7 @@ export default { const variant = value?.variant || "text"; const oldCustomClass = (variant === "text") ? "" : `tooltip-${variant}`; + // eslint-disable-next-line @typescript-eslint/no-explicit-any const isVariantSame = (tooltip as any)._config.customClass === oldCustomClass; if (!isVariantSame) { tooltip.dispose(); @@ -67,8 +68,10 @@ export default { : value?.content || ""; if (tooltip) { - (tooltip as any)._config.title = content; - const { trigger } = (tooltip as any)._config; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const configuredTooltip = tooltip as any; + configuredTooltip._config.title = content; + const { trigger } = configuredTooltip._config; if (trigger === "manual") { if (!content) { tooltip.hide(); @@ -78,7 +81,7 @@ export default { } } }, - beforeUnmount(el: HTMLElement) { + beforeUnmount(el: HTMLElement): void { const tooltip = Tooltip.getInstance(el); if (tooltip) { tooltip.dispose(); diff --git a/app/static/src/app/excel/wodinExcelDownload.ts b/app/static/src/app/excel/wodinExcelDownload.ts index 44c915a75..3e289bef9 100644 --- a/app/static/src/app/excel/wodinExcelDownload.ts +++ b/app/static/src/app/excel/wodinExcelDownload.ts @@ -9,6 +9,7 @@ export abstract class WodinExcelDownload { protected readonly _state: AppState; + // eslint-disable-next-line @typescript-eslint/no-explicit-any protected readonly _rootGetters: any; protected readonly _commit: Commit; @@ -23,7 +24,7 @@ export abstract class WodinExcelDownload { this._workbook = XLSX.utils.book_new(); } - protected _addParameters(excludeParams: string[] = []) { + protected _addParameters(excludeParams: string[] = []): void { const paramVals = this._state.run.parameterValues; if (paramVals) { const paramData = Object.keys(paramVals) @@ -36,7 +37,7 @@ export abstract class WodinExcelDownload { } } - protected _writeFile(buildWorkbook: () => void) { + protected _writeFile(buildWorkbook: () => void): void { try { buildWorkbook(); XLSX.writeFile(this._workbook, this._fileName); diff --git a/app/static/src/app/plot.ts b/app/static/src/app/plot.ts index 5423cb93c..efe8b25a2 100644 --- a/app/static/src/app/plot.ts +++ b/app/static/src/app/plot.ts @@ -164,7 +164,7 @@ const lineStyles = ["dot", "dash", "longdash", "dashdot", "longdashdot"]; export const paramSetLineStyle = (index: number): string => (lineStyles[index % lineStyles.length]); export const updatePlotTraceName = (plotTrace: Partial, param: string | null, value: number | null, - parameterSetName = "") => { + parameterSetName = ""): void => { const parenthesisItems = []; if (param && value) { parenthesisItems.push(`${param}=${format(".3f")(value)}`); diff --git a/app/static/src/app/router.ts b/app/static/src/app/router.ts index 5250931fb..7799a2cce 100644 --- a/app/static/src/app/router.ts +++ b/app/static/src/app/router.ts @@ -1,7 +1,10 @@ -import { createRouter, createWebHistory, RouteComponent } from "vue-router"; +import { + createRouter, createWebHistory, RouteComponent, Router +} from "vue-router"; import SessionsPage from "./components/sessions/SessionsPage.vue"; -export function initialiseRouter(appComponent: RouteComponent, appName: string, baseUrl: string, appsPath: string) { +export function initialiseRouter(appComponent: RouteComponent, appName: string, baseUrl: string, + appsPath: string): Router { // Remove any sessionId parameter from url const url = window.location.href; if (url.includes("sessionId=")) { diff --git a/app/static/src/app/serialise.ts b/app/static/src/app/serialise.ts index 6413448dd..d3ef18cc6 100644 --- a/app/static/src/app/serialise.ts +++ b/app/static/src/app/serialise.ts @@ -11,7 +11,7 @@ import { SerialisedAppState, SerialisedModelState, SerialisedRunState, SerialisedSensitivityState, - SerialisedRunResult, SerialisedSensitivityResult + SerialisedRunResult, SerialisedSensitivityResult, SerialisedModelFitState } from "./types/serialisationTypes"; import { GraphSettingsState } from "./store/graphSettings/state"; import { Dict } from "./types/utilTypes"; @@ -107,7 +107,7 @@ function serialiseFitData(fitData: FitDataState) : FitDataState { }; } -function serialiseModelFit(modelFit: ModelFitState) { +function serialiseModelFit(modelFit: ModelFitState): SerialisedModelFitState { return { fitUpdateRequired: modelFit.fitUpdateRequired, iterations: modelFit.iterations, @@ -118,11 +118,11 @@ function serialiseModelFit(modelFit: ModelFitState) { }; } -export const serialiseGraphSettings = (state: GraphSettingsState) => { +export const serialiseGraphSettings = (state: GraphSettingsState): GraphSettingsState => { return { ...state }; }; -export const serialiseState = (state: AppState) => { +export const serialiseState = (state: AppState): string => { const result: SerialisedAppState = { openVisualisationTab: state.openVisualisationTab, code: serialiseCode(state.code), @@ -141,7 +141,7 @@ export const serialiseState = (state: AppState) => { return JSON.stringify(result); }; -export const deserialiseState = (targetState: AppState, serialised: SerialisedAppState) => { +export const deserialiseState = (targetState: AppState, serialised: SerialisedAppState): void => { Object.assign(targetState, { ...targetState, ...serialised diff --git a/app/static/src/app/store/model/getters.ts b/app/static/src/app/store/model/getters.ts index 96357b49a..0ad9c20c3 100644 --- a/app/static/src/app/store/model/getters.ts +++ b/app/static/src/app/store/model/getters.ts @@ -11,7 +11,7 @@ export interface ModelGetters { } export const getters: ModelGetters & GetterTree = { - [ModelGetter.hasRunner]: (state: ModelState, _: any, rootState: AppState): boolean => { + [ModelGetter.hasRunner]: (state: ModelState, _: ModelGetters, rootState: AppState): boolean => { return (rootState.appType === AppType.Stochastic) ? !!state.odinRunnerDiscrete : !!state.odinRunnerOde; } }; diff --git a/app/static/src/app/types/utilTypes.ts b/app/static/src/app/types/utilTypes.ts index 4d5d84ad9..a749966a5 100644 --- a/app/static/src/app/types/utilTypes.ts +++ b/app/static/src/app/types/utilTypes.ts @@ -2,5 +2,5 @@ import { ActionContext } from "vuex"; export type Dict = { [k: string]: V } -/* eslint-disable @typescript-eslint/no-explicit-any */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type AppCtx = ActionContext; From 1ff971edd5611fce0f7929f81f5e76124046e956 Mon Sep 17 00:00:00 2001 From: EmmaLRussell Date: Tue, 19 Sep 2023 17:17:22 +0100 Subject: [PATCH 3/4] playwright version --- app/static/package.json | 2 +- app/static/tests/e2e/code.etest.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/static/package.json b/app/static/package.json index 33c51ead6..4b7b93967 100644 --- a/app/static/package.json +++ b/app/static/package.json @@ -45,7 +45,7 @@ "xlsx": "^0.18.5" }, "devDependencies": { - "@playwright/test": "^1.20.0", + "@playwright/test": "1.37.0", "@types/bootstrap": "^5.2.6", "@types/jest": "^27.4.0", "@types/markdown-it": "^12.2.3", diff --git a/app/static/tests/e2e/code.etest.ts b/app/static/tests/e2e/code.etest.ts index c54e2ea6c..15e5741ae 100644 --- a/app/static/tests/e2e/code.etest.ts +++ b/app/static/tests/e2e/code.etest.ts @@ -233,7 +233,7 @@ test.describe("Code Tab tests", () => { await page.click("#reset-btn"); await page.waitForResponse((response) => response.url().includes("/odin")); expect(await page.innerText(".wodin-left .wodin-content .editor-container")).toBe(defaultCode); - await expect(await page.locator(".wodin-left .wodin-content #code-status")).toHaveText("Code is valid"); + await expect(await page.innerText(".wodin-left .wodin-content #code-status")).toContain("Code is valid"); }); test("can display error message on code tab", async ({ page }) => { From 878bae789548b588c8d7db5942faa1c54801a370 Mon Sep 17 00:00:00 2001 From: EmmaLRussell Date: Thu, 21 Sep 2023 09:16:28 +0100 Subject: [PATCH 4/4] another warning fix --- app/static/src/app/store/sensitivity/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/static/src/app/store/sensitivity/actions.ts b/app/static/src/app/store/sensitivity/actions.ts index 073d4d190..f3c15f396 100644 --- a/app/static/src/app/store/sensitivity/actions.ts +++ b/app/static/src/app/store/sensitivity/actions.ts @@ -143,7 +143,7 @@ export const runSensitivity = ( } }; -export const runSensitivityOnRehydrate = (context: ActionContext) => { +export const runSensitivityOnRehydrate = (context: ActionContext): void => { const { state, rootState } = context; const { endTime } = rootState.run; const { pars } = state.result!.inputs;