Exemple #1
0
        public bool RunAllSpecs()
        {
            var title = "Running Jasmine specs for project at " + _input.SerenityFile;

            Console.WriteLine(title);
            var line = "".PadRight(title.Length, '-');

            Console.WriteLine(line);

            buildApplication();
            var returnValue = true;

            _host = new FubuOwinHost(_application);
            _host.RunApplication(_input.PortFlag, runtime =>
            {
                _driver.NavigateTo <JasminePages>(x => x.AllSpecs());

                var browser  = _applicationUnderTest.Driver;
                var failures = browser.FindElements(By.CssSelector("div.suite.failed"));


                if (failures.Any())
                {
                    returnValue = false;

                    Console.WriteLine(line);
                    writeFailures(failures);
                }

                Console.WriteLine();
                Console.WriteLine(line);
                writeTotals(browser);

                _host.Stop();

                browser.Quit();
            });


            return(returnValue);
        }
Exemple #2
0
 public void OpenPage(string url)
 {
     _application.NavigateTo(url);
 }
        public void LoadPageWithScripts(string[] scriptNames)
        {
            var url = "http://localhost/fubu-testing/scriptloading/" + scriptNames.Join(",");

            _application.NavigateTo(url);
        }