Mediascherm: vaste hoogte van de bulkbalk, hele tegel selecteert, kleinere tegels, 0 dagen bij opruimen
Continuous Integration / config-sls (pull_request) Successful in 9s
Continuous Integration / config-asf (pull_request) Successful in 7s
Continuous Integration / changes (pull_request) Successful in 20s
Continuous Integration / frontend-prepare (pull_request) Successful in 30s
Continuous Integration / backend-build (pull_request) Successful in 1m40s
Continuous Integration / vulnerability-scan (pull_request) Successful in 1m48s
Continuous Integration / frontend-build (pull_request) Successful in 56s
Continuous Integration / frontend-test (pull_request) Successful in 2m48s
Continuous Integration / frontend-lint (pull_request) Successful in 42s
Continuous Integration / backend-test (pull_request) Successful in 4m37s
Continuous Integration / publish-sls-test (pull_request) Skipped
Continuous Integration / publish-sls-production (pull_request) Skipped
Continuous Integration / deploy-sls-test (pull_request) Skipped
Continuous Integration / deploy-sls-production (pull_request) Skipped
Continuous Integration / publish-asf-test (pull_request) Skipped
Continuous Integration / deploy-asf-test (pull_request) Skipped
Continuous Integration / smoke-sls-test (pull_request) Skipped
Continuous Integration / smoke-asf-test (pull_request) Skipped
Continuous Integration / compile-sites (pull_request) Successful in 10m43s
Continuous Integration / config-sls (pull_request) Successful in 9s
Continuous Integration / config-asf (pull_request) Successful in 7s
Continuous Integration / changes (pull_request) Successful in 20s
Continuous Integration / frontend-prepare (pull_request) Successful in 30s
Continuous Integration / backend-build (pull_request) Successful in 1m40s
Continuous Integration / vulnerability-scan (pull_request) Successful in 1m48s
Continuous Integration / frontend-build (pull_request) Successful in 56s
Continuous Integration / frontend-test (pull_request) Successful in 2m48s
Continuous Integration / frontend-lint (pull_request) Successful in 42s
Continuous Integration / backend-test (pull_request) Successful in 4m37s
Continuous Integration / publish-sls-test (pull_request) Skipped
Continuous Integration / publish-sls-production (pull_request) Skipped
Continuous Integration / deploy-sls-test (pull_request) Skipped
Continuous Integration / deploy-sls-production (pull_request) Skipped
Continuous Integration / publish-asf-test (pull_request) Skipped
Continuous Integration / deploy-asf-test (pull_request) Skipped
Continuous Integration / smoke-sls-test (pull_request) Skipped
Continuous Integration / smoke-asf-test (pull_request) Skipped
Continuous Integration / compile-sites (pull_request) Successful in 10m43s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,13 +45,23 @@ public class MediaLibraryTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(-5, 1)]
|
||||
[InlineData(0, 1)]
|
||||
[InlineData(-5, 0)]
|
||||
[InlineData(0, 0)]
|
||||
[InlineData(1, 1)]
|
||||
[InlineData(7, 7)]
|
||||
[InlineData(365, 365)]
|
||||
[InlineData(4000, 365)]
|
||||
public void The_period_stays_inside_the_slider_range(int days, int expected) => CleanupSelection.ClampDays(days).Should().Be(expected);
|
||||
|
||||
[Fact]
|
||||
public void Zero_days_selects_every_unused_photo_at_once_and_keeps_those_in_use_out_unless_asked()
|
||||
{
|
||||
var used = Item(0, used: true);
|
||||
var unused = Item(0);
|
||||
|
||||
CleanupSelection.Select([used, unused], Now.AddMinutes(1), 0, onlyUnused: true).Should().ContainSingle().Which.Should().Be(unused);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void A_photo_exactly_at_the_boundary_is_not_selected_yet()
|
||||
{
|
||||
|
||||
@@ -8,7 +8,8 @@ namespace SlpModularCms.Core.Media.Library;
|
||||
public static class CleanupSelection
|
||||
{
|
||||
public const int DefaultDays = 7;
|
||||
public const int MinDays = 1;
|
||||
/// <summary>0 means: every photo that is not in use qualifies at the next clean-up (Bryan, 2026-11-17).</summary>
|
||||
public const int MinDays = 0;
|
||||
public const int MaxDays = 365;
|
||||
|
||||
/// <summary>The days kept inside the slider range.</summary>
|
||||
|
||||
Reference in New Issue
Block a user