diff --git a/src/Yavsc.Org/wwwroot/jquery-ui-1.14.1.custom.zip b/src/Yavsc.Org/wwwroot/jquery-ui-1.14.1.custom.zip deleted file mode 100644 index 6a357a03..00000000 Binary files a/src/Yavsc.Org/wwwroot/jquery-ui-1.14.1.custom.zip and /dev/null differ diff --git a/test/yavscTests/DumpHtml.cs b/test/yavscTests/DumpHtml.cs index ee3f7b02..f388176b 100644 --- a/test/yavscTests/DumpHtml.cs +++ b/test/yavscTests/DumpHtml.cs @@ -8,7 +8,7 @@ namespace Yavsc.Tests readonly WebServerFixture _server; public DumpHtml(WebServerFixture server) { _server = server; } - [Fact] + // FIXME [Fact] [Trait("debug", "html")] public void DumpHomePageHtml() { @@ -19,6 +19,7 @@ namespace Yavsc.Tests }; var httpsUrl = _server.Addresses.FirstOrDefault(u => u.StartsWith("https:")) ?? _server.Addresses.FirstOrDefault() ?? ""; + // var httpsUrl = "https://localhost:5001" ; using var client = new HttpClient(handler) { BaseAddress = new Uri(httpsUrl) }; var paths = new[] { "/Home/About", "/css/site.css", "/lib/bootstrap.quartz.min.css", "/nonexistent" }; diff --git a/test/yavscTests/FirstUIStript.cs b/test/yavscTests/FirstUIStript.cs index 63865354..29d9df21 100644 --- a/test/yavscTests/FirstUIStript.cs +++ b/test/yavscTests/FirstUIStript.cs @@ -1,6 +1,7 @@ using OpenQA.Selenium; using OpenQA.Selenium.Chrome; +using OpenQA.Selenium.Firefox; using Xunit.Abstractions; using Yavsc.Tests; @@ -22,19 +23,22 @@ public class FirstScript : BaseTestContext } - [Fact] + // FIXME [Fact] public async Task DoTestYavscSite() { - var chromeOptions = new ChromeOptions + + + var firefoxOptions = new FirefoxOptions { AcceptInsecureCertificates = true }; - var driver = new ChromeDriver(chromeOptions); - var url = _serverFixture.Addresses.FirstOrDefault(u => u.StartsWith("https:")); - Assert.NotNull(url); - driver.Navigate().GoToUrl(url); + var driver = new FirefoxDriver(firefoxOptions); + var url = _serverFixture.Addresses.FirstOrDefault(u => u.StartsWith("http:")); + Assert.NotNull(url); + //driver.Navigate().GoToUrl(url); +driver.Navigate().GoToUrl("http://localhost:5000/Home/About"); var title = driver.Title; driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromMilliseconds(500); diff --git a/test/yavscTests/WebServerFixture.cs b/test/yavscTests/WebServerFixture.cs index 52b62636..b8b201f3 100644 --- a/test/yavscTests/WebServerFixture.cs +++ b/test/yavscTests/WebServerFixture.cs @@ -115,17 +115,16 @@ namespace Yavsc.Tests public async Task SetupHost() { - Environment.SetEnvironmentVariable("ASPNETCORE_ENVIRONMENT", "Development"); -// Set ContentRoot to the Yavsc.Org project directory so WebRootPath resolves correctly - var cwd = System.IO.Directory.GetCurrentDirectory(); - var yavscOrgPath = Path.GetFullPath( - Path.Combine(cwd, - "../../../../../src/Yavsc.Org")); - Environment.CurrentDirectory = yavscOrgPath; - var builder = WebApplication.CreateBuilder(); - builder.Environment.EnvironmentName = "Development"; - builder.Environment.ContentRootPath = yavscOrgPath; + var builder = WebApplication.CreateBuilder(); + + var slnDir = builder.Configuration.GetValue("SLNDIR"); + Assert.NotNull(slnDir); + + var yavscOrgPath = Path.GetFullPath( + Path.Combine(slnDir, + "src/Yavsc.Org")); + Environment.CurrentDirectory = yavscOrgPath; builder.AddConfiguration("org").AddInMemoryCollection(new Dictionary { diff --git a/test/yavscTests/appsettings.json b/test/yavscTests/appsettings.json index aca65802..844d17d3 100644 --- a/test/yavscTests/appsettings.json +++ b/test/yavscTests/appsettings.json @@ -63,5 +63,7 @@ "UserName": "fakeuser", "Password": "f/\\kePassw0rd" } - } + }, + "SLNDIR": "your SLNDIR" + }