/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Components/test/E2ETest/Tests/HostedInAlternativeBasePathTest.cs
43 строки
1 KB
Alexander Köplinger
Upgrade xunit version to 2.9.0 (#57303)
23 авг 2024, 20:27
Не верифицирован
23 авг 2024, 20:27
9209724
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.AspNetCore.Components.E2ETest.Infrastructure; using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; using Microsoft.AspNetCore.E2ETesting; using OpenQA.Selenium; using Xunit.Abstractions; namespace Microsoft.AspNetCore.Components.E2ETest.Tests; public class HostedInAlternativeBasePathTest : ServerTestBase<AspNetSiteServerFixture> { public HostedInAlternativeBasePathTest( BrowserFixture browserFixture, AspNetSiteServerFixture serverFixture, ITestOutputHelper output) : base(browserFixture, serverFixture, output) { serverFixture.AdditionalArguments.AddRange(new[] { "--UseAlternativeBasePath", "true" }); serverFixture.BuildWebHostMethod = HostedInAspNet.Server.Program.BuildWebHost; serverFixture.Environment = AspNetEnvironment.Development; } protected override void InitializeAsyncCore() { Navigate("/app/"); WaitUntilLoaded(); } [Fact] public void CanLoadBlazorAppFromSubPath() { Assert.Equal("App loaded on custom path", Browser.Title); Assert.Empty(Browser.GetBrowserLogs(LogLevel.Severe)); } private void WaitUntilLoaded() { var app = Browser.Exists(By.TagName("app")); Browser.NotEqual("Loading...", () => app.Text); } }