From 72cd69c5907cff0998f81668699be7da9a00425e Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Mon, 8 Aug 2022 14:14:51 +0200 Subject: [PATCH] add base override for runtime status to install specs --- .../e2e/installer.spec.ts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/Umbraco.Web.UI.Client/e2e/installer.spec.ts diff --git a/src/Umbraco.Web.UI.Client/e2e/installer.spec.ts b/src/Umbraco.Web.UI.Client/e2e/installer.spec.ts new file mode 100644 index 0000000000..4b00301ad4 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/e2e/installer.spec.ts @@ -0,0 +1,26 @@ +import { rest } from 'msw'; + +import umbracoPath from '../src/core/helpers/umbraco-path'; +import { StatusResponse } from '../src/core/models'; +import { expect, test } from '../test'; + +test('installer is shown', async ({ page, worker }) => { + await worker.use( + // Override the server status to be "must-install" + rest.get(umbracoPath('/server/status'), (_req, res, ctx) => { + return res( + // Respond with a 200 status code + ctx.status(200), + ctx.json({ + serverStatus: 'must-install', + }) + ); + }) + ); + + await page.goto('/install'); + + await page.waitForSelector('[data-test="installer"]'); + + await expect(page).toHaveURL('/install'); +});