Skip to content

Commit

Permalink
Merge pull request #442 from cailloumajor/remove-compute-api-target-c…
Browse files Browse the repository at this point in the history
…ycle-time-param

feat: remove target cycle time API query param
  • Loading branch information
cailloumajor authored Sep 7, 2023
2 parents ae2dc73 + 87328ed commit f5a06e8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 29 deletions.
6 changes: 0 additions & 6 deletions src/components/TimelineDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import { QCard } from "quasar"
import { computed, nextTick, onMounted, reactive, ref } from "vue"
import { isMandeError, timelineRefreshMillis } from "src/global"
import { useCampaignDataStore } from "src/stores/campaign-data"
import wasmUtils from "./frontend-utils-wasm"
Expand All @@ -64,8 +63,6 @@ const props = defineProps<{
legend: LegendItem[]
}>()
const campaignDataStore = useCampaignDataStore()
const cardElem = ref<InstanceType<typeof QCard> | null>(null)
const canvasElem = ref<HTMLCanvasElement | null>(null)
Expand Down Expand Up @@ -113,9 +110,6 @@ onMounted(() => {
const drawTimeline = () => {
mande(props.computeApiUrl)
.get({
query: {
targetCycleTime: campaignDataStore.targetCycleTime,
},
responseAs: "response",
})
.then((response) => {
Expand Down
8 changes: 0 additions & 8 deletions src/components/__tests__/TimelineDisplay.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import TimelineDisplayWrapper from "app/test/cypress/wrappers/TimelineDisplayWrapper.vue"
import { timelineRefreshMillis } from "src/global"
import { useCampaignDataStore } from "src/stores/campaign-data"

import useWasmUtils from "../frontend-utils-wasm"

Expand Down Expand Up @@ -113,13 +112,6 @@ describe("TimelineDisplay", () => {

mountComponent()

cy.wrap(useCampaignDataStore()).invoke("$patch", {
targetCycleTime: 84.653,
})

cy.wait("@timeline-request")
.its("request.query")
.should("include", { targetCycleTime: "84.653" })
cy.get<SinonStub>("@draw-stub").should("have.been.calledWith", body)
})

Expand Down
1 change: 0 additions & 1 deletion src/pages/LineDashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ const updatePerformance = () => {
.get<number>(props.id, {
query: {
clientTime: dayjs().format(),
targetCycleTime: campaignDataStore.targetCycleTime,
},
})
.then((value) => {
Expand Down
14 changes: 0 additions & 14 deletions src/pages/__tests__/LineDashboard.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,20 +447,6 @@ describe("LineDashboard", () => {
.should("include", { clientTime: "1984-12-09T04:32:01+03:00" })
})

it("passes target cycle time to compute API", () => {
mountComponent()

cy.wrap(useCampaignDataStore()).invoke("$patch", {
targetCycleTime: 64.46,
})

cy.tick(1100)

cy.wait("@performance-request")
.its("request.query")
.should("include", { targetCycleTime: "64.46" })
})

it("sets the metric text", () => {
mountComponent()

Expand Down

0 comments on commit f5a06e8

Please sign in to comment.