Exemple #1
0
        public void CanRunInlineScripts()
        {
            App.GoTo(PjaxActions.Page1());
            App.Navigate("Navigate to 2");

            App.Navigate("Click");

            App.ShouldSeeText("Hidden=false");
        }
Exemple #2
0
        public void Navigate_NoPjax()
        {
            App.GoTo(PjaxActions.Page2());

            StoreNavState();
            App.Navigate("Navigate to 2");

            VerifyNavChanged();
        }
Exemple #3
0
        public void SubmitForm_NoPjax()
        {
            App.GoTo(PjaxActions.Form());

            StoreNavState();
            App.Submit("redirect");

            VerifyNavChanged();
        }
Exemple #4
0
        public void SubmitForm_Get()
        {
            App.GoTo(PjaxActions.FormGet());

            StoreNavState();
            App.TypeText("value", "123");
            App.Submit("go");

            App.ShouldSeeText("value=123");

            VerifyNavState();
        }
Exemple #5
0
        public void Challenge()
        {
            App.GoTo(PjaxActions.Page2());

            StoreNavState();
            App.Navigate("Navigate Challenge");

            App.ShouldSeeText("Page 1");
            App.ShouldHaveTitleContaining("Page 1");
            App.ShouldContainUrl(PjaxActions.Page1() + $"?ReturnUrl={HttpUtility.UrlEncode(PjaxActions.Page4())}");
            VerifyNavState();
        }
Exemple #6
0
        public void Redirect()
        {
            App.GoTo(PjaxActions.Page2());

            StoreNavState();
            App.Navigate("Navigate Redirect");

            App.ShouldSeeText("Page 1");
            App.ShouldHaveTitleContaining("Page 1");
            App.ShouldHaveUrl(PjaxActions.Page1());
            VerifyNavState();
        }
Exemple #7
0
        public void SubmitForm_Redraw()
        {
            App.GoTo(PjaxActions.Index());
            App.Navigate("Form");

            App.TypeText("postedValue", "posted");

            StoreNavState();
            App.Submit("go");

            App.ShouldSeeText("button=go");
            App.ShouldHaveTitleContaining("Form:posted");
            App.ShouldHaveUrl(PjaxActions.Form());
            VerifyNavState();
        }
Exemple #8
0
        public void SubmitForm_Redirect()
        {
            App.GoTo(PjaxActions.Form());

            App.TypeText("postedValue", "Success");

            StoreNavState();
            App.Submit("go");

            App.ShouldHaveTitleContaining("FormDone");
            App.ShouldHaveUrl(PjaxActions.FormDone());
            VerifyNavState();

            App.Back();

            App.ShouldSeeText("enter");
        }
Exemple #9
0
        public void Error()
        {
            App.GoTo(PjaxActions.Page2());

            App.Navigate("Navigate Error");

            App.ShouldSeeText("DeliberateError");

            if (JsDisabled())
            {
                // browser will have nagivated, and user can press back to get back to the previous page
                App.ShouldHaveUrl(PjaxActions.PageErr());
            }
            else
            {
                // error will have been caught by JS, displayed in a modal alert dialog, and the user can press back to close the dialog
                App.ShouldHaveUrl(PjaxActions.Page2());
            }
        }
Exemple #10
0
        public void BackAndForward()
        {
            App.GoTo(PjaxActions.Page1());
            App.Navigate("Navigate to 2");

            StoreNavState();
            App.Back();

            App.ShouldSeeText("Page 1");
            App.ShouldHaveTitleContaining("Page 1");
            App.ShouldHaveUrl(PjaxActions.Page1());
            VerifyNavState();

            StoreNavState();
            App.Forward();

            App.ShouldSeeText("Page 2");
            App.ShouldHaveTitleContaining("Page 2");
            App.ShouldHaveUrl(PjaxActions.Page2());
            VerifyNavState();
        }