Sito di prova: /benvenuto, la «pagina di accesso» che Febe apre, esiste
Il Collegamento di Febe, con il sito di prova, apre /benvenuto come pagina di accesso, ma il sito rispondeva «Pagina non trovata»: la sessione si apriva lo stesso (il cookie arriva con ogni pagina), però chi prova vedeva un errore. Ora è una pagina di solo testo che dice di tornare a Febe e premere «Ho finito»; nessun modulo, nessuna password. Una prova senza browser lo controlla, con qualunque seme. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d9da3b07cb
commit
5f968c69d9
4 files changed
+29
No files matched your search
@@ -138,6 +138,23 @@ public sealed partial class SyntheticSiteSeedTests
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Timeout(30_000, CooperativeCancellation = true)]
|
||||
public async Task TheLoginAddressOfTheTestSiteIsAWelcomePageThatOpensTheSession()
|
||||
{
|
||||
// Febe opens /benvenuto as the «pagina di accesso» of the test site (LoginUrl of DesktopOptions and ServerOptions).
|
||||
await using var site = await SyntheticSite.StartAsync();
|
||||
using var client = new HttpClient(new SocketsHttpHandler { UseProxy = false, UseCookies = false });
|
||||
using var response = await client.GetAsync(new Uri(site.Url("/benvenuto")), TestContext.CancellationToken);
|
||||
Assert.AreEqual(System.Net.HttpStatusCode.OK, response.StatusCode);
|
||||
var html = await response.Content.ReadAsStringAsync(TestContext.CancellationToken);
|
||||
StringAssert.Contains(html, "Ho finito");
|
||||
Assert.DoesNotContain("<form", html, "No login form: the test site never asks for a password.");
|
||||
Assert.IsTrue(
|
||||
response.Headers.TryGetValues("Set-Cookie", out var cookies) && cookies.Any(c => c.StartsWith(TestSite.SessionCookie + "=", StringComparison.Ordinal)),
|
||||
"The visit opens the session of the site.");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Timeout(60_000, CooperativeCancellation = true)]
|
||||
public async Task TheReadersReadWhatTheSiteServesWithTheSeedOfThisRun()
|
||||
|
||||
Reference in new issue
Block a user