| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
This directory contains end-to-end tests for key React components in the Bgee application, using Playwright for browser automation.
Comprehensive tests for the Gene Expression Matrix page (/search/expression-matrix), including:
Tests for the Gene Expression Graph component on gene pages (/gene/:geneId), including:
Existing general website tests covering:
Make sure the development server is running:
npm run devEnsure Playwright is installed:
npm installnpm test# Run all component tests
./run-component-tests.sh all
# Run only GeneExpressionMatrix tests
./run-component-tests.sh matrix
# Run only GeneExpressionGraph tests
./run-component-tests.sh graph
# Run all component tests
npx playwright test tests/gene-expression-matrix.test.ts tests/gene-expression-graph.test.ts
# Run specific test file
npx playwright test tests/gene-expression-matrix.test.ts
# Run with browser UI (headed mode)
npx playwright test tests/gene-expression-matrix.test.ts --headed
# Run in debug mode
npx playwright test tests/gene-expression-matrix.test.ts --debugTests are configured in playwright.config.ts with:
When adding new component tests:
test.describe('Component Name', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/your-page');
await page.waitForLoadState('networkidle');
});
test('should display component correctly', async ({ page }) => {
await expect(page.getByText('Expected Text')).toBeVisible();
});
test('should handle user interactions', async ({ page }) => {
await page.getByRole('button', { name: 'Click Me' }).click();
await expect(page.getByText('Result')).toBeVisible();
});
});Run tests in debug mode to step through them:
npx playwright test tests/gene-expression-matrix.test.ts --debugAfter running tests, view the HTML report:
npx playwright show-reportWhen adding new tests:
| Back | FazBrowse Home | New Git URL |