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

Feature/party pages update #1624

Merged
merged 5 commits into from
Jul 3, 2023
Merged

Feature/party pages update #1624

merged 5 commits into from
Jul 3, 2023

Conversation

Bekabyx
Copy link
Contributor

@Bekabyx Bekabyx commented Jun 16, 2023

Trello
This PR is a somewhat fiddly collection of little things. Currently blocked by yournextrepresentative#2100.

To test

Pre-test - YNR

There's an amount of setup to do because the YNR changes haven't been merged yet - sorry :(

  • Check out feat/update-party-importer
  • Run the migrations
  • Run python manage.py parties_import_from_ec
  • Run runserver 4444 - this must stay running for the duration of your local testing!

Pre-test - WCIVF

  • Check out this branch (feature/party-pages-update)
  • In base.py, change YNR_BASE to http://0.0.0.0:4444
  • Run the migrations
  • Run python manage.py import_parties
  • runserver

Test 1: Footer

  • Criteria: A link in the footer exists which takes you to /parties/
  • Open any page
  • Scroll down to the footer
  • There should be a link for All Parties
  • Click the link
  • Link takes you to http://localhost:8000/parties/
Screenshot 2023-06-16 at 15 11 24

Test 2: Alternative name

  • Criteria: Where a party has an alternative name, it is shown near the top of the page and is included as the first ballot description.
  • Suggested party: http://localhost:8000/parties/party:53/labour-party
  • Go to the page of a party with an alternative name
  • You should see something like this, with the alternative name under the main header
Screenshot 2023-06-16 at 15 10 20
  • Scroll down to Ballot Descriptions
  • The top bullet point in this section should be {party name} | {alternative_name} as in this screenshot
Screenshot 2023-06-16 at 15 27 37

Test 3: Descriptions

  • Criteria: Parties with no active descriptions and no registered alternative name should show "This party has no current alternative descriptions registered with the Electoral Commission.", parties with inactive descriptions should have a "Previous Descriptions" detail view
  • Suggested party: http://localhost:8000/parties/party:2302/
  • Go to the page of a party with inactive descriptions
  • Scroll down to Ballot Descriptions
  • You should see a detail view, titled Previous Descriptions, as in the screenshot below
Screenshot 2023-06-16 at 15 54 01
  • Find a party who has no alternative name and no active descriptions
  • You should see "This party has no current alternative descriptions registered with the Electoral Commission.", as in the screenshot above.

Test 4: Emblems

  • Criteria: Parties with no active emblems should show "This party has no current alternative emblems registered with the Electoral Commission.", parties with inactive emblems should have a "Previous Emblems" detail view
  • Suggested party: http://localhost:8000/parties/party:7947/
  • Go to the page of a party with inactive emblems
  • Scroll down to Emblems
  • You should see a detail view, titled Previous Emblems as in the screenshot below
Screenshot 2023-06-16 at 15 54 10
  • Find a party with no active emblems
  • You should see "This party has no current alternative emblems registered with the Electoral Commission.", as in the screenshot above

Tasks

Preview Give feedback
No tasks being tracked yet.

@Bekabyx Bekabyx force-pushed the feature/party-pages-update branch from bbbdd8a to 272d289 Compare June 16, 2023 15:01
@Bekabyx Bekabyx requested review from VirginiaDooley and symroe June 16, 2023 15:01
@Bekabyx Bekabyx marked this pull request as ready for review June 16, 2023 15:04
@coveralls
Copy link

coveralls commented Jun 17, 2023

Coverage Status

coverage: 58.959% (+0.2%) from 58.803% when pulling fe24b46 on feature/party-pages-update into e7e9f67 on master.

@pmk01
Copy link
Contributor

pmk01 commented Jun 21, 2023

The only thing which has just occurred to me (sorry) is the 'this party is on the Great Britain register' line. I think we wanted to change/clarify that, either to explain what the register is, or perhaps more straightforwardly 'this party is registered to stand candidates in England, Scotland and Wales' (delete as applicable). If that's too much work though happy to deploy as is.

Copy link
Contributor

@VirginiaDooley VirginiaDooley left a comment

Choose a reason for hiding this comment

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

This worked exactly as described and expected. The only difference was that I needed to add this setting to local.py instead of base.py in the setup to test:


Pre-test - WCIVF
Check out this branch (feature/party-pages-update)
In local.py, change YNR_BASE to http://0.0.0.0:4444

@Bekabyx Bekabyx force-pushed the feature/party-pages-update branch from 272d289 to efa44ec Compare June 29, 2023 10:58
Bekabyx added 5 commits July 3, 2023 13:47
- Added querysets to pull active/inactive only
- Updated ordering to give precedence to active items when calling objects.all
@Bekabyx Bekabyx force-pushed the feature/party-pages-update branch from efa44ec to fe24b46 Compare July 3, 2023 12:47
@Bekabyx Bekabyx merged commit b3499b1 into master Jul 3, 2023
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