Пример #1
0
        internal void OnLoadCompleteInternal()
        {
            // Only auto-select or auto-run on the first request
            if (!_aspNetService.GetIsPostBack(this))
            {
                // Get query string values
                QueryStringParameters queryParams = new QueryStringParameters();
                queryParams.LoadFromQueryString(_aspNetService.GetQueryString(this));

                BrowserVersions browser = BrowserUtility.GetBrowser(_aspNetService.GetBrowserName(this), _aspNetService.GetBrowserMajorVersion(this));

                LogDetail = queryParams.LogDetail;
                this.WriteLogToDiskCheckBox.Checked = queryParams.WriteLog;
                this.ShowConsoleCheckBox.Checked    = queryParams.ShowConsole;

                // Auto-select tests with a given tag
                if (!String.IsNullOrEmpty(queryParams.Tag))
                {
                    _testcaseManager.SelectTaggedTests(this.TestCasesTreeView, queryParams.Tag, browser);
                }
                else if (queryParams.Run)
                {
                    _testcaseManager.SelectAllTests(this.TestCasesTreeView, browser);
                }

                // Optionally remove unselected tests
                if (queryParams.Filter)
                {
                    _testcaseManager.FilterIgnoredTests(this.TestCasesTreeView);
                }

                // Auto-run the selected tests (or all tests if none are selected)
                if (queryParams.Run)
                {
                    RunTestCases();
                }
            }

            // Change UI depending if showing console or not.
            if (this.ShowConsoleCheckBox.Checked)
            {
                this.TestsPanel.CssClass = "tests";
                this.FooterPanel.Visible = true;
            }
            else
            {
                this.TestsPanel.CssClass = "testsNoConsole";
                this.FooterPanel.Visible = false;
            }
        }
Пример #2
0
 public void GetBrowserSafariFutureVersion()
 {
     UnitTestAssert.AreEqual(BrowserVersions.Safari, BrowserUtility.GetBrowser("applemac-safari", 10));
 }
Пример #3
0
 public void GetBrowserSafariMac3Mac()
 {
     UnitTestAssert.AreEqual(BrowserVersions.Safari3Mac, BrowserUtility.GetBrowser("applemac-safari", 3));
 }
Пример #4
0
 public void GetBrowserSafariMac3Windows()
 {
     UnitTestAssert.AreEqual(BrowserVersions.Safari3Windows, BrowserUtility.GetBrowser("applemac-safari", 5));
 }
Пример #5
0
 public void GetBrowserOpera10()
 {
     UnitTestAssert.AreEqual(BrowserVersions.Opera10, BrowserUtility.GetBrowser("Opera", 10));
 }
Пример #6
0
 public void GetBrowserOperaFutureVersion()
 {
     UnitTestAssert.AreEqual(BrowserVersions.Opera, BrowserUtility.GetBrowser("Opera", 5));
 }
Пример #7
0
 public void GetBrowserFireFox3()
 {
     UnitTestAssert.AreEqual(BrowserVersions.Firefox3, BrowserUtility.GetBrowser("FireFox", 3));
 }
Пример #8
0
 public void GetBrowserFireFoxFutureVersion()
 {
     UnitTestAssert.AreEqual(BrowserVersions.Firefox, BrowserUtility.GetBrowser("FireFox", 5));
 }
Пример #9
0
 public void GetBrowserIEFutureVersion()
 {
     UnitTestAssert.AreEqual(BrowserVersions.InternetExplorer, BrowserUtility.GetBrowser("IE", 9));
 }
Пример #10
0
 public void GetBrowserIE8()
 {
     UnitTestAssert.AreEqual(BrowserVersions.InternetExplorer8, BrowserUtility.GetBrowser("IE", 8));
 }
Пример #11
0
 public void GetBrowserUnknown()
 {
     UnitTestAssert.AreEqual(BrowserVersions.Unknown, BrowserUtility.GetBrowser("foo", 123));
 }
Пример #12
0
 public void GetBrowserChrome()
 {
     UnitTestAssert.AreEqual(BrowserVersions.Chrome, BrowserUtility.GetBrowser("chrome", 2));
 }
Пример #13
0
 public void GetBrowserSafari_AspNet4()
 {
     UnitTestAssert.AreEqual(BrowserVersions.Safari, BrowserUtility.GetBrowser("safari", 10));
 }