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

Bring new fixtures to Journalist interface layout tests #6504

Conversation

nabla-c0d3
Copy link
Contributor

@nabla-c0d3 nabla-c0d3 commented Jul 30, 2022

Status

Ready

Description of Changes

This PR continue the work from #6503, by bringing the new test code and fixtures to some of the layout tests for the journalist app.

More specifically, this PR:

@nabla-c0d3 nabla-c0d3 force-pushed the refactor-layout-tests-journalist branch 3 times, most recently from 5b23420 to 493d4da Compare July 31, 2022 07:32
@nabla-c0d3 nabla-c0d3 force-pushed the refactor-layout-tests-journalist branch from 493d4da to c1b4fc3 Compare August 10, 2022 18:41


@pytest.mark.parametrize("locale", list_locales())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Below I merged some of the "screenshot-taking" tests, so that the test suite would run faster.

@nabla-c0d3 nabla-c0d3 marked this pull request as ready for review August 10, 2022 18:47
@nabla-c0d3 nabla-c0d3 requested a review from a team as a code owner August 10, 2022 18:47
@zenmonkeykstop zenmonkeykstop self-assigned this Aug 11, 2022

def test_index_no_documents_admin(self):
self._admin_logs_in()
self._screenshot("journalist-admin_index_no_documents.png")
Copy link
Contributor

Choose a reason for hiding this comment

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

This screenshot is still referenced in the documentation.

self._source_submits_a_message()
self._source_logs_out()
self._journalist_logs_in()
self._screenshot("journalist-index_javascript.png")
Copy link
Contributor

Choose a reason for hiding this comment

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

This screenshot is still referenced in the documentation


def test_index_entered_text(self):
self._input_text_in_login_form("jane_doe", "my password is long", "117264")
self._screenshot("journalist-index_with_text.png")
Copy link
Contributor

Choose a reason for hiding this comment

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

This screenshot is still referenced in the docs.

Copy link
Contributor

@zenmonkeykstop zenmonkeykstop left a comment

Choose a reason for hiding this comment

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

Good change overall, 3 of the tests that were removed generate screenshots that are still used in the docs, so they may need to be re-added (or the shots grabbed elsewhere in the test flow)

@nabla-c0d3
Copy link
Contributor Author

nabla-c0d3 commented Aug 15, 2022

@zenmonkeykstop Good catch - I didn't realize that this was how the screenshots were used. I've re-added the missing ones, and left the changes as a separate commit so that it's easier to review. Thanks!

Copy link
Contributor

@zenmonkeykstop zenmonkeykstop left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the update.

@zenmonkeykstop zenmonkeykstop merged commit cfea67a into freedomofpress:develop Aug 16, 2022
@nabla-c0d3 nabla-c0d3 deleted the refactor-layout-tests-journalist branch August 16, 2022 18:03
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