diff --git a/clients/web/test/spec/groupSpec.js b/clients/web/test/spec/groupSpec.js
index <HASH>..<HASH> 100644
--- a/clients/web/test/spec/groupSpec.js
+++ b/clients/web/test/spec/groupSpec.js
@@ -48,6 +48,14 @@ describe('Test group actions', function () {
         waitsFor(function () {
             return Backbone.history.fragment.slice(-18) === '/roles?dialog=edit';
         }, 'the url state to change');
+
+        waitsFor(function () {
+            return $('a.btn-default').text() === 'Cancel';
+        }, 'the cancel button to appear');
+
+        runs(function () {
+            $('a.btn-default').click();
+        });
     });
 
     it('go back to groups page', girderTest.goToGroupsPage());
Closing the group edit dialog in the test.