Mark as completed/not completed 128 Sb771bf3f→

0 4 0
first smoke step-06 tag_A user_flow

Tests (4)

A

Mark todos as completed 128 T59c00c33→

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 128', 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 128 T3efc00bf→

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 todo items are displayed as active

### Expected Result
* The todo item is unmarked as completed
* The correct count of active todo items is displayed
Code
Before(async ({ I, TodosPage }) => {
    TodosPage.goto()
  
    TodosPage.enterTodo('foo')
    TodosPage.enterTodo('bar')
    TodosPage.enterTodo('baz')
  })

Scenario('Unmark completed todos 128', 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 128 Tc4a6f961→

Tags
first smoke step-06 tag_A user_flow
Description
<!-- ai/agent generated description -->
### 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 128', 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 128 Tec859380→

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

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

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

Scenario('Clear completed todos 128', 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')
})