Esempio n. 1
0
        public void ADD_NEW_USER()
        {
            var signinPage = new Pages.SigninPage(this);

            signinPage.Open();
            signinPage.Signin("adm@localhost", "box");

            var page = new Pages.UsersPage(this);

            page.Open();

            // press the ADD BUTTON should show the edit form
            I.Assert.Not.Exists(page.EditForm);
            I.Click(page.AddNewButton);
            I.Assert.Exists(page.EditForm);

            // try to save without filling the form
            I.Click(page.ApplyButton);
            I.Assert.Exists(page.RequiredEmailAlert);

            // try to use an invalid e-mail
            I.Enter("teste").In(page.UserEmail);
            I.Assert.Exists(page.RequiredEmailAlert);

            // try to use an valid e-mail
            I.Enter("*****@*****.**").In(page.UserEmail);
            I.Assert.Not.Visible(page.RequiredEmailAlert);
        }
Esempio n. 2
0
        public void ADD_NEW_USER()
        {
            var signinPage = new Pages.SigninPage(this);
            signinPage.Open();
            signinPage.Signin("adm@localhost", "box");

            var page = new Pages.UsersPage(this);
            page.Open();

            // press the ADD BUTTON should show the edit form
            I.Assert.Not.Exists(page.EditForm);
            I.Click(page.AddNewButton);
            I.Assert.Exists(page.EditForm);

            // try to save without filling the form
            I.Click(page.ApplyButton);
            I.Assert.Exists(page.RequiredEmailAlert);

            // try to use an invalid e-mail
            I.Enter("teste").In(page.UserEmail);
            I.Assert.Exists(page.RequiredEmailAlert);

            // try to use an valid e-mail
            I.Enter("*****@*****.**").In(page.UserEmail);
            I.Assert.Not.Visible(page.RequiredEmailAlert);
        }