mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add acceptance JS tests for group membership button.
This commit is contained in:
@@ -7,8 +7,26 @@ test("Browsing Groups", () => {
|
||||
|
||||
andThen(() => {
|
||||
equal(count('.groups-table-row'), 2, 'it displays visible groups');
|
||||
equal(find('.group-index-join').length, 1, 'it show button to join group');
|
||||
equal(find('.group-index-request').length, 1, 'it show button to request for group membership');
|
||||
equal(find('.group-index-join').length, 1, 'it shows button to join group');
|
||||
equal(find('.group-index-request').length, 1, 'it shows button to request for group membership');
|
||||
});
|
||||
|
||||
click('.group-index-join');
|
||||
|
||||
andThen(() => {
|
||||
ok(exists('.modal.login-modal'), 'it shows the login modal');
|
||||
});
|
||||
|
||||
click('.login-modal .close');
|
||||
|
||||
andThen(() => {
|
||||
ok(invisible('.modal.login-modal'), 'it closes the login modal');
|
||||
});
|
||||
|
||||
click('.group-index-request');
|
||||
|
||||
andThen(() => {
|
||||
ok(exists('.modal.login-modal'), 'it shows the login modal');
|
||||
});
|
||||
|
||||
click("a[href='/groups/discourse/members']");
|
||||
@@ -16,6 +34,12 @@ test("Browsing Groups", () => {
|
||||
andThen(() => {
|
||||
equal(find('.group-info-name').text().trim(), 'Awesome Team', "it displays the group page");
|
||||
});
|
||||
|
||||
click('.group-index-join');
|
||||
|
||||
andThen(() => {
|
||||
ok(exists('.modal.login-modal'), 'it shows the login modal');
|
||||
});
|
||||
});
|
||||
|
||||
test("Viewing Group", () => {
|
||||
|
||||
Reference in New Issue
Block a user