Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions assets/tests/admin/admin-login.spec.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
import { test, expect } from "@playwright/test";
import {
accessConfigJson,
adminConfigJson,
emptyJson,
tokenAdminJson,
tokenEditorJson,
tokenTenantsJson,
} from "./data-fixtures.js";
import {
fulfillDataRoute,
fulfillEmptyRoutes,
beforeEachTest,
} from "./test-helper.js";
import { fulfillDataRoute, fulfillEmptyRoutes } from "./test-helper.js";

test.describe("Login works", () => {
test.beforeEach(async ({ page }) => {
await page.route("**/access-config.json", async (route) => {
await route.fulfill({ json: accessConfigJson });
});

await page.route("**/config/admin", async (route) => {
await route.fulfill({ json: adminConfigJson });
});
Expand Down
22 changes: 0 additions & 22 deletions assets/tests/admin/data-fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,27 +410,6 @@ const clientConfigJson = {
logging: false,
};

const accessConfigJson = {
campaign: {
roles: ["ROLE_ADMIN"],
},
screen: {
roles: ["ROLE_ADMIN"],
},
settings: {
roles: ["ROLE_ADMIN"],
},
groups: {
roles: ["ROLE_ADMIN"],
},
shared: {
roles: ["ROLE_ADMIN"],
},
users: {
roles: ["ROLE_ADMIN", "ROLE_EXTERNAL_USER_ADMIN"],
},
};

const slidesJson1 = {
"@id": "/v2/slides",
"hydra:member": [
Expand Down Expand Up @@ -1653,7 +1632,6 @@ export {
errorJson,
emptyJson,
slidesJson1,
accessConfigJson,
clientConfigJson,
adminConfigJson,
mediaListJson,
Expand Down
13 changes: 1 addition & 12 deletions assets/tests/admin/test-helper.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
accessConfigJson,
adminConfigJson,
emptyJson,
feedSourcesJson,
tokenAdminJson,
} from "./data-fixtures.js";
import { adminConfigJson, emptyJson, tokenAdminJson } from "./data-fixtures.js";
import { expect } from "@playwright/test";

const beforeEachTest = async (page) => {
Expand All @@ -13,11 +7,6 @@ const beforeEachTest = async (page) => {
await route.abort();
});

// Handle calls to cccess-config.
await page.route("**/access-config.json*", async (route) => {
await route.fulfill({ json: accessConfigJson });
});

// Handle all calls to config.
await page.route("**/config/admin", async (route) => {
await route.fulfill({ json: adminConfigJson });
Expand Down
Loading