Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Update demo-todo-app.spec.ts (pbi-6.3 - ensure PR auto refresh)#109

Open
amarilda611 wants to merge 3 commits intomainfrom
pbi-6.3
Open

Update demo-todo-app.spec.ts (pbi-6.3 - ensure PR auto refresh)#109
amarilda611 wants to merge 3 commits intomainfrom
pbi-6.3

Conversation

@amarilda611
Copy link
Copy Markdown
Contributor

ensuring auto refresh of the action after changing to await test.step('Showing completed items', async ({ page }) => { // Added 'page' parameter here

@github-actions
Copy link
Copy Markdown
Contributor

🔍 GUI Test Review

Checklist
  • GitHub Action triggered
  • Playwright tests completed
  • ESLint executed
  • Prettier check completed
  • Test summary generated
  • Flowchart created

▶️ Playwright

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


👉 Open full dashboard ↗

Automated comment — updates on every push.

@amarilda611 amarilda611 changed the title Update demo-todo-app.spec.ts Update demo-todo-app.spec.ts (Ensure PR autorefresh) Jul 15, 2025
@amarilda611 amarilda611 changed the title Update demo-todo-app.spec.ts (Ensure PR autorefresh) Update demo-todo-app.spec.ts (Ensure PR auto refresh) Jul 15, 2025
Adding new changes to ensure the auto refresh of the PR.
Comment on lines 14 to 15
test.describe('New Todo', () => {
test('should allow me to add todo items', async ({ page }) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

Suggested change
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?');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

Suggested change
const newTodo = page.getByPlaceholder('What needs to be done?');
const newTodo = page.getByPlaceholder("What needs to be done?");

Comment on lines 62 to +63
const todoCount = page.getByTestId('todo-count')


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

Suggested change
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']);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

Suggested change
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

Suggested change
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

Comment on lines 362 to 364
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();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

Suggested change
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();

Comment on lines +377 to 378
await test.step('Showing completed items', async ({ page }) => { // This was the previous change
await page.getByRole('link', { name: 'Completed' }).click();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

Suggested change
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();

Comment on lines 444 to 445
return await page.waitForFunction(t => {
return JSON.parse(localStorage['react-todos']).map((todo: any) => todo.title).includes(t);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

Suggested change
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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

await expect(page.getByText('3 items left')).toBeVisible();
await expect(todoCount).toHaveText('3 items left');
await expect(todoCount).toContainText('3');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

test('should allow me to clear the complete state of all items', async ({ page }) => {
const toggleAll = page.getByLabel('Mark all as complete');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

await test.step('Showing active items', async () => {
await page.getByRole('link', { name: 'Active' }).click();

@github-actions
Copy link
Copy Markdown
Contributor

🔍 GUI Test Review

Checklist
  • GitHub Action triggered
  • Playwright tests completed
  • ESLint executed
  • Prettier check completed
  • Test summary generated
  • Flowchart created

▶️ Playwright

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


👉 Open full dashboard ↗

Automated comment — updates on every push.

@amarilda611 amarilda611 changed the title Update demo-todo-app.spec.ts (Ensure PR auto refresh) pbi-6.3 update demo-todo-app.spec.ts (Ensure PR auto refresh) Jul 15, 2025
@amarilda611 amarilda611 changed the title pbi-6.3 update demo-todo-app.spec.ts (Ensure PR auto refresh) Update demo-todo-app.spec.ts (pbi-6.3 - ensure PR auto refresh) Jul 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant