Mark as completed/not completed 120 Sbeac7ad9→

0 4 0
first smoke step-06 tag_A user_flow

Tests (4)

A

Mark todos as completed 120 Tb775f69a→

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 120', 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 120 Ta3748107→

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

### Expected Result
* The todo list displays all three todo items 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 120', 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 120 Tfc08d35c→

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 3 Todo items are displayed as completed

### Expected Result
* All 3 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 120', 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 120 T37e0da56→

Tags
first smoke step-06 tag_A user_flow
Description
<!-- ai/agent generated description -->
### Preconditions
* Navigate to the Todos page
* Add three new 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 todos is 0

### Expected Result
* The todo list is empty after clearing completed 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('Clear completed todos 120', 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')
})