Merge ~pelpsi/launchpad:mispelled-error-message-adding-yourself-team into launchpad:master
Proposed by
Simone Pelosi
Status: | Merged |
---|---|
Approved by: | Simone Pelosi |
Approved revision: | 521399bea9e10082bf541032e462bebb67a8eb84 |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~pelpsi/launchpad:mispelled-error-message-adding-yourself-team |
Merge into: | launchpad:master |
Diff against target: |
116 lines (+65/-2) 3 files modified
lib/lp/registry/javascript/team.js (+2/-1) lib/lp/registry/javascript/tests/test_team.html (+31/-1) lib/lp/registry/javascript/tests/test_team.js (+32/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson (community) | Approve | ||
Review via email: mp+439041@code.launchpad.net |
Commit message
Misspelled error message
Add yourself to a team by hitting "Add member" and then "Pick me", the error message if you're already a member was:
"Me is already a member of this team"
now is:
"<username> is already a member of this team"
LP: #1056790
To post a comment you must log in.
Thanks for your first contribution! :party_hat:
If you're selecting another user, I think this will change behaviour from saying "Colin Watson is already a member of this team" to saying "cjwatson is already a member of this team". That's probably fine, but it's worth noting. For comparison, the non-JS version of this error message is in `lib/lp/ registry/ browser/ team.py` and would say "Colin Watson (cjwatson) is already a member of <team display name>".
I don't think this code is currently covered by any tests. You don't have to spend too long on it, and this is optional because I suspect it may be a bit difficult, but can you see if there's a reasonable way to add some test coverage? It would go in `lib/lp/ registry/ javascript/ tests/test_ team.js` , possibly needing some added supporting HTML in `lib/lp/ registry/ javascript/ tests/test_ team.html` . The files listed by `git grep -Fl lp.client.Launchpad '**/tests/*'` may be useful in figuring out how to do this sort of thing where you need to simulate responses returned from the webservice API to JS code - perhaps `lib/lp/ app/javascript/ tests/test_ information_ type.js` .