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

AO3-4956 Extend tests for opendoors/tools_controller.rb and change from 404 to flash error #2850

Merged
merged 2 commits into from
Apr 27, 2017

Conversation

redsummernight
Copy link
Member

Issue

https://otwarchive.atlassian.net/browse/AO3-4956

Purpose

  • Display an error message instead of raising 404 when a work ID cannot be found.
  • Add controller spec for opendoors/tools_controller.rb.
  • Add a scenario for updating a work's imported from URL.

Testing

See https://otwarchive.atlassian.net/browse/AO3-4956.

- Display an error message instead of raising 404 when
  a work ID cannot be found.
- Add controller spec for opendoors/tools_controller.rb.
- Add a scenario for updating a work's imported from URL.
@sarken sarken changed the title AO3-4956 Extend tests for opendoors/tools_controller.rb AO3-4956 Extend tests for opendoors/tools_controller.rb and change from 404 to flash error Apr 9, 2017
And I am logged in as "OpenDoors"
When I go to the Open Doors tools page
Then I should see "Update Redirect URL"
When I fill in "imported_from_url" with "http://example.com/my-immortal"
And I fill in "work_url" with the path to the "My Immortal" work page
And I submit with the 2nd button
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason that we can't use the buttons name as 2nd button feels fragile ?

Copy link
Member Author

Choose a reason for hiding this comment

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

The tools page has 2 forms: one to change the imported URL and one to block imported emails. The first form has no id/class, and both forms have the same "Submit" button.

Can we change the submit button values?

Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't get to the right place on test or my dev. I just wanted to make sure it was like that :(

I will @sarken to comment. I think what you have done is fine. If we wanted to have two buttons called Submit which I don't like we could have an extra div but I would prefer sarken had a look ?

Copy link
Member

Choose a reason for hiding this comment

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

At some point, we should make the button text more descriptive, but I don't think we need to do anything about it now.

@zz9pzza zz9pzza merged commit 87c7930 into otwcode:master Apr 27, 2017
@redsummernight redsummernight deleted the AO3-4956-od-tools-test branch April 28, 2017 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants