Mark as completed/not completed 119 S66511afa→

0 4 0
first smoke step-06 tag_A user_flow

Tests (4)

A

Mark todos as completed 119 T2ca08d77→

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 119', 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 119 Tb7b6909c→

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 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 correct number of Todo items are displayed as active
* 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('Unmark completed todos 119', 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 119 T399bf48e→

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 todos as completed
2. Filter to show completed todos
3. Verify that all3 todos are displayed as completed

### Expected Result
* All3 todos 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 119', 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 119 T939bf615→

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. 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 119', 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')
})