Create Todos 114 S61d1acfc→

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

Tests (7)

A

Create a new todo item 114 T30aae1b2→

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

### Preconditions
* Navigate to the Todos page
* Ensure the todo list is empty

### Steps
1. Create a new todo item with the text "foo"
2. 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 114', 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 114 T6edb942f→

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

### Preconditions
* Navigate to the Todos page

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

### Expected Result
* The todo list contains the three new todo items with their respective titles
* A screenshot is captured after creating the new todo items
Code
Before(async ({ I, TodosPage }) => {
  TodosPage.goto()
});

Scenario('Create multiple todo items 114', 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 114 T922e21c6→

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 potentially weird characters
2. Verify that the todo text is added to the list if the 'Result' is 'is in list'

### Expected Result
* The todo text is correctly displayed in the list if the condition is met
Code
Before(async ({ I, TodosPage }) => {
  TodosPage.goto()
});

Data(examples).
Scenario('Todos containing weird characters 114', 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 114 Tbfa4f400→

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 has been cleared

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

Scenario('Text input field should be cleared after each item 114', 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 114 T7462a93e→

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 whitespace around the text
2. Verify that the todo item is displayed with trimmed text

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

Scenario('Text input should be trimmed 114', 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 114 T933503cc→

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 displays the items in the correct order: 'first', 'second', and 'last'
Code
Before(async ({ I, TodosPage }) => {
  TodosPage.goto()
});

Scenario('New todos should be added to the bottom of the list 114', 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 114 Tf5358895→

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 footer is visible
2. Add a new todo item
3. Verify that the footer is still visible

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

Scenario('Footer should be visible when adding TODOs 114', 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()
})