Пример #1
0
        static void Main(string[] args)
        {
            LoginPageSteps   loginPage   = new LoginPageSteps();
            LogoutPageSteps  logoutPage  = new LogoutPageSteps();
            MainPageSteps    mainPage    = new MainPageSteps();
            ThemesPageSteps  themePage   = new ThemesPageSteps();
            SettingPageSteps settPage    = new SettingPageSteps();
            MailBoxPageSteps mailPage    = new MailBoxPageSteps();
            LetterPageSteps  letterPage  = new LetterPageSteps();
            StarredPageSteps starredPage = new StarredPageSteps();
            SpamPageSteps    spamPage    = new SpamPageSteps();

            //MailBoxPageSteps mailPage = new MailBoxPageSteps();
            //StarredPageSteps starredPage = new StarredPageSteps();
            loginPage.Open();
            loginPage.Authorize(D.user2, D.password);
            mailPage.WriteMessage(D.user3, "For starred", "XO");
            logoutPage.CommonExit();
            loginPage.Authorize(D.user3, D.password);
            Console.WriteLine(mainPage.CheckIfItIsStarred());
            mainPage.GoToStarred();
            Console.WriteLine(starredPage.CheckIfItIsStarredPage("https://mail.google.com/mail/u/0/#starred"));
            Console.WriteLine(starredPage.CheckTheTopic("For starred"));
            Console.ReadLine();
        }
Пример #2
0
        public void CheckTheSpam()
        {
            IpHandler        hand     = new IpHandler();
            MailBoxPageSteps mailPage = new MailBoxPageSteps();
            SpamPageSteps    spamPage = new SpamPageSteps();

            loginPage.Authorize(Data.user1, Data.password);
            mailPage.WriteMessage(Data.user2, "for spam1", "Spam.123" + hand.GetIp(Data.ip));
            logoutPage.CommonExit();
            loginPage.Authorize(Data.user2, Data.password);
            mainPage.AddToSpam();
            logoutPage.CommonExit();
            loginPage.Authorize(Data.user1, Data.password);
            mailPage.WriteMessage(Data.user2, "for spam2", "Spam.456");
            logoutPage.CommonExit();
            loginPage.Authorize(Data.user2, Data.password);
            mainPage.GoToSpam();
            spamPage.CheckSpam();
            Assert.AreEqual("for spam2", spamPage.topic);
        }
Пример #3
0
        [Test]//1
        public void CheckAddToSpamAndDeleteFromSpamFunctions()
        {
            MailBoxPageSteps mailPage = new MailBoxPageSteps();
            SpamPageSteps    spamPage = new SpamPageSteps();

            loginPage.Authorize(Data.user1, Data.password);
            mailPage.WriteMessage(Data.user2, "for spam", "Spam");
            logoutPage.CommonExit();
            loginPage.Authorize(Data.user2, Data.password);
            mainPage.AddToSpam();
            mainPage.GoToSpam();
            spamPage.DeleteFromSpam();
            Assert.True(mainPage.CheckTopicInInbox("for spam"));
        }
Пример #4
0
        public void CheckStarredAndNotStarredFunction()
        {
            MailBoxPageSteps mailPage    = new MailBoxPageSteps();
            StarredPageSteps starredPage = new StarredPageSteps();

            loginPage.Authorize(Data.user2, Data.password);
            mailPage.WriteMessage(Data.user3, "For starred", "XO");
            logoutPage.CommonExit();
            loginPage.Authorize(Data.user3, Data.password);
            Assert.True(mainPage.CheckIfItIsStarred());
            mainPage.GoToStarred();
            Assert.True(starredPage.CheckIfItIsStarredPage("https://mail.google.com/mail/u/0/#starred"));
            Assert.True(starredPage.CheckTheTopic("For starred"));
        }
Пример #5
0
        public void CheckForwardingOfMessages()
        {
            string path = TestContext.CurrentContext.TestDirectory;


            //   SettingPageSteps sett = new SettingPageSteps();

            FormOfForwardPageSteps formPage = new FormOfForwardPageSteps();
            LetterPageSteps        letter   = new LetterPageSteps();
            MailBoxPageSteps       mess     = new MailBoxPageSteps();
            BinPageSteps           binPage  = new BinPageSteps();

            loginPage.Authorize(Data.user2, Data.password);

            mainPage.GoToSettings();
            settPage.GoToForward();
            forwardPage.SetForward(Data.user3);

            logoutPage.CommonExit();
            loginPage.Authorize(Data.user3, Data.password);
            mainPage.OpenLetter();

            letter.GoByLinkToConfirm();
            logoutPage.CommonExit();

            loginPage.Authorize(Data.user2, Data.password);
            mainPage.GoToSettings();
            settPage.GoToForward();
            forwardPage.CreateFilter();
            mainPage.GoToSettings();
            settPage.GoToForward();

            forwardPage.AddFilter();
            formPage.ConfirmForward(Data.user1);

            logoutPage.CommonExit();
            loginPage.Authorize(Data.user1, Data.password);


            mess.WriteMessageWithAttach(Data.user2, "With attach", "attach", path + Data.txtFile);
            mess.WriteMessage(Data.user2, "Without attach", "There is no attachment here.");
            logoutPage.CommonExit();
            loginPage.Authorize(Data.user2, Data.password);
            Assert.True(mainPage.CheckUserInInbox());
            Assert.False(mainPage.CheckLabel());

            mainPage.GoToBin();

            Assert.True(binPage.CheckLabelInBin());
            Assert.True(binPage.CheckUserInBin());

            logoutPage.CommonExit();
            loginPage.Authorize(Data.user3, Data.password);
            Assert.True(mainPage.CheckUserInInbox());
            Assert.False(mainPage.CheckLabel());
            //************
            //logoutPage.CommonExit();
            //loginPage.Authorize(Data.user2, Data.password);
            //mainPage.GoToSettings();
            //settPage.GoToForward();
            //forwardPage.RemoveFilter();

            //***********
        }