Exemplo n.º 1
0
        /// <summary>
        /// ENter Subject Title and HTML Text
        /// </summary>
        /// <param name="mailTypeEnum">This is Mail Type Enum </param>
        public void EnterSubjectTitleAndHtmlText(Mail.MailTypeEnum mailTypeEnum)
        {
            //Enter Subject Title and HTML Text
            logger.LogMethodEntry("ComposeNewMailUXPage", "EnterSubjectTitleAndHtmlText",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Generate Guid for Mail Details
            Guid mailDetails = Guid.NewGuid();

            try
            {
                //Select Course Mail Window
                this.SelectCourseMailWindow();
                //Select IFrame
                this.SelectIFrame();
                //Fill the Title
                this.FillTitle(mailDetails.ToString());
                //Click On View Source Button
                this.ClickOnViewSourceButton();
                //Enter HTML Text
                this.FillHtmlText(mailDetails.ToString());
                //Store Mail Details In Memory
                this.StoreMailDetailsInMemory(mailDetails, mailTypeEnum);
            }
            catch (Exception e)
            {
                ExceptionHandler.HandleException(e);
            }
            logger.LogMethodExit("ComposeNewMailUXPage", "EnterSubjectTitleAndHtmlText",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
        public void SeeTheMailMessageSentByTheUser(
            Mail.MailTypeEnum mailTypeEnum)
        {
            Logger.LogMethodEntry("ViewMailMessage", "SeeTheMailMessageSentByTheUser",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Get Mail Message Details From Memory
            Mail mailMessage = Mail.Get(mailTypeEnum);

            // Assert Mail Message Viewed Successfully
            Logger.LogAssertion("VerifyViewMailMessage", ScenarioContext.
                                Current.ScenarioInfo.Title, () => Assert.AreEqual(mailMessage.Subject,
                                                                                  new MessageGridPage().GetMailMessageSubject()));
            Logger.LogMethodEntry("ViewMailMessage", "SeeTheMailMessageSentByTheUser",
                                  base.IsTakeScreenShotDuringEntryExit);
        }
        public void VerifyMailSentByInstructor(Mail.MailTypeEnum mailTypeEnum)
        {
            //Verify Mail Sent By Instructor
            Logger.LogMethodEntry("MailMessages",
                                  "VerifyMailSentByInstructor",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Get Mail Message Details From Memory
            Mail mailMessage = Mail.Get(mailTypeEnum);

            // Assert Course Search
            Logger.LogAssertion("VerifyMail", ScenarioContext.
                                Current.ScenarioInfo.Title, () => Assert.AreEqual(mailMessage.Subject,
                                                                                  new MessageGridPage().GetMailSubjectFromInstructor(mailMessage.Subject)));
            Logger.LogMethodExit("MailMessages",
                                 "VerifyMailSentByInstructor",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Store Mail Details In Memory
        /// </summary>
        /// <param name="mailDetails">This is Mail Details Guid</param>
        /// <param name="mailTypeEnum">This is Mail Type Enum</param>
        private void StoreMailDetailsInMemory(Guid mailDetails,
                                              Mail.MailTypeEnum mailTypeEnum)
        {
            logger.LogMethodEntry("ComposeNewMailUXPage", "StoreMailDetailsInMemory",
                                  base.IsTakeScreenShotDuringEntryExit);
            Mail newMail = new Mail
            {
                //Store Mail Details
                Subject   = mailDetails.ToString(),
                Message   = mailDetails.ToString(),
                MailType  = mailTypeEnum,
                IsCreated = true
            };

            newMail.StoreMailMessageInMemory();
            logger.LogMethodExit("ComposeNewMailUXPage", "StoreMailDetailsInMemory",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
        public void CreateMailByInCourseSpaceInstructor(
            Mail.MailTypeEnum mailTypeEnum, Course.CourseTypeEnum courseTypeEnum)
        {
            //Create Mail By Course Space Instructor
            Logger.LogMethodEntry("MailMessages",
                                  "CreateMailByInCourseSpaceInstructor",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Select Compose New Option
            new MessageGridPage().SelectComposeNewOption();
            //Click On 'TO' Button
            new ComposeNewMailUXPage().ClickOnToButton();
            //Get Course Details From Memory
            Course course = Course.Get(courseTypeEnum);

            //Select Instructor Course Recipients
            new GlobalRecipientListUXPage().SelectInstructorCourseRecipients(course.Name);
            //Enter Subject Title and HTML Text
            new ComposeNewMailUXPage().EnterSubjectTitleAndHtmlText(mailTypeEnum);
            Logger.LogMethodExit("MailMessages",
                                 "CreateMailByInCourseSpaceInstructor",
                                 base.IsTakeScreenShotDuringEntryExit);
        }