Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Neff <benjamin@coding4coffee.ch>2019-05-12 01:25:52 +0300
committerBenjamin Neff <benjamin@coding4coffee.ch>2019-05-12 01:25:52 +0300
commit314239ff2ab26552776b4214bc71d265c33838c9 (patch)
tree46ea5754a2312a54811879adf0817a33d71727f7 /features
parentcb5f26a709b05dabffe6a7e4c3565c89947fe54a (diff)
parente5ba9a1a4696f30ba4e6e51893dbdd5c1c0cccca (diff)
Merge branch 'next-minor' into develop
Diffstat (limited to 'features')
-rw-r--r--features/desktop/getting_started.feature (renamed from features/desktop/signs_up.feature)6
-rw-r--r--features/desktop/registrations.feature24
-rw-r--r--features/mobile/registrations.feature (renamed from features/mobile/signs_up.feature)3
-rw-r--r--features/step_definitions/session_steps.rb8
-rw-r--r--features/step_definitions/user_steps.rb8
5 files changed, 36 insertions, 13 deletions
diff --git a/features/desktop/signs_up.feature b/features/desktop/getting_started.feature
index 2703069e0..bbebd5efa 100644
--- a/features/desktop/signs_up.feature
+++ b/features/desktop/getting_started.feature
@@ -98,11 +98,11 @@ Feature: new user registration
Then I should not be able to sign up
And I should have a validation error on "user_password, user_password_confirmation"
- Scenario: User signs up with an already existing username and email and then tries to sign in (Issue #6136)
+ Scenario: User signs up with an already existing username and email and then tries to sign in
When I log out manually
And I go to the new user registration page
- And I fill in the new user form with an existing email and username
+ And I fill in the new user form
And I submit the form
Then I should see a flash message indicating failure
- When I click the sign in button
+ When I follow "Sign in"
Then I should not see a flash message indicating failure
diff --git a/features/desktop/registrations.feature b/features/desktop/registrations.feature
new file mode 100644
index 000000000..1abcc09c4
--- /dev/null
+++ b/features/desktop/registrations.feature
@@ -0,0 +1,24 @@
+@javascript
+Feature: New user registration
+ In order to use Diaspora*
+ As a desktop user
+ I want to register an account
+
+ Scenario: user signs up and goes to getting started
+ Given I am on the new user registration page
+ When I fill in the new user form
+ And I press "Create account"
+ Then I should be on the getting started page
+ And I should see the 'getting started' contents
+
+ Scenario: registrations are closed, user is informed
+ Given the registrations are closed
+ When I am on the new user registration page
+ Then I should see "Open signups are closed at this time"
+
+ Scenario: User is unable to register even by manually sending the POST request
+ Given I am on the new user registration page
+ When I fill in the new user form
+ Given the registrations are closed
+ When I press "Create account"
+ Then I should see "Open signups are closed at this time"
diff --git a/features/mobile/signs_up.feature b/features/mobile/registrations.feature
index 3277ef131..43bc9dc75 100644
--- a/features/mobile/signs_up.feature
+++ b/features/mobile/registrations.feature
@@ -5,8 +5,7 @@ Feature: New user registration
I want to register an account
Background:
- Given I am on the login page
- And I follow "Create account" within "#main-nav"
+ Given I am on the new user registration page
Scenario: user signs up and goes to getting started
When I fill in the new user form
diff --git a/features/step_definitions/session_steps.rb b/features/step_definitions/session_steps.rb
index 4b08d1498..14d8f24ff 100644
--- a/features/step_definitions/session_steps.rb
+++ b/features/step_definitions/session_steps.rb
@@ -74,3 +74,11 @@ end
Then (/^I should see the 'getting started' contents$/) do
confirm_getting_started_contents
end
+
+Given /^the registrations are closed$/ do
+ AppConfig.settings.enable_registrations = false
+end
+
+When /^I fill in the new user form$/ do
+ fill_in_new_user_form
+end
diff --git a/features/step_definitions/user_steps.rb b/features/step_definitions/user_steps.rb
index ee4e71b69..804642cae 100644
--- a/features/step_definitions/user_steps.rb
+++ b/features/step_definitions/user_steps.rb
@@ -218,20 +218,12 @@ When /^I view "([^\"]*)"'s first post$/ do |email|
visit post_path(post)
end
-When /^I fill in the new user form/ do
- fill_in_new_user_form
-end
-
And /^I should be able to friend "([^\"]*)"$/ do |email|
user = User.find_by_email(email)
step 'I should see a ".aspect-dropdown"'
step "I should see \"#{user.name}\""
end
-When /^I click the sign in button$/ do
- click_link "Sign in"
-end
-
Given /^I did request my photos$/ do
@me.perform_export_photos!
end