Create Todos 119 Sb55b6e83→

0 7 0
first smoke step:06 story:12345 tag_A user_flow

Tests (7)

A

Create a new todo item 119 T44d83e77→

Tags
first smoke step:06 story:12345 tag_A user_flow
Description
<!-- ai/agent generated description -->
### Preconditions
* Navigate to the Todos page

### Steps
1. Verify that the todo list is empty
2. Create a new todo item with the text "foo"
3. Verify that the new todo item is displayed on the list

### Expected Result
* The todo list contains the new todo item with the text "foo"
* A screenshot is taken after creating the new todo item
Code
Before(async ({ I, TodosPage }) => {
  TodosPage.goto()
});

Scenario('Create a new todo item 119', async ({ I, TodosPage }) => {
  I.say('Given I have an empty todo list')

  I.say('When I create a todo "foo"')
  TodosPage.enterTodo('foo')

  I.say('Then I see the new todo on my list')
  TodosPage.seeNumberOfTodos(1)

  I.saveScreenshot('create-todo-item.png')
});

A

Create multiple todo items 119 Tc27dcda5→

Tags
first smoke step:06 story:12345 tag_A user_flow
Description
<!-- ai/agent generated description -->
### TEST TITLE: Create multiple todo items
### TEST SUITE: Create Todos

#### Preconditions
* Navigate to the Todos page

#### Steps
1. Verify that the todo list is empty
2. Create three new todo items with the text "foo", "bar", and "baz"
3. Verify that the three new todo items are displayed on the list

#### Expected Result
* The todo list contains the three new todo items with the text "foo", "bar", and "baz"
* A screenshot is taken after creating the new todo items
Code
Before(async ({ I, TodosPage }) => {
  TodosPage.goto()
});

Scenario('Create multiple todo items 119', async ({ I, TodosPage }) => {
  I.say('Given I have an empty todo list')
  I.say('When I create todos "foo", "bar" and "baz"')
  TodosPage.enterTodo('foo')
  TodosPage.enterTodo('bar')
  TodosPage.enterTodo('baz')

  I.say('Then I have these 3 todos on my list')
  TodosPage.seeNumberOfTodos(3)

  I.saveScreenshot('create-multiple-todo-items.png')
})

A

Todos containing weird characters 119 Tded2f70f→

Tags
first smoke step:06 story:12345 tag_A user_flow
Description
<!-- ai/agent generated description -->
### Preconditions
* Navigate to the Todos page

### Steps
1. Enter a todo text with unusual characters
2. Verify that the entered todo text is displayed in the todo list

### Expected Result
* The todo list displays the entered todo text correctly
Code
Before(async ({ I, TodosPage }) => {
  TodosPage.goto()
});

Data(examples).
Scenario('Todos containing weird characters 119', async ({ I, current, TodosPage }) => {
  I.say('When I enter {Todo Text}')
  TodosPage.enterTodo(current['Todo Text'])

  I.say('Then I see {Result}')
  if (current['Result'] === 'is in list') {
    await TodosPage.seeNthTodoEquals(1, current['Todo Text'])
  }
})

A

Text input field should be cleared after each item 119 T37c5fc7f→

Tags
first smoke step:06 story:12345 tag_A user_flow
Description
<!-- ai/agent generated description -->
### Preconditions
* Navigate to the Todos page

### Steps
1. Enter a new todo item with the text "foo"
2. Verify that the input field is empty after submission

### Expected Result
* The input field is cleared after adding a new todo item
Code
Before(async ({ I, TodosPage }) => {
  TodosPage.goto()
});

Scenario('Text input field should be cleared after each item 119', async ({ I, TodosPage }) => {
  I.say('Given I have an empty todo list')
  I.say('When I enter a new todo')
  TodosPage.enterTodo('foo')

  I.say('Then I see that the input field has been cleared')
  TodosPage.seeEmptyTodoInput()
})

A

Text input should be trimmed 119 T2f2faa29→

Tags
first smoke step:06 story:12345 tag_A user_flow
Description
<!-- ai/agent generated description -->
### Preconditions
* Navigate to the Todos page
* Ensure the Todo list is empty

### Steps
1. Enter a new Todo item with text that has whitespace around it (e.g., " Todo with lots of whitespace around ")
2. Verify that the new Todo item is displayed in the list with the text trimmed (i.e., "Todo with lots of whitespace around")

### Expected Result
* The Todo list contains the new Todo item with the text trimmed, without leading or trailing whitespace
Code
Before(async ({ I, TodosPage }) => {
  TodosPage.goto()
});

Scenario('Text input should be trimmed 119', async ({ I, TodosPage }) => {
  I.say('Given I have an empty todo list')
  I.say('When I enter a todo with whitespace around the text')
  TodosPage.enterTodo('       Todo with lots of whitespace around       ')

  I.say('Then I see the trimmed text of the todo in the list')
  await TodosPage.seeNthTodoEquals(1, 'Todo with lots of whitespace around')
})

A

New todos should be added to the bottom of the list 119 T5581a07b→

Tags
first smoke step:06 story:12345 tag_A user_flow
Description
<!-- ai/agent generated description -->
### Preconditions
* Navigate to the Todos page

### Steps
1. Add three new todo items: 'first', 'second', and 'last'
2. Verify that the todo items are displayed in the order they were added

### Expected Result
* The todo list contains the items 'first', 'second', and 'last' in that order
Code
Before(async ({ I, TodosPage }) => {
  TodosPage.goto()
});

Scenario('New todos should be added to the bottom of the list 119', async ({ I, TodosPage }) => {
  I.say('Given I added some todos')
  TodosPage.enterTodo('first')
  TodosPage.enterTodo('second')
  TodosPage.enterTodo('last')

  I.say('When I look at my todo list')
  I.say('Then I see the todos in the order in which I added them')
  await TodosPage.seeNthTodoEquals(1, 'first')
  await TodosPage.seeNthTodoEquals(2, 'second')
  await TodosPage.seeNthTodoEquals(3, 'last')
})

A

Footer should be visible when adding TODOs 119 T80151086→

Tags
first smoke step:06 story:12345 tag_A user_flow
Description
<!-- ai/agent generated description -->
### TEST TITLE: Footer visibility when adding TODOs
### TEST SUITE: TODOs Page

### Preconditions
* Navigate to the Todos page

### Steps
1. Verify that the footer is visible on the Todos page
2. Add a new todo item
3. Verify that the footer is still visible after adding the todo item

### Expected Result
* The footer remains visible on the Todos page after adding a new todo item
Code
Before(async ({ I, TodosPage }) => {
  TodosPage.goto()
});

Scenario('Footer should be visible when adding TODOs 119', async ({ I, TodosPage }) => {
  I.say('Given I am adding todos')
  TodosPage.seeFooter()
  I.say('When I add a todo')
  TodosPage.enterTodo('first')
  I.say('Then I always see the footer')
  TodosPage.seeFooter()
})