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