add test to upload new video
This commit is contained in:
parent
6db45ffbfc
commit
b1f644ad1e
1 changed files with 20 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import { test, expect } from "@playwright/test";
|
||||
|
||||
test.describe.configure({ mode: "serial" });
|
||||
|
||||
test("should be able to view videos", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/");
|
||||
await page
|
||||
|
|
@ -14,3 +16,21 @@ test("no videos should exist", async ({ page }) => {
|
|||
"You do not have any recordings."
|
||||
);
|
||||
});
|
||||
|
||||
test("can upload video", async ({ page }) => {
|
||||
await page.goto("http://localhost:3000/videos");
|
||||
await page.getByText("New video").click();
|
||||
await page
|
||||
.getByText("Drop files to Attach, or browse")
|
||||
.setInputFiles("tests/.auth/example_video.webm");
|
||||
await page.getByRole("button", { name: "Upload" }).click();
|
||||
await expect(page).toHaveURL(/http:\/\/localhost:3000\/share\/[A-Za-z0-9]+/, {
|
||||
timeout: 30000,
|
||||
});
|
||||
|
||||
await page.click('[href="/videos"]');
|
||||
await page.getByText("example_video.webm").click();
|
||||
await expect(page).toHaveURL(/http:\/\/localhost:3000\/share\/[A-Za-z0-9]+/, {
|
||||
timeout: 30000,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue