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
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
reporter: java-junit

- name: Run E2E tests
timeout-minutes: 10
timeout-minutes: 20
run: xvfb-run npm run test:e2e
env:
BASE_URL: http://localhost:3000
Expand Down
49 changes: 49 additions & 0 deletions e2e/tests/map/map-browse.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,55 @@ test.describe("Map Browse", () => {
});
});

test("video list items display YouTube thumbnails", async ({
page,
browserName,
}) => {
// Arrange: go to map
await page.goto("/map");
if (browserName !== "chromium") {
await page.waitForTimeout(1000);
}

// Wait for video list to load
const videoList = page.locator('[data-testid="video-list-item"]');
await expect(videoList.first()).toBeVisible({ timeout: PAGE_LOAD_TIMEOUT });

// Assert: first video list item contains a thumbnail image from YouTube
const thumbnail = videoList.first().locator("img");
await expect(thumbnail).toBeVisible({ timeout: UI_INTERACTION_TIMEOUT });
await expect(thumbnail).toHaveAttribute(
"src",
/(img\.youtube\.com|i\.ytimg\.com)\/vi\/.+\/.+\.jpg/,
);
});

test("video info popup displays thumbnail", async ({ page, browserName }) => {
// Arrange: go to map and click video in list to show popup
await page.goto("/map");
if (browserName !== "chromium") {
await page.waitForTimeout(1000);
}

const videoList = page.locator('[data-testid="video-list-item"]');
await expect(videoList.first()).toBeVisible({ timeout: PAGE_LOAD_TIMEOUT });
await videoList.first().click();

// Wait for popup to appear
await expect(page.getByRole("link", { name: /View Video/i })).toBeVisible({
timeout: UI_INTERACTION_TIMEOUT,
});

// Assert: popup contains a thumbnail image from YouTube
const popup = page.locator(".video-info-popup");
const popupThumbnail = popup.locator("img");
await expect(popupThumbnail).toBeVisible();
await expect(popupThumbnail).toHaveAttribute(
"src",
/(img\.youtube\.com|i\.ytimg\.com)\/vi\/.+\/.+\.jpg/,
);
});

test("zooming out transitions from individual markers to clusters", async ({
page,
browserName,
Expand Down
Loading