Drop Selenium-based UI tests
Selenium-driven UI tests don't run reliably on Linux; the UI tests in FirstUIStript.cs were flaky and time-consuming without catching real regressions. The maintained UI going forward is PostIt, which is tested via its own PostIt.Tests project. Removed: - src/Yavsc.Org.Tests/FirstUIStript.cs (the Selenium-based FirstScript class) - Selenium.WebDriver PackageReference from Yavsc.Org.Tests.csproj - Selenium.WebDriver version from src/Yavsc.Org.Tests/Directory.Packages.props WebServerFixture, BaseTestContext, and the integration tests that depend on them (Remoting, Services, EMailling, etc.) are unaffected.
This commit is contained in:
parent
002f8cc7e4
commit
bd75e73b74
3 changed files with 0 additions and 78 deletions
|
|
@ -8,7 +8,6 @@
|
|||
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="10.0.9" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.9" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="10.0.9" />
|
||||
<PackageVersion Include="Selenium.WebDriver" Version="4.45.0" />
|
||||
<PackageVersion Include="xunit.v3.common" Version="3.2.2" />
|
||||
<PackageVersion Include="xunit.v3.extensibility.core" Version="3.2.2" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,76 +0,0 @@
|
|||
|
||||
/* Buggy
|
||||
using OpenQA.Selenium;
|
||||
using OpenQA.Selenium.Chrome;
|
||||
using OpenQA.Selenium.Firefox;
|
||||
|
||||
namespace yavscTests.ServerFixtures;
|
||||
|
||||
[Collection("Yavsc Server")]
|
||||
|
||||
public class FirstScript : BaseTestContext
|
||||
{
|
||||
|
||||
public readonly WebServerFixture _serverFixture;
|
||||
readonly ITestOutputHelper _output;
|
||||
|
||||
IWebDriver driver = new ChromeDriver();
|
||||
public FirstScript(ITestOutputHelper output, WebServerFixture fixture) : base(output, fixture)
|
||||
{
|
||||
_serverFixture = fixture;
|
||||
this._output = output;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DoTestSeleniumWebSite()
|
||||
{
|
||||
var firefoxOptions = new ChromeOptions();
|
||||
firefoxOptions.AcceptInsecureCertificates = true;
|
||||
firefoxOptions.AddArgument("--headless=new");
|
||||
var driver = new ChromeDriver(firefoxOptions);
|
||||
|
||||
driver.Navigate()
|
||||
.GoToUrl(_serverFixture.Addresses.FirstOrDefault(u => u.StartsWith("http:")));
|
||||
|
||||
driver.Quit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// FIXME [Fact]
|
||||
public async Task DoTestYavscSite()
|
||||
{
|
||||
|
||||
|
||||
var firefoxOptions = new FirefoxOptions
|
||||
{
|
||||
AcceptInsecureCertificates = true
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
var navbar = driver.FindElement(By.Id("navbar"));
|
||||
Assert.NotNull(navbar);
|
||||
*//*
|
||||
var textBox = driver.FindElement(By.Name("my-text"));
|
||||
var submitButton = driver.FindElement(By.TagName("button"));
|
||||
|
||||
textBox.SendKeys("Selenium");
|
||||
submitButton.Click();
|
||||
|
||||
var message = driver.FindElement(By.Id("message"));
|
||||
var value = message.Text;
|
||||
*//*
|
||||
driver.Quit();
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
|
@ -17,7 +17,6 @@
|
|||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||
<PackageReference Include="IdentityModel.OidcClient" />
|
||||
<PackageReference Include="Selenium.WebDriver" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Hosting" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue