From db709c6a4d589d34f70f42b29b0e42c22dd46d96 Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Tue, 11 Oct 2022 15:06:04 +0100 Subject: [PATCH] Add test for appDefinition --- .../internal-api/applications/create.spec.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/qa-core/src/tests/internal-api/applications/create.spec.ts b/qa-core/src/tests/internal-api/applications/create.spec.ts index be484bc44d..a67f189c7d 100644 --- a/qa-core/src/tests/internal-api/applications/create.spec.ts +++ b/qa-core/src/tests/internal-api/applications/create.spec.ts @@ -181,4 +181,23 @@ describe("Internal API - /applications endpoints", () => { const [deleteResponse] = await config.applications.delete(app.appId ? app.appId : "") expect(deleteResponse).toHaveStatusCode(200) }) + + it("GET - App Definition", async () => { + const [response, app] = await config.applications.create(generateApp()) + expect(response).toHaveStatusCode(200) + expect(app.appId).toBeDefined() + config.applications.api.appId = app.appId + + const [definitionResponse, definition] = await config.applications.getAppDefinition(app.appId ? app.appId : "") + expect(definitionResponse).toHaveStatusCode(200) + expect(definition).toEqual({ + appId: app.appId, + appUrl: app.url, + name: app.name, + pages: [], + pagesById: {}, + routes: {}, + theme: {}, + }) + }) })