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: Broken group messages inboxes when group name is mixed case #22183
Merged
tgxworld
merged 1 commit into
discourse:main
from
tgxworld:fix_error_when_viewing_group_inbox
Jun 19, 2023
Merged
FIX: Broken group messages inboxes when group name is mixed case #22183
tgxworld
merged 1 commit into
discourse:main
from
tgxworld:fix_error_when_viewing_group_inbox
Jun 19, 2023
Conversation
This file contains 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
tgxworld
force-pushed
the
fix_error_when_viewing_group_inbox
branch
2 times, most recently
from
June 19, 2023 06:23
36dd0e1
to
7165776
Compare
This pull request has been mentioned on Discourse Meta. There might be relevant details there: |
This is a follow up to 1cbc65b where visiting a group with a mixed case name would result in an error.
tgxworld
force-pushed
the
fix_error_when_viewing_group_inbox
branch
from
June 19, 2023 09:26
7165776
to
3739c10
Compare
CvX
approved these changes
Jun 19, 2023
tgxworld
commented
Jun 19, 2023
Comment on lines
-975
to
-1022
acceptance( | ||
"User Private Messages - user with uppercase username", | ||
function (needs) { | ||
needs.user({ | ||
groups: [{ id: 14, name: "awesome_group", has_messages: true }], | ||
}); | ||
|
||
needs.pretender((server, helper) => { | ||
const response = cloneJSON(userFixtures["/u/charlie.json"]); | ||
response.user.username = "chArLIe"; | ||
server.get("/u/charlie.json", () => helper.response(response)); | ||
|
||
server.get( | ||
"/topics/private-messages-group/:username/:group_name.json", | ||
() => { | ||
return helper.response({ | ||
topic_list: { | ||
topics: [ | ||
{ id: 1, posters: [] }, | ||
{ id: 2, posters: [] }, | ||
], | ||
}, | ||
}); | ||
} | ||
); | ||
}); | ||
|
||
test("viewing inbox", async function (assert) { | ||
await visit("/u/charlie/messages"); | ||
|
||
assert.strictEqual( | ||
query(".user-nav-messages-dropdown .selected-name").textContent.trim(), | ||
"Inbox", | ||
"menu defaults to Inbox" | ||
); | ||
}); | ||
|
||
test("viewing group inbox", async function (assert) { | ||
await visit("/u/charlie/messages/group/awesome_group"); | ||
|
||
assert.strictEqual( | ||
query(".user-nav-messages-dropdown .selected-name").textContent.trim(), | ||
"awesome_group", | ||
"dropdown menu displays the right group name" | ||
); | ||
}); | ||
} | ||
); |
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.
Changing to a system test because it is a nightmare to get the fixtures right here.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a follow up to 1cbc65b where
visiting a group with a mixed case name would result in an error.