Mark as completed/not completed 99 S2074351b→

0 4 0
first smoke step-06 tag_A user_flow

Tests (4)

A

Mark todos as completed 99 Tdc19b259→

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 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 99', 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 99 T6dc204a9→

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 todo item is unmarked as completed
* All 3 todo items are displayed as active
* 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 99', 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 99 Tbf54d9ed→

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 all Todo items as completed
2. Filter to show completed Todo items
3. Verify that all three Todo items are marked as completed

### Expected Result
* All three Todo items are displayed 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 99', 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 99 Tb49b44e3→

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 todo list is empty

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

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