1
0
Fork 0

Add feature "Staff people create"

This commit is contained in:
Alex Kotov 2019-08-28 23:12:20 +05:00
parent 10585b753f
commit 4f2a7dc08e
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
3 changed files with 29 additions and 0 deletions

View File

@ -1,5 +1,7 @@
en:
helpers:
submit:
person:
create: Send
person_comment:
create: Send

View File

@ -1,5 +1,7 @@
ru:
helpers:
submit:
person:
create: Отправить
person_comment:
create: Отправить

View File

@ -0,0 +1,25 @@
Feature: Staff people create
Background:
Given I am signed in as superuser
Given I visit "/staff/people"
Given I click "Создать"
Scenario: with valid attributes
When I fill form with the following data:
| key | value |
| Фамилия | Иванов |
| Имя | Павел |
And I click the form button "Отправить"
Then I am at "/staff/people/\d+"
And I see text "Иванов"
And I see text "Павел"
And I see text "Не относится к партии"
Scenario: with invalid attributes:
When I fill form with the following data:
| key | value |
| Фамилия | Иванов |
And I click the form button "Отправить"
Then I am at "/staff/people"
And I see text "Пожалуйста, исправьте следующие ошибки"
And I see text "Имя не может быть пустым"