FIX: Disable save button when new group form is empty.

https://meta.discourse.org/t/adding-owners-members-ux-is-inconsistent-and-misleading/58084/26?u=tgxworld
This commit is contained in:
Guo Xiang Tan
2018-04-12 10:29:09 +08:00
parent 71b2f8ae1d
commit c0595ebe99
4 changed files with 21 additions and 8 deletions
@@ -7,8 +7,8 @@ QUnit.test("As an anon user", assert => {
andThen(() => {
assert.equal(
find('.groups-admin-dropdown').length, 0,
'it should not display the admin dropdown'
find('.groups-header-new').length, 0,
'it should not display the button to create a group'
);
});
});
@@ -20,6 +20,14 @@ QUnit.test("Creating a new group", assert => {
visit("/groups");
click(".groups-header-new");
andThen(() => {
assert.equal(
find('.group-form-save[disabled]').length, 1,
'save button should be disabled'
);
});
fillIn("input[name='name']", '1');
andThen(() => {