Soft delete and house keeping endpoint (#184)

This commit is contained in:
Luke Vella 2022-05-20 15:14:46 +01:00 committed by GitHub
parent 97e189132f
commit 3299ba2030
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 326 additions and 14 deletions

View file

@ -1,6 +1,12 @@
import { expect, test } from "@playwright/test";
test("should be able to vote and comment on a poll", async ({ page }) => {
const touchRequest = page.waitForRequest(
(request) =>
request.method() === "POST" &&
request.url().includes("/api/trpc/polls.touch"),
);
await page.goto("/demo");
await expect(page.locator('text="Lunch Meeting Demo"')).toBeVisible();
@ -26,4 +32,7 @@ test("should be able to vote and comment on a poll", async ({ page }) => {
const comment = page.locator("data-testid=comment");
await expect(comment.locator("text='This is a comment!'")).toBeVisible();
await expect(comment.locator("text=You")).toBeVisible();
// make sure call to touch RPC is made
await touchRequest;
});