Comprehensive analysis of your GUI tests with visual regression, 3D visualization, and actionable insights
Detailed Playwright test results with failure analysis and performance metrics
Screenshot comparisons between PR and main branch with diff visualization
Interactive 3D visualization of your test suite with performance insights
Context-aware commands and GitHub actions to speed up your workflow
Track test stability over time and identify patterns in failures
Learn how to use all features and customize the action for your needs
Automated test results and code quality analysis
tests/demo-todo-app.spec.tstests/eslint-config.test.tsToo many changes for inline comments. Run the following command to fix:
npx prettier "tests/**/*.{js,jsx,ts,tsx}" --write
diff --git a/tests/demo-todo-app.spec.ts b/tests/demo-todo-app.spec.ts
index 0000000..1111111 100644
--- a/tests/demo-todo-app.spec.ts 2025-08-07 22:09:23.835230406 +0000
+++ b/tests/demo-todo-app.spec.ts 2025-08-07 22:09:23.835230406 +0000
@@ -4,12 +4,7 @@
await page.goto('https://demo.playwright.dev/todomvc');
});
-
-const TODO_ITEMS = [
- 'watch deck the halls',
- 'feed the cat',
- 'book a doctors appointment'
-] as const;
+const TODO_ITEMS = ['watch deck the halls', 'feed the cat', 'book a doctors appointment'] as const;
test.describe('New Todo', () => {
test('should allow me to add todo items', async ({ page }) => {
@@ -21,19 +16,14 @@
await newTodo.press('Enter');
// Make sure the list only has one todo item.
- await expect(page.getByTestId('todo-title')).toHaveText([
- TODO_ITEMS[0]
- ]);
+ await expect(page.getByTestId('todo-title')).toHaveText([TODO_ITEMS[0]]);
// Create 2nd todo.
await newTodo.fill(TODO_ITEMS[1]);
await newTodo.press('Enter');
// Make sure the list now has two todo items.
- await expect(page.getByTestId('todo-title')).toHaveText([
- TODO_ITEMS[0],
- TODO_ITEMS[1]
- ]);
+ await expect(page.getByTestId('todo-title')).toHaveText([TODO_ITEMS[0], TODO_ITEMS[1]]);
await checkNumberOfTodosInLocalStorage(page, 2);
});
@@ -56,8 +46,8 @@
await createDefaultTodos(page);
// create a todo count locator
- const todoCount = page.getByTestId('todo-count')
-
+ const todoCount = page.getByTestId('todo-count');
+
// Check test using different methods.
await expect(page.getByText('3 items left')).toBeVisible();
import/no-extraneous-dependencies in /home/runner/work/Code-Reviews-of-GUI-Tests/Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts:1
Run the following command to automatically fix 98 issues:
npx eslint . --fix
Screenshot comparison between PR and main branch
Context-aware commands and actions based on your test results
npx eslint . --fix && npx prettier --write .
npx playwright test --project=chromium
npx playwright test --ui
npx eslint . --fix
npx prettier --write .
npx playwright test --workers=4
npx playwright test --reporter=html && npx playwright show-report
npx playwright install
gh run rerun 16816929639 --failed
gh run rerun 16816929639
gh pr review 145 --approve && gh pr merge 145 --auto --squash
gh pr comment 145 --body "Test Results: 44 passed, 0 failed"
gh pr edit 145 --add-label "tests-passing"
// Wait for element to be visible and stable
await page.waitForSelector('.my-element', { state: 'visible' });
await page.waitForLoadState('networkidle');
// Or use auto-waiting locators
const button = page.locator('button.submit');
await button.click(); // Automatically waits
test.describe('Feature', { retries: 2 }, () => {
test('should work', async ({ page }) => {
// Test will retry up to 2 times on failure
});
});
test.afterEach(async ({ page }, testInfo) => {
if (testInfo.status !== testInfo.expectedStatus) {
await page.screenshot({
path: `screenshots/${testInfo.title}-failure.png`,
fullPage: true
});
}
});
// For specific test
test('slow test', async ({ page }) => {
test.setTimeout(60000); // 60 seconds
// ... test code
});
// For specific action
await page.click('.button', { timeout: 30000 });
await page.route('**/api/data', async route => {
await route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify({
success: true,
data: { /* mock data */ }
})
});
});
Average pass rate: 100%
Average duration: 35.4s
Trend: โก๏ธ Stable