forked from G-Research/fasttrackml-ui-aim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add backend integration for E2E CI pipeline (G-Research#99)
* Add playwright to project * Add playright CI workflow * Add rudimentary test for Dashboard * Move playwright into base directory * Update playwright.yml * Update playwright.yml * Update playwright.yml * Update playwright.yml * Update playwright.yml * Update playwright.yml * Update playwright.yml * Update playwright.yml * Fix bad yml * Add wait-on for dev server pipeline * Add failing test to check pipeline * Remove failing test * Add tests for dashboard quick navigation buttons * Remove example test and add to readme * Add backend clone and run before tests * Fix docker execution * Fix docker TTY issue * Add wait-on for backend server * Add k6 installation and database seeding * Rename Dashboard logic tests * Add preliminary dashboard test * Fix DashboardContent test * Add dev mode to docker pipeline * Fix pipeline issues (remove unused commands) * Remove logging and debugging screenshots * Fix pipeline * Fix pipeline * Access load script by getting raw file instead of pulling entire repo * Remove duplicate tests
- Loading branch information
Showing
3 changed files
with
55 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
const BASE_URL = 'http://localhost:3000'; | ||
|
||
test.describe('Dashboard', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto(BASE_URL); | ||
await page.waitForLoadState('networkidle'); | ||
}); | ||
|
||
// Test that the total number of runs is two. This assumes that the | ||
// test database has been seeded with two runs by running `k6 run k6_load.js` | ||
test('has two runs', async ({ page }) => { | ||
const textContent = await page.textContent( | ||
'p.ProjectStatistics__totalRuns', | ||
); | ||
expect(textContent).toBe('Total runs: 2'); | ||
}); | ||
}); |
File renamed without changes.