예제 #1
0
        public void ChooseDateOneMonthFromNow()
        {
            var futureDate = DateTime.Now.AddMonths(1);
            var month      = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(futureDate.Month);

            var date = $"{futureDate.Day:00}/{month}/{futureDate.Year}";

            DemoQaPages.PageDatePicker().NavigateTo();

            "Choose date one month from today"
            .x(() =>
            {
                DemoQaPages.PageDatePicker()
                .SetCalendarDate(date);

                // it will just default back to the previous value when you click
                // into it - automating calendars like this is a waste of time
                // control should allow you to enter the date as a string for automated tests
                // I suspect the test has been deliberately setup so you can't just use
                // the javascript executor to change the date on the element in the DOM? (react maybe)
                // it take loads of code to achieve this using element clicks/selects and it's
                // not worth it, the date picker is just an inbuilt function of the whatever
                // javascript library the front end has been written in, you don't need to
                // test it's functionality you just need to be able set the required value
                // for whatever e2e test you're running and move on :) /end rant :)
            });
        }
예제 #2
0
        public void ClickAcceptAlert()
        {
            DemoQaPages.PageAlerts().NavigateTo();

            "Click and accept an alert"
            .x(() => { DemoQaPages.PageAlerts().ClickAndDismissAlert(); });
        }
예제 #3
0
        public void SelectAndCloseSmallModal()
        {
            DemoQaPages.PageModalDialogs().NavigateTo();

            // is this meant to be testing anything?

            "Select and close small modal"
            .x(() => { DemoQaPages.PageModalDialogs().OpenAndCloseModal(); });
        }
예제 #4
0
파일: ToolTips.cs 프로젝트: ardz/ad-tt
        public void ClickAcceptAlert()
        {
            DemoQaPages.PageToolTips().NavigateTo();

            // is this meant to be testing anything?

            "Hover over button"
            .x(() => { DemoQaPages.PageToolTips().HoverOverButton(); });

            "Hover over field"
            .x(() => { DemoQaPages.PageToolTips().HoverOverField(); });
        }
예제 #5
0
파일: DragAndDrop.cs 프로젝트: ardz/ad-tt
        public void CheckElementCanBeDraggedAndDropped()
        {
            DemoQaPages.PageDroppable().NavigateTo();

            // is this meant to be testing anything?

            "Perform drag and drop"
            .x(() =>
            {
                DemoQaPages.PageDroppable().DragAndDrop();
                Assert.True(DemoQaPages.PageDroppable().DropSuccessful());
            });
        }
예제 #6
0
        public E2ETestFixture()
        {
            var testConfig = new Config().TestConfiguration;

            DriverManager =
                new DriverManager(testConfig["e2e:browser"],
                                  testConfig["e2e:suturl"],
                                  int.Parse(testConfig["e2e:timeout"]));

            DriverManager.CreateDriver();

            DemoQaPages = new DemoQaPages(DriverManager);
        }