public void UserCanDragItems()
        {
            var browser = new TestBrowser();

            browser.Initialize();
            var interactionsPage = new InteractionsPage(browser);

            interactionsPage.Visit("Draggable");

            browser.Close();
        }
Beispiel #2
0
        public void BeAbleToSelectGridElement()
        {
            var homePage = new HomePage(this.Driver);

            homePage.Open();
            homePage.JavaScriptClick(homePage.InteractionsSection);

            var interactionsPage = new InteractionsPage(this.Driver);

            interactionsPage.JavaScriptClick(interactionsPage.SelectableLink);

            var selectablePage = new SelectablePage(this.Driver);

            selectablePage.AssertSelectAndDragColor();
        }
Beispiel #3
0
        public void BeAbleToResizeElement(int offsetX, int offsetY, int expectedSizeWidth, int expectedSizeHeight)
        {
            var homePage = new HomePage(this.Driver);

            homePage.Open();
            homePage.JavaScriptClick(homePage.InteractionsSection);

            var interactionsPage = new InteractionsPage(this.Driver);

            interactionsPage.JavaScriptClick(interactionsPage.ResizableLink);

            var resizablePage = new ResizablePage(this.Driver);

            resizablePage.AssertsResize(offsetX, offsetY, expectedSizeWidth, expectedSizeHeight);
        }
Beispiel #4
0
        public void BeAbleToDragAndDropElement()
        {
            var homePage = new HomePage(this.Driver);

            homePage.Open();
            homePage.JavaScriptClick(homePage.InteractionsSection);

            var interactionsPage = new InteractionsPage(this.Driver);

            interactionsPage.JavaScriptClick(interactionsPage.DroppableLink);

            var droppablePage = new DroppablePage(this.Driver);

            droppablePage.AssertDragAndDrop();
        }
Beispiel #5
0
        public void BeAbleToSortElement()
        {
            var homePage = new HomePage(this.Driver);

            homePage.Open();
            homePage.JavaScriptClick(homePage.InteractionsSection);

            var interactionsPage = new InteractionsPage(this.Driver);

            interactionsPage.JavaScriptClick(interactionsPage.SortableLink);

            var sortablePage = new SortablePage(this.Driver);

            sortablePage.AssertReorderElements();
        }
        public void UserCanSortItems()
        {
            var browser = new TestBrowser();

            browser.Initialize();
            var interactionsPage = new InteractionsPage(browser);

            interactionsPage.Visit("Sortable");
            var     driver = (IWebDriver)browser.Instance.Native;
            Actions act    = new Actions(driver);

            var from = 1;
            var to   = 2;

            interactionsPage.MoveElementFromTo(from, to, act);
            string[] expected = { "Item 2", "Item 1", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7" };
            var      actual   = interactionsPage.CheckSort();

            Assert.AreEqual(expected, actual);

            browser.Close();
        }
Beispiel #7
0
 public void NavigateToHomeAndInteractionsPagesTest()
 {
     NavigateToStartPage(Driver, out _homePage);
     _homePage         = _homePage.ClickHomeButton();
     _interactionsPage = _homePage.ClickInteractionsButton();
 }