From 3e38bea3d66e279cbe23c3174d439f2a397ba2aa Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Wed, 6 Jan 2021 21:25:52 +0000 Subject: [PATCH] Fixing cypress failure. --- .../components/start/CreateAppModal.svelte | 30 +++++++++---------- packages/server/yarn.lock | 8 ++--- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/packages/builder/src/components/start/CreateAppModal.svelte b/packages/builder/src/components/start/CreateAppModal.svelte index 2b54575795..1f27f18aaa 100644 --- a/packages/builder/src/components/start/CreateAppModal.svelte +++ b/packages/builder/src/components/start/CreateAppModal.svelte @@ -68,26 +68,24 @@ }, ] - let steps = [] + function buildStep(component) { + return { + component, + errors, + } + } + + // steps need to be initialized for cypress from the get go + let steps = [buildStep(API), buildStep(Info), buildStep(User)] onMount(async () => { let hostingInfo = await hostingStore.actions.fetch() - steps = [] - // only validate API key for Cloud - if (hostingInfo.type === "cloud") { - steps.push({ - component: API, - errors, - }) + // re-init the steps based on whether self hosting or cloud hosted + if (hostingInfo.type === "self") { + steps = [buildStep(Info), buildStep(User)] + } else { + steps = [buildStep(API), buildStep(Info), buildStep(User)] } - steps.push({ - component: Info, - errors, - }) - steps.push({ - component: User, - errors, - }) }) if (hasKey) { diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index d4dadec135..15a049f503 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -7262,10 +7262,10 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -svelte@^3.29.4: - version "3.29.4" - resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.29.4.tgz#d0f80cb58109ef52963855c23496f7153bb2eb7e" - integrity sha512-oW0fGHlyFFMvzRtIvOs84b0fOc0gmZNQcL5Is3hxuTpvaYX3pfd8oHy4KnOvbq4Ca6SG6AHdRMk7OhApTo0NqA== +svelte@^3.30.0: + version "3.31.2" + resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.31.2.tgz#d2ddf6cacbb95e4cc3796207510b660a25586324" + integrity sha512-TxZGrXzX2ggFH3BIKY5fmbeMdJuZrMIMDYPMX6R9255bueuYIuVaBQSLUeY2oD7W4IdeqRZiAVGCjDw2POKBRA== symbol-tree@^3.2.2: version "3.2.4"