Skip to content

Fix expanding new questions when questionnaire has errors#6565

Merged
tramuntanal merged 4 commits intodecidim:developfrom
verarojman:fix/expand-questions-after-error
Oct 1, 2020
Merged

Fix expanding new questions when questionnaire has errors#6565
tramuntanal merged 4 commits intodecidim:developfrom
verarojman:fix/expand-questions-after-error

Conversation

@verarojman
Copy link
Copy Markdown
Contributor

@verarojman verarojman commented Sep 28, 2020

🎩 What? Why?

This PR fixes a bug where new questions with errors could not be expanded when editing a questionnaire.
It also adds the behaviour for questions with errors to be expanded when page loads.

Testing

  • Test suite: decidim-surveys/spec/system/admin_manages_surveys_spec.rb:18
  • GUI:
    • Visit /admin/participatory_processes
    • Click on a participatory process with a survey component
    • Edit the survey (click on the component name in the column at the left of the page, under components)
    • Add a new question leaving the Statement field blank

📷 Screenshots

Expand and collapse a question with error

Expanded question with error

@verarojman verarojman mentioned this pull request Sep 30, 2020
2 tasks
Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

@tramuntanal tramuntanal changed the title [Fix] Expand new questions with errors in questionnaire Fix expanding new questions when questionnaire has errors Oct 1, 2020
@tramuntanal tramuntanal merged commit 30adb9c into decidim:develop Oct 1, 2020
@tramuntanal
Copy link
Copy Markdown
Contributor

tramuntanal commented Oct 1, 2020

This fix unblocks the merging of #6247

roxanaopr pushed a commit to i-need-another-coffee/decidim that referenced this pull request Oct 15, 2020
* Expand questions with errors

* Initialize all collapsible questions

* Add specs for collapsing questions with errors

* Fix rubocop offenses
@verarojman verarojman deleted the fix/expand-questions-after-error branch December 7, 2020 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants