Edit/Delete Todos 122 Se49686ae→

0 2 0
first smoke step-06 tag_A user_flow

Tests (2)

A

Edited todo is saved on blur 122 Tea6b3609→

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. Edit the first todo item to 'boom'
2. Verify that the first todo item text has been changed to 'boom'

### Expected Result
* The todo list reflects the edited item correctly with the text 'boom'
* 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('Edited todo is saved on blur 122', async ({ I, TodosPage }) => {
    I.say('Given I have some todos')
  
    I.say('When I edit the first todo')
    await TodosPage.editNthTodo(1, 'boom')
  
    I.say('Then I see that the todo text has been changed')
    await TodosPage.seeNthTodoEquals(1, 'boom')

    I.saveScreenshot('edited-todo-saved-on-blur.png')
})

A

Delete todos 122 T95179c5e→

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. Delete the first todo item
2. Verify that the number of todos is 2

### Expected Result
* The todo list contains two items after deletion
Code
Before(async ({ I, TodosPage }) => {
    TodosPage.goto()

    TodosPage.enterTodo('foo')
    TodosPage.enterTodo('bar')
    TodosPage.enterTodo('baz')
})

Scenario('Delete todos 122', async ({ I, TodosPage }) => {
    I.say('Given I have some todos')
    I.say('When I delete the first todo')
    TodosPage.deleteNthTodo(1)

    I.say('Then the todo should disappear from the list')
    TodosPage.seeNumberOfTodos(2)    
})