diff --git a/cypress/integration/basic.spec.ts b/cypress/integration/basic.spec.ts new file mode 100644 index 00000000..72da38db --- /dev/null +++ b/cypress/integration/basic.spec.ts @@ -0,0 +1,30 @@ +// https://docs.cypress.io/api/introduction/api.html + +describe("Basic test", () => { + it("visits the app root url", () => { + cy.visit("/"); + cy.contains("h2", "Scale data"); + }); +}); + +describe("404 page", () => { + it("creates an octaplex", () => { + cy.visit("/non-existing-page"); + cy.contains("h2", "Not found"); + cy.get("a") + .last() + .click() + .then(() => { + cy.get("button") + .first() + .click() + .then(() => { + cy.contains("h2", "Scale data"); + cy.get("#scale-name").should( + "have.value", + "The Octaplex (3 5 7 11)" + ); + }); + }); + }); +}); diff --git a/cypress/integration/example.spec.ts b/cypress/integration/example.spec.ts deleted file mode 100644 index ece8f5e8..00000000 --- a/cypress/integration/example.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -// https://docs.cypress.io/api/introduction/api.html - -describe("Basic test", () => { - it("visits the app root url", () => { - cy.visit("/"); - cy.contains("h2", "Scale data"); - }); -}); diff --git a/src/views/NotFoundView.vue b/src/views/NotFoundView.vue index 92c7c17e..1bf783de 100644 --- a/src/views/NotFoundView.vue +++ b/src/views/NotFoundView.vue @@ -4,7 +4,6 @@ */ import OctaplexPortal from "@/components/modals/generation/SummonOctaplex.vue"; -import type { Synth } from "@/synth"; import { encodeQuery } from "@/url-encode"; import type { Scale } from "scale-workshop-core"; import { nextTick, ref } from "vue"; @@ -28,7 +27,11 @@ const props = defineProps<{ equaveShift: number; degreeShift: number; - synth: Synth; + waveform: string; + attackTime: number; + decayTime: number; + sustainLevel: number; + releaseTime: number; }>(); const emit = defineEmits(["update:scale", "update:scaleName"]); @@ -56,11 +59,11 @@ function openTheGates(scale: Scale) { equaveShift: props.equaveShift, degreeShift: props.degreeShift, - waveform: props.synth.waveform, - attackTime: props.synth.attackTime, - decayTime: props.synth.decayTime, - sustainLevel: props.synth.sustainLevel, - releaseTime: props.synth.releaseTime, + waveform: props.waveform, + attackTime: props.attackTime, + decayTime: props.decayTime, + sustainLevel: props.sustainLevel, + releaseTime: props.releaseTime, }; const query = encodeQuery(state) as LocationQuery;