Exemplo n.º 1
0
        public void AdminCanCreateGroup()
        {
            Thread.Sleep(500);

            // hover the context ... button
            var action = new Actions(_fixture.Driver);

            action.MoveToElement(_fixture.DataElement("tree-item-Approval groups", ".umb-options")).Click().Build().Perform();

            Thread.Sleep(5555555);
            _fixture.Logout(false);
        }
Exemplo n.º 2
0
        public void UserTypeHasCorrectAccess(string user, string password, bool expected)
        {
            _fixture.Login(user, password);

            // check for workflow section in nav
            Exception ex = Record.Exception(() => _fixture.DataElement("section-workflow"));

            Assert.Equal(expected, ex == null);

            Thread.Sleep(500);

            // check for save and publish button
            _fixture.DataElement("section-content", "a").Click();
            _fixture.DataElement("tree-root", "~ ul li:first-child").Click();

            _fixture.Wait(".workflow-button-drawer");
            ex = Record.Exception(() => _driver.FindElement(By.CssSelector("[key='buttons_saveAndPublish']")));
            Assert.Equal(expected, ex == null);

            Thread.Sleep(500);

            // check for workflow config menu option
            _fixture.DataElement("section-content", "a").Click();

            // hover the context ... button
            var action = new Actions(_fixture.Driver);

            action.MoveToElement(_fixture.DataElement("tree-root", "~ ul li:first-child")).ContextClick().Build().Perform();

            Thread.Sleep(2500);

            ex = Record.Exception(() => _fixture.DataElement("action-workflowConfig"));
            Assert.Equal(expected, ex == null);

            // don't forget to logout...
            _fixture.Logout(!expected);
        }