Skip to content
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

Fix default button when no voting enabled #1429

Merged
merged 5 commits into from
Jun 1, 2017
Merged

Fix default button when no voting enabled #1429

merged 5 commits into from
Jun 1, 2017

Conversation

deivid-rodriguez
Copy link
Contributor

🎩 What? Why?

In previous PR (#1427), I accidentally removed some used logic, proving that my prepositional logic skills are a bit rusty 😅. In particular, I removed the "View proposal" link that appears instead of the "Vote" button when voting is not enabled.

This PR restores that, backs it up with tests, and improves and adds some other tests and code around proposal listing.

📌 Related Issues

📋 Subtasks

None.

📷 Screenshots (optional)

None.

👻 GIF

mrbean

Most of the tests here don't need all the object creations in the global
setup. So move that only where it's needed. This makes the tests faster,
but more importantly it makes it easier to understand them and add new
ones, since you don't have to go up 600 lines to see which objects are
created by each tests, and thus which expectations to set.
Through specific attribute and not only CSS.
@deivid-rodriguez deivid-rodriguez changed the title Fix default button when no votes Fix default button when no voting enabled Jun 1, 2017
@codecov
Copy link

codecov bot commented Jun 1, 2017

Codecov Report

Merging #1429 into master will increase coverage by 0.52%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1429      +/-   ##
==========================================
+ Coverage   94.97%   95.49%   +0.52%     
==========================================
  Files         416      436      +20     
  Lines        7163     7502     +339     
==========================================
+ Hits         6803     7164     +361     
+ Misses        360      338      -22

@@ -120,6 +120,8 @@ ca:
most_voted: Més votat
random: Aleatori
recent: Recent
proposal:
view_proposal: Veure proposta
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't be adding locales directly from a PR, we should only do this via Crowdin

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, exactly!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, git revert tricked me!

Copy link
Contributor

@josepjaume josepjaume left a comment

Choose a reason for hiding this comment

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

Nicely done! It also proved my reviewing skills are not that good either.

As @mrcasals said, we should be adding translations via Crowdin, otherwise I believe they're just getting swallowed.

@josepjaume josepjaume merged commit 455d02a into decidim:master Jun 1, 2017
@deivid-rodriguez deivid-rodriguez deleted the fix_default_button_when_no_votes branch June 1, 2017 11:12
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.

4 participants