-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic feature test of survey creation and response #2969
Merged
hennevogel
merged 7 commits into
openSUSE:master
from
AndrewKvalheim:test-survey-create-and-respond
Mar 29, 2022
Merged
Basic feature test of survey creation and response #2969
hennevogel
merged 7 commits into
openSUSE:master
from
AndrewKvalheim:test-survey-create-and-respond
Mar 29, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AndrewKvalheim
commented
Mar 11, 2022
I just found #2639 which reports the same problem. Here I chose to do just the minimum of displaying a notification but I agree a full solution would be to redirect to the appropriate list of surveys. |
Removes optional attributes from default survey factory.
Resolves: Failures: 1) Survey as an organizer create a survey Failure/Error: click_link 'New' Capybara::ElementNotFound: Unable to find link "New" # ./spec/features/surveys_spec.rb:18:in `block (3 levels) in <top (required)>' Failed examples: rspec ./spec/features/surveys_spec.rb:15 # Survey as an organizer create a survey
Resolves: Failures: 1) Survey as an organizer create a survey Failure/Error: raise ActionController::MissingExactTemplate, message ActionController::MissingExactTemplate: Admin::SurveyQuestionsController#new is missing a template for request formats: text/html # <internal:kernel>:90:in `tap' Failed examples: rspec ./spec/features/surveys_spec.rb:15 # Survey as an organizer create a survey
Resolves: app/views/admin/surveys/_form.html.haml:25: warning: key :class is duplicated and overwritten on line 25 app/views/admin/surveys/_form.html.haml:27: warning: key :class is duplicated and overwritten on line 27
Resolves: Failures: 1) Survey as an organizer create a survey Failure/Error: select 'boolean', from: 'Type of Question:', visible: false # Hidden by bootstrap-select Capybara::ElementNotFound: Unable to find select box "Type of Question:" that is not disabled and Unable to find input box with datalist completion "Type of Question:" that is not disabled # ./spec/features/surveys_spec.rb:24:in `block (3 levels) in <top (required)>' # ------------------ # --- Caused by: --- # Capybara::ElementNotFound: # Unable to find select box "Type of Question:" that is not disabled # ./spec/features/surveys_spec.rb:24:in `block (3 levels) in <top (required)>' Failed examples: rspec ./spec/features/surveys_spec.rb:15 # Survey as an organizer create a survey
The logic used for the `:reply` ability incompletely duplicated that of `Survey#active?` and incorrectly assumed that surveys always have start and end dates. Resolves: Failures: 1) Survey as an attendee respond to a survey during registration Failure/Error: survey.start_date > Time.current || survey.end_date < Time.current ActionView::Template::Error: undefined method `>' for nil:NilClass survey.start_date > Time.current || survey.end_date < Time.current ^ # ./app/models/ability.rb:126:in `block in signed_in' # ./app/views/surveys/show.html.haml:28:in `block in _app_views_surveys_show_html_haml___3404959267043700678_138180' # ./app/views/surveys/show.html.haml:19:in `_app_views_surveys_show_html_haml___3404959267043700678_138180' Failed examples: rspec ./spec/features/surveys_spec.rb:37 # Survey as an attendee respond to a survey during registration
Resolves: Failures: 1) Survey as an attendee respond to a survey during registration Failure/Error: expect(flash).to eq('Successfully responded to survey.') expected: "Successfully responded to survey." got: "none" (compared using ==) # ./spec/features/surveys_spec.rb:49:in `block (3 levels) in <top (required)>' Failed examples: rspec ./spec/features/surveys_spec.rb:37 # Survey as an attendee respond to a survey during registration
AndrewKvalheim
force-pushed
the
test-survey-create-and-respond
branch
from
March 16, 2022 21:13
d3c6b1d
to
02dc501
Compare
This now updates the RuboCop to-do list and includes another bug fix for the survey date pickers. |
hennevogel
approved these changes
Mar 29, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
master
branch.Short description of what this resolves
I tried using surveys for the first time and ran into a few issues:
Changes proposed in this pull request