Skip to content

Commit

Permalink
various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaLRussell committed Sep 5, 2023
1 parent f75c04c commit 873b1cf
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 11 deletions.
7 changes: 0 additions & 7 deletions app/static/src/app/store/sensitivity/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,8 @@ const batchRunOde = (runner: OdinRunnerOde,
endTime: number,
advancedSettings: AdvancedSettings,
paramValues: OdinUserType | null): Batch => {
console.log("doing batch run ode");
const advancedSettingsOdin = convertAdvancedSettingsToOdin(advancedSettings, paramValues);
console.log("got adv settings");
const batch = runner.batchRun(odin, pars, 0, endTime, advancedSettingsOdin);
console.log("got batch");
return batch;
};

Expand Down Expand Up @@ -79,9 +76,7 @@ export const runSensitivity = (
const isStochastic = rootState.appType === AppType.Stochastic;
const hasRunner = rootGetters[`model/${ModelGetter.hasRunner}`];

console.log("1");
if (hasRunner && odin && batchPars) {
console.log("2");
const payload : OdinSensitivityResult = {
inputs: { endTime, pars: batchPars },
batch: null,
Expand All @@ -102,9 +97,7 @@ export const runSensitivity = (
detail: (e as Error).message
};
}
console.log("3");
commit(BaseSensitivityMutation.SetResult, payload);
console.log("4");

if (!multiSensitivity && getters.parameterSetSensitivityUpdateRequired && !isStochastic) {
const parameterSetBatchPars = getters[SensitivityGetter.parameterSetBatchPars];
Expand Down
2 changes: 1 addition & 1 deletion app/static/src/app/userMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default {
}
},
sensitivity: {
compileRequiredForOptions: (multiSens: boolean) => "Please compile a valid model in order to set"
compileRequiredForOptions: (multiSens: boolean) => "Please compile a valid model in order to set "
+ `${sensType(multiSens)} options.`,
compileRequiredForUpdate: (multiSens: boolean) => "Model code has been updated. "
+ `Compile code and Run ${sensType(multiSens)} to update.`,
Expand Down
2 changes: 1 addition & 1 deletion app/static/tests/e2e/fit.etest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ test.describe("Wodin App model fit tests", () => {
// Back to sensitivity tab
await page.click(":nth-match(.wodin-right .nav-tabs a, 3)");
await expect(await page.innerText(".action-required-msg"))
.toBe("Plot is out of date: parameters have been changed. Run sensitivity to update.");
.toBe("Plot is out of date: parameters have been changed. Run Sensitivity to update.");
});

test("can display sum of squares on run tab", async ({ page }) => {
Expand Down
2 changes: 1 addition & 1 deletion app/static/tests/e2e/sensitivity.etest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ test.describe("Sensitivity tests", () => {
// change parameter - should see update required message
await page.fill("#model-params .parameter-input", "5");
await expect(await page.innerText(".action-required-msg"))
.toBe("Plot is out of date: parameters have been changed. Run sensitivity to update.");
.toBe("Plot is out of date: parameters have been changed. Run Sensitivity to update.");

// re-run - message should be removed
await page.click("#run-sens-btn");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ describe("multiSensitivity actions", () => {
rootState, getters: testGetters, commit, dispatch, rootGetters
});

console.log("expecting...");
expect(commit).toHaveBeenCalledTimes(2);
expect(commit.mock.calls[0][0]).toBe(BaseSensitivityMutation.SetResult);
expect(commit.mock.calls[0][1]).toStrictEqual({
Expand Down

0 comments on commit 873b1cf

Please sign in to comment.