From e1d9f5d6bd991c683b08ecd939cbda2eb3535c52 Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Thu, 2 Feb 2023 09:41:46 +0000 Subject: [PATCH] Skip tests that need multiple users authenticated --- .../internal-api/userManagement/customRoles.spec.ts | 13 ++++++------- .../userManagement/screenAccess.spec.ts | 9 ++++----- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/qa-core/src/tests/internal-api/userManagement/customRoles.spec.ts b/qa-core/src/tests/internal-api/userManagement/customRoles.spec.ts index a6f7533825..d672bc0eb2 100644 --- a/qa-core/src/tests/internal-api/userManagement/customRoles.spec.ts +++ b/qa-core/src/tests/internal-api/userManagement/customRoles.spec.ts @@ -8,7 +8,7 @@ import { App, User } from "@budibase/types" import generateScreen from "../../../config/internal-api/fixtures/screens" import { db } from "@budibase/backend-core" -describe("Internal API - App Specific Roles & Permissions", () => { +describe.skip("Internal API - App Specific Roles & Permissions", () => { let api: InternalAPIClient let accountsAPI: AccountsAPIClient let config: TestConfiguration @@ -82,14 +82,13 @@ describe("Internal API - App Specific Roles & Permissions", () => { const [selfInfoResponse, selfInfoJson] = await config.users.getSelf() // fetch app package - /* + const [appPackageResponse, appPackageJson] = await config.applications.getAppPackage(app.appId!) expect(appPackageJson.screens).toBeDefined() expect(appPackageJson.screens.length).toEqual(1) - */ }) - it.skip("Custom role access for level 2 permissions", async () => { + it("Custom role access for level 2 permissions", async () => { // Set up user const appUser = generateUser() expect(appUser[0].builder?.global).toEqual(false) @@ -150,7 +149,7 @@ describe("Internal API - App Specific Roles & Permissions", () => { expect(appPackageJson.screens).toBeDefined() expect(appPackageJson.screens.length).toEqual(1) }) - it.skip("Custom role access for level 3 permissions", async () => { + it("Custom role access for level 3 permissions", async () => { const appUser = generateUser() expect(appUser[0].builder?.global).toEqual(false) expect(appUser[0].admin?.global).toEqual(false) @@ -210,7 +209,7 @@ describe("Internal API - App Specific Roles & Permissions", () => { expect(appPackageJson.screens).toBeDefined() expect(appPackageJson.screens.length).toEqual(1) }) - it.skip("Custom role access for level 4 permissions", async () => { + it("Custom role access for level 4 permissions", async () => { const appUser = generateUser() expect(appUser[0].builder?.global).toEqual(false) expect(appUser[0].admin?.global).toEqual(false) @@ -270,7 +269,7 @@ describe("Internal API - App Specific Roles & Permissions", () => { expect(appPackageJson.screens).toBeDefined() expect(appPackageJson.screens.length).toEqual(1) }) - it.skip("Custom role access for level 5 permissions", async () => { + it("Custom role access for level 5 permissions", async () => { const appUser = generateUser() expect(appUser[0].builder?.global).toEqual(false) expect(appUser[0].admin?.global).toEqual(false) diff --git a/qa-core/src/tests/internal-api/userManagement/screenAccess.spec.ts b/qa-core/src/tests/internal-api/userManagement/screenAccess.spec.ts index d7f73bc3f5..26f9d25ff0 100644 --- a/qa-core/src/tests/internal-api/userManagement/screenAccess.spec.ts +++ b/qa-core/src/tests/internal-api/userManagement/screenAccess.spec.ts @@ -8,7 +8,7 @@ import { User } from "@budibase/types" import generateScreen from "../../../config/internal-api/fixtures/screens" import { db } from "@budibase/backend-core" -describe("Internal API - Role screen access", () => { +describe.skip("Internal API - Role screen access", () => { let api: InternalAPIClient let accountsAPI: AccountsAPIClient let config: TestConfiguration @@ -73,16 +73,15 @@ describe("Internal API - Role screen access", () => { const [selfInfoResponse, selfInfoJson] = await config.users.getSelf() // fetch app package - /* + const [appPackageResponse, appPackageJson] = await config.applications.getAppPackage(app.appId!) expect(appPackageJson.screens).toBeDefined() expect(appPackageJson.screens.length).toEqual(1) expect(appPackageJson.screens[0].routing.roleId).toEqual("BASIC") - */ }) - it.skip("Check Screen access for POWER role", async () => { + it("Check Screen access for POWER role", async () => { // Set up user const appUser = generateUser() expect(appUser[0].builder?.global).toEqual(false) @@ -136,7 +135,7 @@ describe("Internal API - Role screen access", () => { expect(appPackageJson.screens.length).toEqual(2) }) - it.skip("Check Screen access for ADMIN role", async () => { + it("Check Screen access for ADMIN role", async () => { // Set up user const appUser = generateUser() expect(appUser[0].builder?.global).toEqual(false)