コード例 #1
0
ファイル: AccordionTests.cs プロジェクト: milenbubi/Exam2
        public void ArrangeTests()
        {
            demoQaMainPage = PageFactory.Get <DemoQaPage>();
            accordionPage  = PageFactory.Get <AccordionPage>();

            demoQaMainPage.Load();
            demoQaMainPage.OpenAccordionSection();
            accordionPage.OpenCustomizeIconsSubSection();
        }
コード例 #2
0
        public void HoverInputField_VerifyToolTipTextIsCorrect()
        {
            //Arrange
            DemoQaPage  demoQaMainPage = PageFactory.Get <DemoQaPage>();
            TooltipPage tooltipPage    = PageFactory.Get <TooltipPage>();

            demoQaMainPage.Load();
            demoQaMainPage.OpenTooltipSection();

            string expectedTooltipText = "We ask for your age only for statistical purposes.";

            //Act
            tooltipPage.HoverInputField();
            string tooltipText = tooltipPage.Tooltip.Text;

            //Assert
            Assert.IsTrue(tooltipPage.Tooltip.Displayed);
            Assert.AreEqual(expectedTooltipText, tooltipText);
        }
コード例 #3
0
ファイル: DatePickerTests.cs プロジェクト: milenbubi/Exam
        public void ChooseDate_ChangeFormatOption_VerifyDateValueIsCorrect(string[] expectedDateFormats)
        {
            //Arrange
            DemoQaPage     demoQaMainPage = PageFactory.Get <DemoQaPage>();
            CalendarPage   calendarPage   = PageFactory.Get <CalendarPage>();
            DatePickerPage datepickerPage = PageFactory.Get <DatePickerPage>();

            demoQaMainPage.Load();
            demoQaMainPage.OpenDatePickerSection();

            datepickerPage.OpenFormatDateSubSection();
            datepickerPage.ClickDateInputField();

            //Act
            calendarPage.EnterDate();
            IEnumerable <string> dateFormats = datepickerPage.GetDateFormats();

            //Assert
            CollectionAssert.AreEqual(expectedDateFormats, dateFormats);
        }
コード例 #4
0
ファイル: SliderTests.cs プロジェクト: milenbubi/Exam2
        public void MoveSlider_InputIncreasesRespectively()
        {
            //Arrange
            DemoQaPage demoQaMainPage = PageFactory.Get <DemoQaPage>();
            SliderPage sliderPage     = PageFactory.Get <SliderPage>();

            demoQaMainPage.Load();
            demoQaMainPage.OpenSliderSection();

            //Act
            for (int position = 1; position <= 10; position++)
            {
                sliderPage.MoveSliderTo(position);
                sliderPage.DelayForSeconds(0.25);

                int sliderPositionValue = sliderPage.AmountBarValue();

                //Assert
                Assert.AreEqual(position, sliderPositionValue);
            }
        }