mirror of
https://github.com/discourse/discourse.git
synced 2025-09-09 19:03:09 +08:00
FEATURE: require name when accepting invite if 'full name required' setting is enabled
This commit is contained in:
parent
266acbcc6c
commit
d2c2139da8
8 changed files with 53 additions and 22 deletions
|
@ -1,7 +1,11 @@
|
|||
import { acceptance } from "helpers/qunit-helpers";
|
||||
import PreloadStore from 'preload-store';
|
||||
|
||||
acceptance("Invite Accept");
|
||||
acceptance("Invite Accept", {
|
||||
settings: {
|
||||
full_name_required: true
|
||||
}
|
||||
});
|
||||
|
||||
test("Invite Acceptance Page", () => {
|
||||
PreloadStore.store('invite_info', {
|
||||
|
@ -14,7 +18,13 @@ test("Invite Acceptance Page", () => {
|
|||
andThen(() => {
|
||||
ok(exists("#new-account-username"), "shows the username input");
|
||||
equal(find("#new-account-username").val(), "invited", "username is prefilled");
|
||||
ok(exists("#new-account-name"), "shows the name input");
|
||||
ok(exists("#new-account-password"), "shows the password input");
|
||||
ok(exists('.invites-show .btn-primary:disabled'), 'submit is disabled because name is not filled');
|
||||
});
|
||||
|
||||
fillIn("#new-account-name", 'John Doe');
|
||||
andThen(() => {
|
||||
not(exists('.invites-show .btn-primary:disabled'), 'submit is enabled');
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue