[#79] Windows: Fix errors unconvered by E2E tests
All checks were successful
Test / Run tests (push) Successful in 2m12s

This commit is contained in:
2026-04-07 12:34:38 +02:00
parent 22fbb0772f
commit 7b78f9d6b9
3 changed files with 5 additions and 5 deletions

View File

@@ -155,7 +155,7 @@ namespace Elwig.Windows {
}
protected override async Task OnRenewContext(AppDbContext ctx) {
var season = await ctx.Seasons.Include(s => s.PaymentVariants).Where(s => s.Year == Year).SingleAsync();
var season = await ctx.Seasons.Include(s => s.PaymentVariants).Where(s => s.Year == Year).SingleOrDefaultAsync();
var l = new List<string> {
MemberDataSheet.Name
};

View File

@@ -388,10 +388,9 @@ namespace Elwig.Windows {
int areaComs = 0, deliveries = 0, credits = 0;
using (var ctx = new AppDbContext()) {
var l = await ctx.FetchMembers(m.MgNr).SingleAsync();
areaComs = l.AreaCommitments.Count;
deliveries = l.Deliveries.Count;
credits = l.Credits.Count;
areaComs = await ctx.AreaCommitments.Where(c => c.MgNr == m.MgNr).CountAsync();
deliveries = await ctx.Deliveries.Where(d => d.MgNr == m.MgNr).CountAsync();
credits = await ctx.Credits.Where(c => c.MgNr == m.MgNr).CountAsync();
}
var d = new DeleteMemberDialog(m.MgNr, m.AdministrativeName, areaComs, deliveries, credits);
if (d.ShowDialog() == true) {

View File

@@ -80,6 +80,7 @@ namespace Tests.E2ETests {
Window.FindElement(By.WpfId("SaveButton")).Click();
Thread.Sleep(500);
Window.FindElement(By.WpfId("SearchInput")).SendKeys("9999");
Thread.Sleep(500);
var memberListRow = Window.FindElement(By.WpfId("MemberList")).FindElement(By.ClassName("DataGridRow"));