Mark as completed/not completed 131 Safa3aa35→

0 4 0
first smoke step-06 tag_A user_flow

Tests (4)

A

Mark todos as completed 131 Ta5d2503b→

Tags
first smoke step-06 tag_A user_flow
Description
<!-- ai/agent generated description -->
### Preconditions
* Navigate to the Todos page
* Pre-populate the todo list with three items: 'foo', 'bar', and 'baz'

### Steps
1. Mark the first Todo item as completed
2. Filter to show active Todo items
3. Verify that 2 Todo items are displayed as active
4. Filter to show completed Todo items
5. Verify that 1 Todo item is displayed as completed

### Expected Result
* The correct number of Todo items are displayed as active and completed
* A screenshot is taken after completing the test steps
Code
Before(async ({ I, TodosPage }) => {
    TodosPage.goto()
  
    TodosPage.enterTodo('foo')
    TodosPage.enterTodo('bar')
    TodosPage.enterTodo('baz')
  })

Scenario('Mark todos as completed 131', async ({ I, TodosPage }) => {
  I.say('Given I have some todos')

  I.say('When I mark the first one as completed')
  await TodosPage.markNthAsCompleted(1)

  I.say('Then I see that 2 todos are still active')
  TodosPage.filterActive()
  TodosPage.seeNumberOfTodos(2)

  I.say('And I see that 1 has been completed')
  TodosPage.filterCompleted()
  TodosPage.seeNumberOfTodos(1)

  I.saveScreenshot('mark-todos-as-completed.png')
})

A

Unmark completed todos 131 Td67b89fa→

Tags
first smoke step-06 tag_A user_flow
Description
<!-- ai/agent generated description -->
### Preconditions
* Navigate to the Todos page
* Pre-populate the todo list with three items: 'foo', 'bar', and 'baz'

### Steps
1. Mark the first todo item as completed
2. Unmark the completed todo item
3. Filter to show active Todo items
4. Verify that 3 todos are displayed as active

### Expected Result
* The todo list reflects the correct number of active todos
* A screenshot is captured after completing the test steps
Code
Before(async ({ I, TodosPage }) => {
    TodosPage.goto()
  
    TodosPage.enterTodo('foo')
    TodosPage.enterTodo('bar')
    TodosPage.enterTodo('baz')
  })

Scenario('Unmark completed todos 131', async ({ I, TodosPage }) => {
    I.say('Given I have some todos')
  
    I.say('And I mark the first one as completed')
    await TodosPage.markNthAsCompleted(1)
    await TodosPage.unmarkNthAsCompleted(1)
  
    I.say('When I unmark the completed todo item')

    I.say('Then I see that 3 todos are still active')
    TodosPage.filterActive()
    TodosPage.seeNumberOfTodos(3)
  
    I.saveScreenshot('unmark-todos-as-completed.png')
})

A

Mark all todos as completed 131 Tc30964ed→

Tags
first smoke step-06 tag_A user_flow
Description
<!-- ai/agent generated description -->
### TEST TITLE: Mark all todos as completed
### TEST SUITE: Mark as completed/not completed

### Preconditions
* Navigate to the Todos page
* Create three todo items: 'foo', 'bar', and 'baz'

### Steps
1. Mark all todo items as completed
2. Filter to show completed todo items
3. Verify that all three todo items are displayed as completed

### Expected Result
* All three todo items are marked as completed
* A screenshot is captured after completing the test steps
Code
Before(async ({ I, TodosPage }) => {
    TodosPage.goto()
  
    TodosPage.enterTodo('foo')
    TodosPage.enterTodo('bar')
    TodosPage.enterTodo('baz')
  })

Scenario('Mark all todos as completed 131', async ({ I, TodosPage }) => {
    I.say('Given I have some todos')
  
    I.say('When I mark them all as completed')
    TodosPage.markAllAsCompleted()
  
    I.say('Then I see that all 3 are completed')
    TodosPage.filterCompleted()
    TodosPage.seeNumberOfTodos(3)
  
    I.saveScreenshot('mark-all-todos-as-completed.png')
})

A

Clear completed todos 131 Tc4d9d2b3→

Tags
first smoke step-06 tag_A user_flow
Description
<!-- ai/agent generated description -->
### Preconditions
* Navigate to the Todos page
* Add three todo items: 'foo', 'bar', and 'baz'

### Steps
1. Mark all todo items as completed
2. Clear all completed items
3. Verify that the number of todos is 0

### Expected Result
* The todo list is empty after clearing completed items
* A screenshot is captured after completing the test steps
Code
Before(async ({ I, TodosPage }) => {
    TodosPage.goto()
  
    TodosPage.enterTodo('foo')
    TodosPage.enterTodo('bar')
    TodosPage.enterTodo('baz')
  })

Scenario('Clear completed todos 131', async ({ I, TodosPage }) => {
    I.say('Given I have some completed todos') 
    TodosPage.markAllAsCompleted()
  
    I.say('When I clear all completed items')
    TodosPage.clearCompleted()
    TodosPage.seeNumberOfTodos(0)
  
    I.saveScreenshot('clear-completed-todos.png')
})