Skip to content

Commit

Permalink
Integration test v2 (#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson authored Oct 12, 2023
1 parent efec2aa commit d1630f9
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 32 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/frontend-test.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Integration Test

on:
repository_dispatch:
workflow_dispatch:
push:
pull_request:
branches: [master]
schedule:
- cron: "0 0 * * *"
jobs:
python:
uses: ./.github/workflows/python-test.yml
playwright:
uses: ./.github/workflows/playwright.yml
needs: [python]
10 changes: 6 additions & 4 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: Playwright Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
repository_dispatch:
workflow_dispatch:
jobs:
playwright:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: tfci-taxonium-config
path: ./data/
- uses: actions/setup-node@v3
with:
node-version: 18
Expand Down
26 changes: 26 additions & 0 deletions taxonium_website/e2e/test-2.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { test, expect } from "@playwright/test";

test("test", async ({ page }) => {
await page.goto("http://localhost:4173/");
await page.locator('input[type="file"]').click();
await page
.locator('input[type="file"]')
.setInputFiles("../../data/tfci-taxonium-chron.jsonl");
await page.locator('input[name="treenomeEnabled"]').check();
await page.locator('input[name="treenomeEnabled"]').uncheck();
await page.getByLabel("Tree type:DistanceTime").selectOption("x_time");
await page.getByLabel("Tree type:DistanceTime").selectOption("x_dist");
await page.getByRole("textbox").click();
await page.getByRole("textbox").fill("TFCI");
await page.locator("#view-main").click();
await page.locator("#view-main").click();
await page.locator("#view-main").click();
await page.getByRole("button", { name: "Zoom in vertically" }).click();
await page.getByRole("button", { name: "Zoom in horizontally" }).click();
await page.getByRole("button", { name: "Zoom out vertically" }).click();
await page.getByRole("button", { name: "Zoom out horizontally" }).click();
await page.getByRole("button", { name: "Settings" }).click();
await page.getByRole("tab", { name: "Appearance" }).click();
await page.getByRole("tab", { name: "Search" }).click();
await page.getByRole("tab", { name: "Appearance" }).click();
});

0 comments on commit d1630f9

Please sign in to comment.