-
Notifications
You must be signed in to change notification settings - Fork 791
AO3-4583 Fix redirect when creating top-level comment on work with multiple pages of comments #5653
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
Open
marcus8448
wants to merge
3
commits into
otwcode:master
Choose a base branch
from
marcus8448:AO3-4583
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,3 +117,55 @@ Scenario: Posting top level comment on a middle chapter, while in temporary view | |
| And I should see "Chapter 2" within "div#chapters" | ||
| # Once you've commented, it defaults back to your preference | ||
| And I should see "Chapter 1" within "div#chapters" | ||
|
|
||
| Scenario: Posting a top level comment on a one-chapter work, when there is more than one page of comments | ||
| Given the work "The Collection" with 2 comments setup | ||
| And 2 comments displayed per page | ||
| And I am logged in as a random user | ||
| When I view the work "The Collection" | ||
| And I post a comment "wow, that's a lot of comments" | ||
| Then I should see "wow, that's a lot of comments" | ||
| When I view the work "The Collection" | ||
| And I post a comment "very over 1000 amazing" | ||
| Then I should see "very over 1000 amazing" | ||
| When I post a comment "have another comment" | ||
| Then I should see "have another comment" | ||
| And I should not see "wow, that's a lot of comments" | ||
|
|
||
| Scenario: Posting a top level comment on a multi-chapter work, when there is more than one page of comments, | ||
| with view full work in the preferences | ||
| Given the work "Welcome" | ||
| And 2 comments displayed per page | ||
| And a comment "hello." by "somebody" on the work "Welcome" | ||
| And a chapter is added to "Welcome" | ||
| And a comment "hi!" by "somebody" on the work "Welcome" | ||
| And a chapter is added to "Welcome" | ||
| And a comment "heyo" by "somebody" on the work "Welcome" | ||
| And I am logged in as a random user | ||
| And I set my preferences to View Full Work mode by default | ||
| When I view the work "Welcome" | ||
| And I post a comment "sup?" | ||
| Then I should see "sup?" | ||
| And I should see "heyo" | ||
| And I should not see "hi!" | ||
|
|
||
| Scenario: Posting a top level comment on the middle chapter of a work, when there is more than one page of comments, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are 3 cases for top level comments. Shouldn't we also have at least a few cases for non-top-level ones too? |
||
| with view full work in the preferences, and while in temporary view by chapter mode | ||
| Given the work "Welcome" | ||
| And 2 comments displayed per page | ||
| And a comment "hello." by "somebody" on the work "Welcome" | ||
| And a chapter is added to "Welcome" | ||
| And a comment "hi!" by "somebody" on the work "Welcome" | ||
| And a comment "hiya" by "somebody" on the work "Welcome" | ||
| And a chapter is added to "Welcome" | ||
| And a comment "heyo" by "somebody" on the work "Welcome" | ||
| And a comment "hey!" by "somebody" on the work "Welcome" | ||
| And I am logged in as a random user | ||
| And I set my preferences to View Full Work mode by default | ||
| When I view the work "Welcome" in chapter-by-chapter mode | ||
| And I view the 2nd chapter | ||
| And I post a comment "sup?" | ||
| # Once you've commented, it defaults back to your preference (full work) | ||
| Then I should see "sup?" | ||
| And I should see "hey!" | ||
| And I should not see "hiya" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: since the second condition is also a case of
view_full_work, I think it would make more sense to lift the current user check up into that variable.