public void Should_edit_user_group()
        {
            string key = Guid.NewGuid().ToString();
            string groupName = Guid.NewGuid().ToString();
            string groupName2 = Guid.NewGuid().ToString();
            _webBrowser.ScreenCaptureOnFailure(() =>
                                                   {
                                                       AddNewUserGroup(key, groupName);

                                                       var table = new DisplayTable<UserGroupInput>(_webBrowser);
                                                       table.AddRowFilter(u => u.Name, groupName);

                                                       Assert.IsTrue(table.VerifyRowExists());

                                                       table.ClickLink(CodeCampSite.Admin.EditUserGroup);
                                                       _webBrowser.VerifyPage<UserGroupController>(
                                                           p => p.Edit((UserGroupInput) null));

                                                       var form = new InputForm<UserGroupInput>(_webBrowser);
                                                       form
                                                           .Input(u => u.Name, groupName2)
                                                           .Submit();

                                                       var table2 = new DisplayTable<UserGroupInput>(_webBrowser);
                                                       table2.AddRowFilter(u => u.Name, groupName2);
                                                       table2.AddRowFilter(u => u.Key, key);

                                                       Assert.IsTrue(table2.VerifyRowExists());
                                                   });
        }
        public void Should_edit_user_group()
        {
            string key        = Guid.NewGuid().ToString();
            string groupName  = Guid.NewGuid().ToString();
            string groupName2 = Guid.NewGuid().ToString();

            _webBrowser.ScreenCaptureOnFailure(() =>
            {
                AddNewUserGroup(key, groupName);

                var table = new DisplayTable <UserGroupInput>(_webBrowser);
                table.AddRowFilter(u => u.Name, groupName);

                Assert.IsTrue(table.VerifyRowExists());

                table.ClickLink(CodeCampSite.Admin.EditUserGroup);
                _webBrowser.VerifyPage <UserGroupController>(
                    p => p.Edit((UserGroupInput)null));

                var form = new InputForm <UserGroupInput>(_webBrowser);
                form
                .Input(u => u.Name, groupName2)
                .Submit();

                var table2 = new DisplayTable <UserGroupInput>(_webBrowser);
                table2.AddRowFilter(u => u.Name, groupName2);
                table2.AddRowFilter(u => u.Key, key);

                Assert.IsTrue(table2.VerifyRowExists());
            });
        }
        public void Should_Create_New_User_Groups()
        {
            string key = Guid.NewGuid().ToString();
            string groupName = Guid.NewGuid().ToString();
            _webBrowser.ScreenCaptureOnFailure(() =>
                                                   {
                                                       AddNewUserGroup(key, groupName);

                                                       var table = new DisplayTable<UserGroupInput>(_webBrowser);
                                                       table.AddRowFilter(u => u.Name, groupName);

                                                       Assert.IsTrue(table.VerifyRowExists());

                                                       table.ClickLink(CodeCampSite.Admin.ViewUserGroup);

                                                       _webBrowser.VerifyPage<UserGroupController>(p => p.Index(null));
                                                   });
        }
        public void Should_Create_New_User_Groups()
        {
            string key       = Guid.NewGuid().ToString();
            string groupName = Guid.NewGuid().ToString();

            _webBrowser.ScreenCaptureOnFailure(() =>
            {
                AddNewUserGroup(key, groupName);

                var table = new DisplayTable <UserGroupInput>(_webBrowser);
                table.AddRowFilter(u => u.Name, groupName);

                Assert.IsTrue(table.VerifyRowExists());

                table.ClickLink(CodeCampSite.Admin.ViewUserGroup);

                _webBrowser.VerifyPage <UserGroupController>(p => p.Index(null));
            });
        }