Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaLRussell committed Aug 2, 2024
1 parent 403e510 commit 9a7eb0f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/static/src/app/components/run/RunTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</run-plot>
</template>
<div v-if="sumOfSquares">
<span id="squares">Sum of squares: {{ sumOfSquares }}</span>
<span id="squares">Sum of squares: {{ sumOfSquares }}</span>
</div>
<error-info :error="error"></error-info>
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,14 @@ export default defineComponent({
if (allFitData.value) {
result.push(
...allFitDataToPlotly(allFitData.value, palette.value, start, end, props.graphConfig.selectedVariables));
...allFitDataToPlotly(
allFitData.value,
palette.value,
start,
end,
props.graphConfig.selectedVariables
)
);
}
}
Expand Down
11 changes: 7 additions & 4 deletions app/static/tests/e2e/fit.etest.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import {expect, test, Page, Locator} from "@playwright/test";
import { expect, test, Page, Locator } from "@playwright/test";
import {
newFitCode,
uploadCSVData,
writeCode,
startModelFit,
waitForModelFitCompletion,
realisticFitData, linkData, addGraphWithVariable, expectWodinPlotDataSummary
realisticFitData,
linkData,
addGraphWithVariable,
expectWodinPlotDataSummary
} from "./utils";
import PlaywrightConfig from "../../playwright.config";

Expand Down Expand Up @@ -346,8 +349,8 @@ test.describe("Wodin App model fit tests", () => {
});

const expectDataSummaryOnGraph = async (graph: Locator, dataSummaryIdx: number, dataColor: string) => {
const dataSummaryLocator = await graph.locator(`:nth-match(.wodin-plot-data-summary-series, ${dataSummaryIdx})`);
await expectWodinPlotDataSummary(dataSummaryLocator, "Cases", 32, 0, 31, 0, 13, "markers", null, dataColor );
const summaryLocator = await graph.locator(`:nth-match(.wodin-plot-data-summary-series, ${dataSummaryIdx})`);
await expectWodinPlotDataSummary(summaryLocator, "Cases", 32, 0, 31, 0, 13, "markers", null, dataColor);
};

test("data is displayed as expected with multiple graphs", async ({ page }) => {
Expand Down
5 changes: 3 additions & 2 deletions app/static/tests/unit/components/run/runTab.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import { BasicState } from "../../../../src/app/store/basic/state";
import {
mockBasicState,
mockFitState,
mockGraphsState, mockModelFitState,
mockGraphsState,
mockModelFitState,
mockModelState,
mockRunState,
mockStochasticState
Expand All @@ -33,7 +34,7 @@ import { AppType } from "../../../../src/app/store/appState/state";
import { RunMutation } from "../../../../src/app/store/run/mutations";
import { RunAction } from "../../../../src/app/store/run/actions";
import { getters as graphGetters } from "../../../../src/app/store/graphs/getters";
import {FitState} from "../../../../src/app/store/fit/state";
import { FitState } from "../../../../src/app/store/fit/state";

describe("RunTab", () => {
const defaultModelState = {
Expand Down
14 changes: 7 additions & 7 deletions app/static/tests/unit/plot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@ describe("allFitDataToPlotly", () => {
const selectedVariables = ["A"];
const res = allFitDataToPlotly(allFitDataLinked, palette, 0, 4, selectedVariables);
expect(res[1]).toStrictEqual({
marker: { color: "transparent" }, // Model colour
mode: "markers",
name: "b",
type: "scatter",
x: [0, 1, 2, 3, 4],
y: [2, 4, 6, 8, 10]
});
marker: { color: "transparent" }, // Model colour
mode: "markers",
name: "b",
type: "scatter",
x: [0, 1, 2, 3, 4],
y: [2, 4, 6, 8, 10]
});
});
});

Expand Down

0 comments on commit 9a7eb0f

Please sign in to comment.