示例#1
0
        public void TestSmokeEmail()
        {
            User user = usercreator.Create(login, password);

            //Login to the mail.ru
            HomePage  homePage  = new HomePage();
            InboxPage inboxPage = homePage.Login(user);

            //Assert a user is logged in
            Assert.IsTrue(inboxPage.IsSucessfullyLoggedIn(), "User is not logged in");

            //Create a new mail
            EmailPage emailPage = inboxPage.ClickCreateNewMessageButton();

            email = new DraftEmail(email);

            //Navigate to DraftsPage
            NavigationMenu navigationMenu = new NavigationMenu();
            DraftsPage     draftsPage     = navigationMenu.NavigateToDrafts();

            //Open Draft Email on DraftsPage
            emailPage = draftsPage.ClickDraftEmail(email);

            //Verify the draft content (addressee, subject and body – should be the same)
            Assert.IsTrue(emailPage.GetAddress().Equals(address), "Address is wrong.");
            Assert.IsTrue(emailPage.GetSubject().Equals(email.subject), "Message subject doesn't match");
            Assert.IsTrue(emailPage.GetMessage().Contains(expectedTestBody), "Message is incorrect.");

            //Send the mail
            emailPage.ClickSendEmailButton();

            // Verify the email is sent message
            //Assert.IsTrue(emailPage.GetVerificationMessage().Contains(ExpectedMessage));

            //Navigate to DraftsPage and verify, that the mail disappeared from ‘Drafts’ folder
            draftsPage = navigationMenu.NavigateToDrafts();
            draftsPage.WaitForEmailDisappearedBySubject(email.subject);
            Assert.IsFalse(draftsPage.IsEmailPresentBySubject(email.subject));

            //Navigate to SentPage
            SentPage sentPage = navigationMenu.NavigateToSent();

            //Verify, that the mail presents in ‘Sent’ folder.
            sentPage.WaitForEmailinSentFolder(subject);
            Assert.IsTrue(sentPage.IsEmailPresentBySubject(email.subject));

            //Log out
            navigationMenu.LogOut();
        }
示例#2
0
        public void TestSmokeEmail()
        {
            //Login to the mail.ru
            HomePage homePage = new HomePage();

            homePage.Login(login, password);

            //Assert, that the login is successful
            InboxPage inboxPage = new InboxPage();

            inboxPage.ClickCreate();

            //Create a new mail
            EmailPage emailPage = new EmailPage();

            emailPage.CreateDraftEmail(address, subject, expectedTestBody);

            //Navigate to DraftsPage
            NavigationMenu navigationMenu = new NavigationMenu();
            DraftsPage     draftsPage     = navigationMenu.NavigateToDrafts();

            //Verify, that the mail presents in ‘Drafts’ folder.
            draftsPage.ClickDraftEmail(subject);

            //Verify the draft content (addressee, subject and body – should be the same)
            emailPage = new EmailPage();
            emailPage.CheckEmailFields(address, subject, expectedTestBody);

            //Send the mail
            emailPage.SendEmail();

            //Navigate to DraftsPage and verify, that the mail disappeared from ‘Drafts’ folder
            draftsPage = navigationMenu.NavigateToDrafts();
            draftsPage.CheckDisappearedEmail(subject);

            //Navigate to SentPage
            SentPage sentPage = navigationMenu.NavigateToSent();

            //Verify, that the mail presents in ‘Sent’ folder.
            sentPage.CheckSentEmail(subject);

            //Log out
            homePage = navigationMenu.LogOut();
        }
示例#3
0
        public void TestDeleteEmail()
        {
            User user = usercreator.Create(login, password);

            //Login to the mail.ru
            HomePage  homePage  = new HomePage();
            InboxPage inboxPage = homePage.Login(user);

            //Assert a user is logged in
            Assert.IsTrue(inboxPage.IsSucessfullyLoggedIn(), "User is not logged in");

            //Create a new mail
            EmailPage emailPage = inboxPage.ClickCreateNewMessageButton();

            email = new DraftEmail(email);

            //Send the mail
            emailPage.ClickSendEmailButton();

            //Navigate to SentPage
            NavigationMenu navigationMenu = new NavigationMenu();
            SentPage       sentPage       = navigationMenu.NavigateToSent();

            //Verify, that the mail presents in ‘Sent’ folder.
            sentPage.WaitForEmailinSentFolder(subject);

            //Delete the mail from Sent folder
            //sentPage.DeleteEmail(subject);

            //Delete email dragging to the trash bin
            sentPage.DragEmailToTrashBin(subject);

            //Navigate to recycle bin
            RecycleBinPage recyclePage = navigationMenu.NavigateToRecycle();

            //Verify, that the mail presents in ‘Recycle bin’ folder.
            recyclePage.WaitForDeletedEmail(subject);
        }
示例#4
0
        public void TestDeleteEmail()
        {
            //Login to the mail.ru
            HomePage homePage = new HomePage();

            homePage.Login(login, password);

            //Assert, that the login is successful
            InboxPage inboxPage = new InboxPage();

            inboxPage.ClickCreate();

            //Create a new mail
            EmailPage emailPage = new EmailPage();

            emailPage.CreateDraftEmail(address, subject, expectedTestBody);

            //Send the mail
            emailPage.SendEmail();

            //Navigate to SentPage
            NavigationMenu navigationMenu = new NavigationMenu();
            SentPage       sentPage       = navigationMenu.NavigateToSent();

            //Verify, that the mail presents in ‘Sent’ folder.
            sentPage.CheckSentEmail(subject);

            //Delete the mail from Sent folder
            sentPage.DeleteEmail(subject);

            //Navigate to recycle bin
            RecycleBinPage recyclePage = navigationMenu.NavigateToRecycle();

            //Verify, that the mail presents in ‘Recycle bin’ folder.
            recyclePage.CheckDeletedEmail(subject);
        }