Merge branch 'feat/ui-testing' into release/1.0.8-rc3

This commit is contained in:
Paul Schneider 2026-08-23 23:26:59 +01:00
commit bcd72e17d8
Signed by: notazof
GPG key ID: 1DD5D838E5343B06
342 changed files with 1058 additions and 1358 deletions

View file

@ -1,8 +1,6 @@
namespace Yavsc.Org;
using IdentityServer8.EntityFramework.Entities;
public static class Constants
{
// ApiScopes seeded explicitly by EnsureDefaultApplicationScopes.

View file

@ -20,7 +20,6 @@ using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Yavsc;
using Yavsc.Extensions;
using Yavsc.Interfaces;

View file

@ -1,4 +1,3 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;

View file

@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Yavsc.Abstract.Identity;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Server.Helpers;
using Yavsc.ViewModels;

View file

@ -1,4 +1,3 @@
using IdentityServer8.EntityFramework.DbContexts;
using IdentityServer8.EntityFramework.Entities;
using IdentityServer8.EntityFramework.Stores;
using Microsoft.AspNetCore.Authorization;

View file

@ -2,12 +2,10 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Yavsc.Models;
using Yavsc.Models.Calendar;
using Yavsc.Server.Models.EMailing;
using Microsoft.AspNetCore.Authorization;
using Yavsc.Server.Settings;
using Microsoft.EntityFrameworkCore;
using Yavsc.Helpers;
using Yavsc.Server.Models.Calendar;
using Yavsc.Server.Helpers;

View file

@ -1,11 +1,9 @@
using System.Threading.Tasks;
using Yavsc.ViewModels.Auth;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Yavsc.Models;
using Yavsc.Models.Messaging;
using Microsoft.Extensions.Localization;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Yavsc.Server.Helpers;

View file

@ -2,7 +2,6 @@
using System.Security.Claims;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Relationship;
using Yavsc.Server.Helpers;

View file

@ -3,7 +3,6 @@ using System.Security.Claims;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Relationship;
using Yavsc.Server.Helpers;

View file

@ -1,9 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Yavsc.Abstract.Models.Messaging;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Messaging;
using Yavsc.Server.Helpers;
namespace Yavsc.Controllers

View file

@ -8,15 +8,9 @@ using IdentityServer8.Services;
using IdentityServer8.Extensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System.Linq;
using System.Threading.Tasks;
using IdentityServer8.Validation;
using System.Collections.Generic;
using System;
using Yavsc;
using Yavsc.Extensions;
using Yavsc.Models;
namespace IdentityServerHost.Quickstart.UI
{

View file

@ -1,9 +1,6 @@
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using System.Collections.Generic;
namespace IdentityServerHost.Quickstart.UI
{
public class ConsentInputModel
@ -14,4 +11,4 @@ namespace IdentityServerHost.Quickstart.UI
public string ReturnUrl { get; set; }
public string Description { get; set; }
}
}
}

View file

@ -1,9 +1,6 @@
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using System.Collections.Generic;
namespace IdentityServerHost.Quickstart.UI
{
public class ConsentViewModel : ConsentInputModel

View file

@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Workflow;
using Yavsc.Server.Helpers;

View file

@ -11,7 +11,6 @@ namespace Yavsc.Controllers
using Yavsc.ViewModels.Workflow;
using Yavsc.Services;
using System.Threading.Tasks;
using Yavsc.Helpers;
using Microsoft.EntityFrameworkCore;
using Yavsc.Server.Helpers;

View file

@ -2,7 +2,6 @@ using System.Net.Mime;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Yavsc.Helpers;
namespace Yavsc.Controllers
{

View file

@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Forms;
using Yavsc.Server.Helpers;

View file

@ -4,7 +4,6 @@ namespace Yavsc.Controllers
{
using Models;
using Models.Musical;
using Yavsc.Helpers;
using Yavsc.Server.Helpers;
public class MusicalTendenciesController : Controller

View file

@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Billing;
using Yavsc.Server.Helpers;

View file

@ -2,10 +2,6 @@
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using IdentityServer8.Configuration;
using IdentityServer8.Events;
using IdentityServer8.Extensions;
@ -14,7 +10,6 @@ using IdentityServer8.Services;
using IdentityServer8.Validation;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Yavsc.Models;
using Yavsc.Models.Access;

View file

@ -2,8 +2,6 @@
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

View file

@ -5,7 +5,6 @@
using IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Text;
namespace Yavsc.Models

View file

@ -2,7 +2,6 @@ using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Messaging;
using Yavsc.Server.Helpers;

View file

@ -1,6 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Yavsc.Helpers;
using Yavsc.Server.Helpers;
namespace Yavsc.Controllers

View file

@ -5,9 +5,6 @@
using IdentityServer8.Services;
using IdentityServer8.Stores;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using IdentityServer8.Events;
using IdentityServer8.Extensions;

View file

@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Drawing;
using Yavsc.Server.Helpers;

View file

@ -2,7 +2,6 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Haircut;
using Yavsc.Server.Helpers;

View file

@ -1,7 +1,6 @@
// Yavsc.Controllers.Kyc/DeclarantController.cs
namespace Yavsc.Controllers.Kyc
{
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;

View file

@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Musical.Profiles;
using Yavsc.Server.Helpers;

View file

@ -1,12 +1,9 @@
using System.Linq;
using Microsoft.AspNetCore.Mvc;
namespace Yavsc.Controllers
{
using System.Security.Claims;
using Models;
using Models.Musical;
using Yavsc.Helpers;
using Yavsc.Server.Helpers;
public class InstrumentsController : Controller

View file

@ -1,6 +1,4 @@
using System;
using System.Globalization;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.ModelBinding;
namespace Yavsc
@ -37,7 +35,7 @@ namespace Yavsc
bindingContext.Result = ModelBindingResult.Success(actualValue);
}
else bindingContext.Result = ModelBindingResult.Failed();
}
}
}

View file

@ -169,10 +169,20 @@ public static class HostingExtensions
public static IdentityBuilder AddIdentityDBAndStores(this WebApplicationBuilder builder)
{
IServiceCollection services = builder.Services;
var connectionString = builder.Configuration.GetConnectionString(Constants.YavscConnectionStringName);
services.AddDbContext<ApplicationDbContext>(options =>
services.AddDbContext<ApplicationDbContext>((sp, options) =>
{
// Read the connection string at DbContext construction time
// rather than at AddDbContext registration time, so test
// fixtures (e.g. WebApplicationFactory<Program>) can
// override the value via the host's IConfiguration before
// any DbContext is built. Reading it eagerly at the top of
// this method would freeze whatever was in configuration
// when Program.Main ran — too early for the test host's
// ConfigureAppConfiguration / UseSetting hooks to apply.
var connectionString = sp.GetRequiredService<IConfiguration>()
.GetConnectionString(Constants.YavscConnectionStringName);
if (UsesInMemoryProvider(connectionString))
{
options.UseInMemoryDatabase(connectionString);
@ -317,9 +327,20 @@ public static class HostingExtensions
options.ClaimsIdentity.RoleClaimType = Constants.RoleClaimType;
});
var migrationsAssembly = typeof(Program).GetTypeInfo().Assembly.GetName().Name;
var connectionString = builder.Configuration.GetConnectionString(Constants.YavscConnectionStringName);
string sqliteConnectionString = $"Data Source={Path.Combine(Path.GetTempPath(), "yavsc_test.db")}";
// The IdentityServer8.EntityFramework ConfigurationStoreOptions
// and OperationalStoreOptions expose ConfigureDbContext as an
// Action<DbContextOptionsBuilder> with no service-provider
// access, so the connection string has to be captured here at
// registration time. For the production runtime this is fine:
// the connection string does not change after startup. For
// tests, this is the one knob we cannot push into the per-fixture
// config pipeline; the TestWebApplicationFactory bridge instead
// sets ConnectionStrings__YavscConnection as an environment
// variable, which AddEnvironmentVariables picks up as the last
// configuration provider in AddConfiguration. See
// Yavsc.Server/Helpers/ConfigHelpers.cs.
var connectionString = builder.Configuration.GetConnectionString(Constants.YavscConnectionStringName);
var identityServerBuilder = builder.Services.AddIdentityServer(options =>
{
@ -600,7 +621,13 @@ public static class HostingExtensions
private static bool UsesInMemoryProvider(string connectionString)
{
return string.Equals(connectionString, InMemoryProviderName, StringComparison.OrdinalIgnoreCase);
// Test fixtures may suffix the connection string with a
// per-fixture GUID (see InMemoryDatabaseName in
// Yavsc.Tests.Shared) to keep their in-memory stores
// isolated. The base name "InMemory" is still what
// identifies an in-memory provider — anything starting
// with it is one.
return connectionString.StartsWith(InMemoryProviderName, StringComparison.OrdinalIgnoreCase);
}
private static Action<DbContext, bool> EnsureDefaultApplicationScopes()

View file

@ -3,9 +3,7 @@
// paul schneider <paul@pschneider.fr> 19/06/2018 15:58 20182018 6 19
// */
using System.IO;
using System.Diagnostics;
using System.Threading.Tasks;
namespace Yavsc.Helpers
{

View file

@ -1,4 +1,3 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Yavsc.Abstract.Models.Messaging;

View file

@ -1,6 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc.Rendering;
using Yavsc.Models;
using Yavsc.Models.Workflow;

View file

@ -1,4 +1,3 @@
using System;
using System.Security.Cryptography;
namespace Yavsc.Helpers {

View file

@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.Extensions.Localization;
namespace Yavsc.Server.Helpers

View file

@ -1,7 +1,4 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;

View file

@ -1,5 +1,4 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View file

@ -1,5 +1,4 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View file

@ -1,5 +1,4 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View file

@ -1,5 +1,4 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable

View file

@ -1,5 +1,4 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable

View file

@ -1,5 +1,3 @@
using Anthropic.SDK;
using Yavsc.Abstract.Interfaces;
using Yavsc.Extensions;
using Yavsc.Server.Helpers;
@ -18,6 +16,6 @@ namespace Yavsc
app.Run();
}
}
}
}

View file

@ -2,7 +2,6 @@ using System.Diagnostics;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using Microsoft.EntityFrameworkCore;
using Yavsc;
using Yavsc.Blogspot;
using Yavsc.Models;
using Yavsc.Models.Blog;

View file

@ -1,13 +1,5 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Input;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Yavsc.Abstract.Chat;
using Yavsc.Models;
using Yavsc.ViewModels.Chat;

View file

@ -10,15 +10,9 @@ using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Emit;
using Yavsc.Models;
using Yavsc.Services;
using System.Reflection;
using Yavsc.Abstract.Templates;
using Microsoft.AspNetCore.Identity;
using RazorEngine.Configuration;
using Yavsc.Interface;
using Microsoft.Extensions.Logging;
using System.Diagnostics;
using RazorEngine.Compilation.ImpromptuInterface.Optimization;
using RazorEngine.Compilation.ImpromptuInterface;
namespace Yavsc.Lib
@ -30,7 +24,7 @@ namespace Yavsc.Lib
"Yavsc.Templates" ,
"Yavsc.Models",
"Yavsc.Models.Identity"};
readonly IStringLocalizer<YavscTemplateEngine> stringLocalizer;
readonly ApplicationDbContext dbContext;
@ -144,14 +138,14 @@ namespace Yavsc.Lib
var template = result.CallActLike<UserOrientedTemplate>(user);
return template.GeneratedText;
}
/* result.CallActLike<>
inMemoryAssembly.Seek(0, SeekOrigin.Begin);
Assembly assembly = Assembly.Load(inMemoryAssembly.ToArray());
// UserOrientedTemplate userOrientedTemplate = (UserOrientedTemplate)
// FIXME Activator.CreateInstance(Type.GetType(templateInfo.TemplateType));
foreach (var user in dbContext.ApplicationUser.Where(
u => u.AllowMonthlyEmail
))
@ -160,7 +154,7 @@ namespace Yavsc.Lib
userOrientedTemplate.Init();
userOrientedTemplate.User = user; */
throw new NotImplementedException();
}
}
}

View file

@ -1,7 +1,4 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Yavsc.Models;
using Yavsc.Services;
namespace Yavsc.ViewComponents

View file

@ -1,4 +1,3 @@
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;

View file

@ -1,9 +1,7 @@
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Localization;
using Yavsc.Models;
using Yavsc.Models.Blog;
namespace Yavsc.ViewComponents
{

View file

@ -1,7 +1,5 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Server.Helpers;
using Yavsc.ViewModels.UserFiles;

View file

@ -1,8 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Yavsc.Interfaces;
using Yavsc.Models;
namespace Yavsc.ViewComponents
{

View file

@ -1,4 +1,3 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace Yavsc.ViewModels.Account

View file

@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels
{

View file

@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels
{

View file

@ -1,7 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.Rendering;
using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Gen
{

View file

@ -1,4 +1,3 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace Yavsc.ViewModels.Manage

View file

@ -1,4 +1,3 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Identity;
namespace Yavsc.ViewModels.Manage

View file

@ -1,4 +1,3 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Identity;
namespace Yavsc.ViewModels.Manage

View file

@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Manage
{

View file

@ -54,4 +54,4 @@
<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" />
</ItemGroup>
</Project>
</Project>