示例#1
0
        public void TestSendMessageWithBigAttach()
        {
            string path = TestContext.CurrentContext.TestDirectory;

            autorisation.SetLogin(user2.Login);
            autorisation.SetPassword(user2.Password);
            sendingMess.AttachDocument(path + Data.BigFileName, user1.Login, Data.ThirdMessage);
            Thread.Sleep(1000);

            Assert.IsTrue(sendingMess.IsDisplayedAlert());
            sendingMess.CloseAlert();
        }
示例#2
0
        public void TestSetSettings()
        {
            string path = TestContext.CurrentContext.TestDirectory;

            autorisation.SetLogin(user2.Login);
            autorisation.SetPassword(user2.Password);
            // sett.OpenSettings();
            settings.OpenLinkSettings();
            settings.ChooseForwardPage();
            settings.AddForwardAddress(user3.Login);
            //Thread.Sleep(1000);
            exit.LogOut();
            exit.ChangeAccount();
            exit.AddAccount();

            autorisation.SetLogin(user3.Login);
            autorisation.SetPassword(user3.Password);

            sendingMess.OpenMessage();
            sendingMess.ConfirmRequest();

            exit.LogOut();
            exit.AddAccount();

            autorisation.SetLogin(user2.Login);

            autorisation.SetPassword(user2.Password);

            //sett.OpenSettings();

            settings.OpenLinkSettings();

            settings.ChooseForwardPage();



            settings.SetFilters(user1.Login);
            settings.ForwardAcopyOfIncomeMail();

            //Thread.Sleep(1000);
            exit.LogOut();
            exit.AddAccount();

            autorisation.SetLogin(user1.Login);
            autorisation.SetPassword(user1.Password);
            sendingMess.CreateMessage(user2.Login, Data.FirstMessage);
            sendingMess.SendMessage();
            sendingMess.AttachDocument(path + Data.FileName, user2.Login, Data.FirstMessage);
            Thread.Sleep(2000);
            sendingMess.SendMessage();
            //Thread.Sleep(1000);
            exit.LogOut();
            //ex.ChangeAccount();
            exit.AddAccount();

            autorisation.SetLogin(user2.Login);

            autorisation.SetPassword(user2.Password);
            Assert.IsTrue(spamMessage.IsUnimportant());
            Assert.IsTrue(spamMessage.IsImportant());

            exit.LogOut();
            exit.AddAccount();

            autorisation.SetLogin(user3.Login);
            autorisation.SetPassword(user3.Password);

            sendingMess.OpenMessage();
            string message = sendingMess.GetMessageText();

            Assert.AreEqual(Data.FirstMessage, message);
        }