Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# features/authentication.feature
@fixture.browser.chrome
Feature: Authentication
A user can create an account and login with his credentials
Scenario: Registration
Given a visitor goes to "/"
And he clicks on "アカウント作成" # Create account
And he clicks on "emailで登録" # via email/password
When he fills the form
| name | value |
| firstName | 00000000000 |
| lastName | The North |
| email | king@example.com |
| password | password |
| checkAgree | true |
Then he sees the account type dialog form
And he can see his user avatar
And emails are sent
| to | subject |
| admin@gounite.com | 新しいユーザーが登録しました |
| king@example.com | GOuniteへようこそ! |
Scenario: Login
Given a visitor goes to "/gounite-story/faq"
And he clicks on "ログイン" # Login
And he clicks on "メールでログインする" # via email/password
When he fills the form
| name | value |
| email | king@example.com |
| password | password |
Then he sees the snackbar message "お帰りなさい" # Welcome back
And he is still on "/gounite-story/faq"
And he can see his user avatar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.