Merge pull request #4073 from marceloeloelo/fix_getting_started_confirmation

Fix confirmation at getting_started page
This commit is contained in:
Fabian Rodriguez 2013-03-26 15:05:25 -07:00
commit 18f260a06f
3 changed files with 20 additions and 14 deletions

View file

@ -2,9 +2,10 @@
## Bug fixes ## Bug fixes
* reset comment box height after posting a comment. [#4030](https://github.com/diaspora/diaspora/issues/4030) * Fix cancel button on getting_started confirmation box [#4073](https://github.com/diaspora/diaspora/issues/4073)
* fade long tag names. [#3899](https://github.com/diaspora/diaspora/issues/3899) * Reset comment box height after posting a comment. [#4030](https://github.com/diaspora/diaspora/issues/4030)
* avoid posting empty comments. [#3836](https://github.com/diaspora/diaspora/issues/3836) * Fade long tag names. [#3899](https://github.com/diaspora/diaspora/issues/3899)
* Avoid posting empty comments. [#3836](https://github.com/diaspora/diaspora/issues/3836)
* Delegate parent_author to the target of a RelayableRetraction * Delegate parent_author to the target of a RelayableRetraction
* Do not fail on receiving a SignedRetraction via the public route * Do not fail on receiving a SignedRetraction via the public route
* Pass the real values to stderr_path and stdout_path in unicorn.rb since it runs a case statement on them. * Pass the real values to stderr_path and stdout_path in unicorn.rb since it runs a case statement on them.

View file

@ -34,19 +34,17 @@ Diaspora.Pages.UsersGettingStarted = function() {
}); });
$("#awesome_button").bind("click", function(evt){ $("#awesome_button").bind("click", function(evt){
var confirmMessage = Diaspora.I18n.t("getting_started.no_tags"); var confirmMessage = Diaspora.I18n.t("getting_started.no_tags");
if(($("#as-selections-tags").find(".as-selection-item").length > 0) || confirm(confirmMessage)) {
/* flash message prompt */
var message = Diaspora.I18n.t("getting_started.preparing_your_stream"); var message = Diaspora.I18n.t("getting_started.preparing_your_stream");
Diaspora.page.flashMessages.render({success: true, notice: message}); var confirmation = true;
} else {
/* flash message prompt */ if ($("#as-selections-tags").find(".as-selection-item").length <= 0) {
var message = Diaspora.I18n.t("getting_started.alright_ill_wait"); message = Diaspora.I18n.t("getting_started.alright_ill_wait");
Diaspora.page.flashMessages.render({success: true, notice: message}); confirmation = confirm(confirmMessage);
} }
Diaspora.page.flashMessages.render({success: true, notice: message});
return confirmation;
}); });
/* ------ */ /* ------ */

View file

@ -17,10 +17,17 @@ Feature: new user registration
| profile_first_name | O | | profile_first_name | O |
And I preemptively confirm the alert And I preemptively confirm the alert
And I follow "awesome_button" And I follow "awesome_button"
Then I should be on the stream page Then I should be on the stream page
And I should not see "awesome_button" And I should not see "awesome_button"
Scenario: new user does not add any tags in setup wizard and cancel the alert
When I fill in the following:
| profile_first_name | some name |
And I preemptively reject the alert
And I follow "awesome_button"
Then I should be on the getting started page
And I should see a flash message containing "Alright, I'll wait."
Scenario: new user skips the setup wizard Scenario: new user skips the setup wizard
When I preemptively confirm the alert When I preemptively confirm the alert
And I follow "awesome_button" And I follow "awesome_button"