Update demo-todo-app.spec.ts (pbi-6.3 - ensure PR auto refresh)#109
Update demo-todo-app.spec.ts (pbi-6.3 - ensure PR auto refresh)#109amarilda611 wants to merge 3 commits intomainfrom
Conversation
🔍 GUI Test ReviewChecklist
|
| Run | Total | Passed | Failed | Skipped | Pass-rate | Duration |
|---|---|---|---|---|---|---|
| PR | 30 | 30 | 0 | 0 | 100% | 15988.719999999998 ms |
| Main | 30 | 30 | 0 | 0 | 100% | 14253.071 ms |
🎨 Prettier (PR)
| Metric | PR |
|---|---|
| Files needing format | 2 |
| Places to fix | 400 |
Files: tests/demo-todo-app.spec.ts, tests/eslint-config.test.ts
📋 ESLint (PR)
| Metric | PR |
|---|---|
| Errors | 0 |
| Warnings | 0 |
| Fixable Errors | 0 |
| Fixable Warns | 0 |
No ESLint errors
Automated comment — updates on every push.
Adding new changes to ensure the auto refresh of the PR.
| test.describe('New Todo', () => { | ||
| test('should allow me to add todo items', async ({ page }) => { |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| test.describe('New Todo', () => { | |
| test('should allow me to add todo items', async ({ page }) => { | |
| test.describe("New Todo", () => { | |
| test("should allow me to add todo items", async ({ page }) => { |
| // await expect(page).toHaveScreenshot('initial-empty-state.png'); // Capture initial state | ||
|
|
||
| // create a new todo locator | ||
| const newTodo = page.getByPlaceholder('What needs to be done?'); |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| const newTodo = page.getByPlaceholder('What needs to be done?'); | |
| const newTodo = page.getByPlaceholder("What needs to be done?"); |
| const todoCount = page.getByTestId('todo-count') | ||
|
|
||
|
|
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| const todoCount = page.getByTestId('todo-count') | |
| const todoCount = page.getByTestId("todo-count"); | |
| @@ -87,6 +93,9 @@ test.describe('Mark all as completed', () => { | |||
| // Ensure all todos have 'completed' class. | |||
| await expect(page.getByTestId('todo-item')).toHaveClass(['completed', 'completed', 'completed']); | |||
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| await expect(page.getByTestId('todo-item')).toHaveClass(['completed', 'completed', 'completed']); | |
| await expect(page.getByTestId("todo-item")).toHaveClass([ | |
| "completed", | |
| "completed", | |
| "completed", | |
| ]); |
| await checkNumberOfCompletedTodosInLocalStorage(page, 3); | ||
|
|
||
| // ⭐ ADDED THIS LINE HERE ⭐ | ||
| await expect(page).toHaveScreenshot('all-items-completed.png'); // Capture state after marking all as complete |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| await expect(page).toHaveScreenshot('all-items-completed.png'); // Capture state after marking all as complete | |
| await expect(page).toHaveScreenshot("all-items-completed.png"); // Capture state after marking all as complete |
| test('should respect the back button', async ({ page }) => { | ||
| const todoItem = page.getByTestId('todo-item'); | ||
| const todoItem = page.getByTestId('todo-item'); | ||
| await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check(); |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| test('should respect the back button', async ({ page }) => { | |
| const todoItem = page.getByTestId('todo-item'); | |
| const todoItem = page.getByTestId('todo-item'); | |
| await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check(); | |
| test("should respect the back button", async ({ page }) => { | |
| const todoItem = page.getByTestId("todo-item"); | |
| await page.getByTestId("todo-item").nth(1).getByRole("checkbox").check(); |
| await test.step('Showing completed items', async ({ page }) => { // This was the previous change | ||
| await page.getByRole('link', { name: 'Completed' }).click(); |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| await test.step('Showing completed items', async ({ page }) => { // This was the previous change | |
| await page.getByRole('link', { name: 'Completed' }).click(); | |
| await test.step("Showing completed items", async ({ page }) => { | |
| // This was the previous change | |
| await page.getByRole("link", { name: "Completed" }).click(); |
| return await page.waitForFunction(t => { | ||
| return JSON.parse(localStorage['react-todos']).map((todo: any) => todo.title).includes(t); |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
| return await page.waitForFunction(t => { | |
| return JSON.parse(localStorage['react-todos']).map((todo: any) => todo.title).includes(t); | |
| return await page.waitForFunction((t) => { | |
| return JSON.parse(localStorage["react-todos"]) | |
| .map((todo: any) => todo.title) | |
| .includes(t); |
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 68 to 70 in 5fcd4f2
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 101 to 102 in 5fcd4f2
There was a problem hiding this comment.
[prettier] reported by reviewdog 🐶
Code-Reviews-of-GUI-Tests/tests/demo-todo-app.spec.ts
Lines 373 to 374 in 5fcd4f2
🔍 GUI Test ReviewChecklist
|
| Run | Total | Passed | Failed | Skipped | Pass-rate | Duration |
|---|---|---|---|---|---|---|
| PR | 0 | 0 | 0 | 0 | 0% | 0 ms |
| Main | 30 | 30 | 0 | 0 | 100% | 14394.272 ms |
🎨 Prettier (PR)
| Metric | PR |
|---|---|
| Files needing format | 2 |
| Places to fix | 403 |
Files: tests/demo-todo-app.spec.ts, tests/eslint-config.test.ts
📋 ESLint (PR)
| Metric | PR |
|---|---|
| Errors | 0 |
| Warnings | 0 |
| Fixable Errors | 0 |
| Fixable Warns | 0 |
No ESLint errors
Automated comment — updates on every push.
ensuring auto refresh of the action after changing to await test.step('Showing completed items', async ({ page }) => { // Added 'page' parameter here