Update admin layout and pages (#976)

This commit is contained in:
Luke Vella 2024-01-13 15:09:48 +07:00 committed by GitHub
parent 0ba7e9ce91
commit a1bac0c986
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
81 changed files with 2053 additions and 1260 deletions

View file

@ -123,8 +123,6 @@ test.describe.serial(() => {
await page.waitForURL("/polls");
await page.getByTestId("user-dropdown").click();
await expect(page.getByText("Test User")).toBeVisible();
});
@ -145,8 +143,6 @@ test.describe.serial(() => {
await page.waitForURL("/polls");
await page.getByTestId("user-dropdown").click();
await expect(page.getByText("Test User")).toBeVisible();
});
@ -167,8 +163,6 @@ test.describe.serial(() => {
await page.waitForURL("/polls");
await page.getByTestId("user-dropdown").click();
await expect(page.getByText("Test User")).toBeVisible();
});
});

View file

@ -1,32 +0,0 @@
import test, { expect } from "@playwright/test";
import { sealData } from "iron-session";
/**
* This test checks that a legacy token can be used to sign in.
*/
test("should convert guest legacy token", async ({ browser }) => {
const context = await browser.newContext();
const guestLegacyToken = await sealData(
{
user: {
id: "user-1234",
isGuest: true,
},
},
{
password: process.env.SECRET_PASSWORD,
},
);
await context.addCookies([
{
name: "rallly-session",
value: guestLegacyToken,
httpOnly: true,
url: process.env.NEXT_PUBLIC_BASE_URL,
},
]);
const page = await context.newPage();
await page.goto("/polls");
await page.getByTestId("user-dropdown").click();
await expect(page.locator("text=user-1234")).toBeVisible();
});