diff --git a/backend/Squidex.sln b/backend/Squidex.sln index eeb79d405..2d9c70050 100644 --- a/backend/Squidex.sln +++ b/backend/Squidex.sln @@ -22,8 +22,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Shared", "src\Squid EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Users", "src\Squidex.Domain.Users\Squidex.Domain.Users.csproj", "{F7771E22-47BD-45C4-A133-FD7F1DE27CA0}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Users.MongoDb", "src\Squidex.Domain.Users.MongoDb\Squidex.Domain.Users.MongoDb.csproj", "{27CF800D-890F-4882-BF05-44EC3233537D}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Users.Tests", "tests\Squidex.Domain.Users.Tests\Squidex.Domain.Users.Tests.csproj", "{42184546-E3CB-4D4F-9495-43979B9C63B9}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{360C300D-0F7E-439D-A437-714C959E3CAD}" @@ -54,9 +52,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Migrations", "src\Migration EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "data", "data", "{3378B841-53F8-48CC-87C1-1B30CF912BFD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Squidex.Data.MongoDb", "src\Squidex.Data.MongoDb\Squidex.Data.MongoDb.csproj", "{F754F05E-02FF-47B2-AB46-BB05C7E6B29D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Data.MongoDb", "src\Squidex.Data.MongoDb\Squidex.Data.MongoDb.csproj", "{F754F05E-02FF-47B2-AB46-BB05C7E6B29D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Squidex.Data.Tests", "tests\Squidex.Data.Tests\Squidex.Data.Tests.csproj", "{AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Data.Tests", "tests\Squidex.Data.Tests\Squidex.Data.Tests.csproj", "{AA2F3C32-E3C8-4DF3-A365-F25C7EC19BCD}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -132,18 +130,6 @@ Global {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Release|x64.Build.0 = Release|Any CPU {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Release|x86.ActiveCfg = Release|Any CPU {F7771E22-47BD-45C4-A133-FD7F1DE27CA0}.Release|x86.Build.0 = Release|Any CPU - {27CF800D-890F-4882-BF05-44EC3233537D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {27CF800D-890F-4882-BF05-44EC3233537D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {27CF800D-890F-4882-BF05-44EC3233537D}.Debug|x64.ActiveCfg = Debug|Any CPU - {27CF800D-890F-4882-BF05-44EC3233537D}.Debug|x64.Build.0 = Debug|Any CPU - {27CF800D-890F-4882-BF05-44EC3233537D}.Debug|x86.ActiveCfg = Debug|Any CPU - {27CF800D-890F-4882-BF05-44EC3233537D}.Debug|x86.Build.0 = Debug|Any CPU - {27CF800D-890F-4882-BF05-44EC3233537D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {27CF800D-890F-4882-BF05-44EC3233537D}.Release|Any CPU.Build.0 = Release|Any CPU - {27CF800D-890F-4882-BF05-44EC3233537D}.Release|x64.ActiveCfg = Release|Any CPU - {27CF800D-890F-4882-BF05-44EC3233537D}.Release|x64.Build.0 = Release|Any CPU - {27CF800D-890F-4882-BF05-44EC3233537D}.Release|x86.ActiveCfg = Release|Any CPU - {27CF800D-890F-4882-BF05-44EC3233537D}.Release|x86.Build.0 = Release|Any CPU {42184546-E3CB-4D4F-9495-43979B9C63B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {42184546-E3CB-4D4F-9495-43979B9C63B9}.Debug|Any CPU.Build.0 = Debug|Any CPU {42184546-E3CB-4D4F-9495-43979B9C63B9}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -287,7 +273,6 @@ Global {FD0AFD44-7A93-4F9E-B5ED-72582392E435} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A} {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A} {F7771E22-47BD-45C4-A133-FD7F1DE27CA0} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A} - {27CF800D-890F-4882-BF05-44EC3233537D} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A} {42184546-E3CB-4D4F-9495-43979B9C63B9} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A} {F0A83301-50A5-40EA-A1A2-07C7858F5A3F} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A} {6B3F75B6-5888-468E-BA4F-4FC725DAEF31} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A} diff --git a/backend/src/Squidex.Data.MongoDb/Squidex.Data.MongoDb.csproj b/backend/src/Squidex.Data.MongoDb/Squidex.Data.MongoDb.csproj index 0f54de38c..06bf6d509 100644 --- a/backend/src/Squidex.Data.MongoDb/Squidex.Data.MongoDb.csproj +++ b/backend/src/Squidex.Data.MongoDb/Squidex.Data.MongoDb.csproj @@ -25,11 +25,11 @@ - - - - - + + + + + diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj b/backend/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj index f29d8c396..71c4d400b 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Squidex.Domain.Apps.Core.Operations.csproj @@ -28,8 +28,8 @@ - - + + diff --git a/backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj b/backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj index 94201db90..94bfb3109 100644 --- a/backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj +++ b/backend/src/Squidex.Infrastructure/Squidex.Infrastructure.csproj @@ -24,13 +24,13 @@ - - - - - - - + + + + + + + diff --git a/backend/src/Squidex/Config/Domain/SerializationServices.cs b/backend/src/Squidex/Config/Domain/SerializationServices.cs index 680e89561..dd6b7b294 100644 --- a/backend/src/Squidex/Config/Domain/SerializationServices.cs +++ b/backend/src/Squidex/Config/Domain/SerializationServices.cs @@ -26,6 +26,7 @@ using Squidex.Domain.Apps.Core.Rules.Json; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Core.Schemas.Json; using Squidex.Domain.Apps.Events; +using Squidex.Events.Utils; using Squidex.Infrastructure; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.EventSourcing; @@ -48,6 +49,7 @@ public static class SerializationServices options.Converters.Add(new StringConverter(x => x)); options.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb); + options.Converters.Add(new HeaderValueConverter()); options.Converters.Add(new GeoJsonConverterFactory()); options.Converters.Add(new PolymorphicConverter(typeRegistry)); options.Converters.Add(new PolymorphicConverter(typeRegistry)); diff --git a/backend/src/Squidex/Squidex.csproj b/backend/src/Squidex/Squidex.csproj index 7f5de61af..7f29af7d5 100644 --- a/backend/src/Squidex/Squidex.csproj +++ b/backend/src/Squidex/Squidex.csproj @@ -61,20 +61,18 @@ - - - - - - - - + + + + + + + - - - - - + + + + diff --git a/backend/tests/Squidex.Data.Tests/MongoDb/Infrastructure/MongoQueryTests.cs b/backend/tests/Squidex.Data.Tests/MongoDb/Infrastructure/MongoQueryTests.cs index 9446eff64..0dd5c25c8 100644 --- a/backend/tests/Squidex.Data.Tests/MongoDb/Infrastructure/MongoQueryTests.cs +++ b/backend/tests/Squidex.Data.Tests/MongoDb/Infrastructure/MongoQueryTests.cs @@ -11,7 +11,6 @@ using NodaTime; using NodaTime.Text; using Squidex.Infrastructure; using Squidex.Infrastructure.Queries; -using Squidex.Infrastructure.TestHelpers; using Squidex.TestHelpers; using ClrFilter = Squidex.Infrastructure.Queries.ClrFilter; @@ -19,7 +18,7 @@ namespace Squidex.MongoDb.Infrastructure; public class MongoQueryTests { - private sealed class TestEntity + public sealed class TestEntity { public DomainId Id { get; set; } diff --git a/backend/tests/Squidex.Data.Tests/Squidex.Data.Tests.csproj b/backend/tests/Squidex.Data.Tests/Squidex.Data.Tests.csproj index 9ca50db1c..368256d81 100644 --- a/backend/tests/Squidex.Data.Tests/Squidex.Data.Tests.csproj +++ b/backend/tests/Squidex.Data.Tests/Squidex.Data.Tests.csproj @@ -17,7 +17,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj b/backend/tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj index 95d1e750e..0d66a5ecc 100644 --- a/backend/tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj +++ b/backend/tests/Squidex.Domain.Apps.Core.Tests/Squidex.Domain.Apps.Core.Tests.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/tests/Squidex.Domain.Apps.Core.Tests/TestHelpers/TestUtils.cs b/backend/tests/Squidex.Domain.Apps.Core.Tests/TestHelpers/TestUtils.cs index 627711ba1..54c949388 100644 --- a/backend/tests/Squidex.Domain.Apps.Core.Tests/TestHelpers/TestUtils.cs +++ b/backend/tests/Squidex.Domain.Apps.Core.Tests/TestHelpers/TestUtils.cs @@ -23,6 +23,7 @@ using Squidex.Domain.Apps.Core.Rules.Json; using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Core.Schemas.Json; using Squidex.Domain.Apps.Events; +using Squidex.Events.Utils; using Squidex.Infrastructure; using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.EventSourcing; @@ -80,13 +81,23 @@ public static class TestUtils options.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb); options.Converters.Add(new GeoJsonConverterFactory()); - options.Converters.Add(new PolymorphicConverter(TypeRegistry)); + options.Converters.Add(new HeaderValueConverter()); + options.Converters.Add(new JsonValueConverter()); options.Converters.Add(new PolymorphicConverter(TypeRegistry)); + options.Converters.Add(new PolymorphicConverter(TypeRegistry)); options.Converters.Add(new PolymorphicConverter(TypeRegistry)); options.Converters.Add(new PolymorphicConverter(TypeRegistry)); - options.Converters.Add(new JsonValueConverter()); options.Converters.Add(new ReadonlyDictionaryConverterFactory()); options.Converters.Add(new ReadonlyListConverterFactory()); + options.Converters.Add(new StringConverter()); + options.Converters.Add(new StringConverter()); + options.Converters.Add(new StringConverter()); + options.Converters.Add(new StringConverter>()); + options.Converters.Add(new StringConverter>()); + options.Converters.Add(new StringConverter>()); + options.Converters.Add(new StringConverter>()); + options.Converters.Add(new StringConverter()); + options.Converters.Add(new StringConverter()); options.Converters.Add(new SurrogateJsonConverter()); options.Converters.Add(new SurrogateJsonConverter, FieldsSurrogate>()); options.Converters.Add(new SurrogateJsonConverter, JsonFilterSurrogate>()); @@ -97,15 +108,6 @@ public static class TestUtils options.Converters.Add(new SurrogateJsonConverter()); options.Converters.Add(new SurrogateJsonConverter()); options.Converters.Add(new SurrogateJsonConverter()); - options.Converters.Add(new StringConverter()); - options.Converters.Add(new StringConverter()); - options.Converters.Add(new StringConverter>()); - options.Converters.Add(new StringConverter>()); - options.Converters.Add(new StringConverter>()); - options.Converters.Add(new StringConverter>()); - options.Converters.Add(new StringConverter()); - options.Converters.Add(new StringConverter()); - options.Converters.Add(new StringConverter()); options.Converters.Add(new JsonStringEnumConverter()); options.IncludeFields = true; options.TypeInfoResolver = new DefaultJsonTypeInfoResolver() diff --git a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLTestBase.cs b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLTestBase.cs index efe82fab2..85047695d 100644 --- a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLTestBase.cs +++ b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Contents/GraphQL/GraphQLTestBase.cs @@ -118,6 +118,7 @@ public abstract class GraphQLTestBase : IClassFixture var serviceProvider = new ServiceCollection() + .AddSingleton(TimeProvider.System) .AddLogging(options => { options.AddDebug(); diff --git a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj index 6388cc096..fd9e0e3e7 100644 --- a/backend/tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj +++ b/backend/tests/Squidex.Domain.Apps.Entities.Tests/Squidex.Domain.Apps.Entities.Tests.csproj @@ -21,7 +21,7 @@ - + diff --git a/backend/tests/Squidex.Domain.Apps.Entities.Tests/TestHelpers/VerifySettings.cs b/backend/tests/Squidex.Domain.Apps.Entities.Tests/TestHelpers/VerifySettings.cs index 31b95e48b..ebf57fb01 100644 --- a/backend/tests/Squidex.Domain.Apps.Entities.Tests/TestHelpers/VerifySettings.cs +++ b/backend/tests/Squidex.Domain.Apps.Entities.Tests/TestHelpers/VerifySettings.cs @@ -9,6 +9,7 @@ using System.Runtime.CompilerServices; using Argon; using NodaTime; using NodaTime.Text; +using Squidex.Events; using Squidex.Infrastructure; using Squidex.Infrastructure.Json.Objects; @@ -47,6 +48,28 @@ public static partial class VerifySettings } } + private sealed class HeaderValueConverter : WriteOnlyJsonConverter + { + public override void Write(VerifyJsonWriter writer, HeaderValue value) + { + switch (value.Value) + { + case string s: + writer.WriteValue(s); + break; + case double n: + writer.WriteValue(n); + break; + case bool b: + writer.WriteValue(b); + break; + case null: + writer.WriteNull(); + break; + } + } + } + private sealed class JsonValueConverter : WriteOnlyJsonConverter { public override void Write(VerifyJsonWriter writer, JsonValue value) @@ -128,15 +151,22 @@ public static partial class VerifySettings VerifierSettings.AddExtraSettings(s => { + s.Converters.Add(new HeaderValueConverter()); s.Converters.Add(new JsonArrayConverter()); s.Converters.Add(new JsonObjectConverter()); s.Converters.Add(new JsonValueConverter()); s.ContractResolver = new ContractResolver(s.ContractResolver!); }); + static bool IsDateTime(object? value) + { + return value is string s && InstantPattern.ExtendedIso.Parse(s).Success; + } + VerifierSettings.ScrubInlineGuids(); VerifierSettings.IgnoreMembersWithType(); - VerifierSettings.IgnoreInstance(x => x.Type == JsonValueType.String && InstantPattern.ExtendedIso.Parse(x.ToString()).Success); + VerifierSettings.IgnoreInstance(x => IsDateTime(x.Value)); + VerifierSettings.IgnoreInstance(x => IsDateTime(x.Value)); VerifierSettings.IgnoreMember("Secret"); } } diff --git a/backend/tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj b/backend/tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj index 5c23cb996..9aec53626 100644 --- a/backend/tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj +++ b/backend/tests/Squidex.Domain.Users.Tests/Squidex.Domain.Users.Tests.csproj @@ -8,14 +8,13 @@ enable - - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/tests/Squidex.Infrastructure.Tests/EventSourcing/Consume/EventConsumerProcessorTests.cs b/backend/tests/Squidex.Infrastructure.Tests/EventSourcing/Consume/EventConsumerProcessorTests.cs index 638205bdf..a0a36476d 100644 --- a/backend/tests/Squidex.Infrastructure.Tests/EventSourcing/Consume/EventConsumerProcessorTests.cs +++ b/backend/tests/Squidex.Infrastructure.Tests/EventSourcing/Consume/EventConsumerProcessorTests.cs @@ -59,7 +59,7 @@ public class EventConsumerProcessorTests } }; - A.CallTo(() => eventStore.CreateSubscription(A>._, A._, A._)) + A.CallTo(() => eventStore.CreateSubscription(A>._, A._, A._)) .Returns(eventSubscription); A.CallTo(() => eventConsumer.Name) @@ -128,7 +128,7 @@ public class EventConsumerProcessorTests AssertGrainState(isStopped: true, position: initialPosition); - A.CallTo(() => eventStore.CreateSubscription(A>._, A._, A._)) + A.CallTo(() => eventStore.CreateSubscription(A>._, A._, A._)) .MustNotHaveHappened(); } @@ -142,7 +142,7 @@ public class EventConsumerProcessorTests AssertGrainState(isStopped: false, position: initialPosition); - A.CallTo(() => eventStore.CreateSubscription(A>._, A._, A._)) + A.CallTo(() => eventStore.CreateSubscription(A>._, A._, A._)) .MustHaveHappenedOnceExactly(); } @@ -158,7 +158,7 @@ public class EventConsumerProcessorTests AssertGrainState(isStopped: false, position: initialPosition); - A.CallTo(() => eventStore.CreateSubscription(A>._, A._, A._)) + A.CallTo(() => eventStore.CreateSubscription(A>._, A._, A._)) .MustHaveHappenedOnceExactly(); } @@ -172,7 +172,7 @@ public class EventConsumerProcessorTests AssertGrainState(isStopped: false, position: initialPosition); - A.CallTo(() => eventStore.CreateSubscription(A>._, A._, A._)) + A.CallTo(() => eventStore.CreateSubscription(A>._, A._, A._)) .MustHaveHappenedOnceExactly(); } @@ -529,7 +529,7 @@ public class EventConsumerProcessorTests A.CallTo(() => eventSubscription.Dispose()) .MustHaveHappenedOnceExactly(); - A.CallTo(() => eventStore.CreateSubscription(A>._, A._, A._)) + A.CallTo(() => eventStore.CreateSubscription(A>._, A._, A._)) .MustHaveHappened(2, Times.Exactly); } diff --git a/backend/tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj b/backend/tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj index 7a0524c5a..22665a5b2 100644 --- a/backend/tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj +++ b/backend/tests/Squidex.Infrastructure.Tests/Squidex.Infrastructure.Tests.csproj @@ -13,7 +13,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/tests/Squidex.Infrastructure.Tests/TestHelpers/TestUtils.cs b/backend/tests/Squidex.Infrastructure.Tests/TestHelpers/TestUtils.cs index c4d7b5c04..870b97bf7 100644 --- a/backend/tests/Squidex.Infrastructure.Tests/TestHelpers/TestUtils.cs +++ b/backend/tests/Squidex.Infrastructure.Tests/TestHelpers/TestUtils.cs @@ -10,6 +10,7 @@ using System.Text.Json; using System.Text.Json.Serialization; using NodaTime; using NodaTime.Serialization.SystemTextJson; +using Squidex.Events.Utils; using Squidex.Infrastructure.Json; using Squidex.Infrastructure.Json.Objects; using Squidex.Infrastructure.Json.System; @@ -47,6 +48,7 @@ public static class TestUtils options.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb); options.Converters.Add(new JsonValueConverter()); + options.Converters.Add(new HeaderValueConverter()); options.Converters.Add(new ReadonlyDictionaryConverterFactory()); options.Converters.Add(new ReadonlyListConverterFactory()); options.Converters.Add(new SurrogateJsonConverter()); diff --git a/backend/tests/Squidex.Web.Tests/Squidex.Web.Tests.csproj b/backend/tests/Squidex.Web.Tests/Squidex.Web.Tests.csproj index 0babef930..38548acfe 100644 --- a/backend/tests/Squidex.Web.Tests/Squidex.Web.Tests.csproj +++ b/backend/tests/Squidex.Web.Tests/Squidex.Web.Tests.csproj @@ -15,7 +15,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tools/e2e/package-lock.json b/tools/e2e/package-lock.json index b46297f82..32bef313b 100644 --- a/tools/e2e/package-lock.json +++ b/tools/e2e/package-lock.json @@ -12,7 +12,7 @@ "uuid": "^10.0.0" }, "devDependencies": { - "@playwright/test": "^1.40.0", + "@playwright/test": "^1.49.1", "@types/node": "^20.9.3", "@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^6.12.0", @@ -157,18 +157,18 @@ } }, "node_modules/@playwright/test": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.0.tgz", - "integrity": "sha512-PdW+kn4eV99iP5gxWNSDQCbhMaDVej+RXL5xr6t04nbKLCBwYtA046t7ofoczHOm8u6c+45hpDKQVZqtqwkeQg==", + "version": "1.49.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.1.tgz", + "integrity": "sha512-Ky+BVzPz8pL6PQxHqNRW1k3mIyv933LML7HktS8uik0bUXNCdPhoS/kLihiO1tMf/egaJb4IutXd7UywvXEW+g==", "dev": true, "dependencies": { - "playwright": "1.40.0" + "playwright": "1.49.1" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@types/json-schema": { @@ -2267,33 +2267,33 @@ } }, "node_modules/playwright": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.0.tgz", - "integrity": "sha512-gyHAgQjiDf1m34Xpwzaqb76KgfzYrhK7iih+2IzcOCoZWr/8ZqmdBw+t0RU85ZmfJMgtgAiNtBQ/KS2325INXw==", + "version": "1.49.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.1.tgz", + "integrity": "sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==", "dev": true, "dependencies": { - "playwright-core": "1.40.0" + "playwright-core": "1.49.1" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" }, "optionalDependencies": { "fsevents": "2.3.2" } }, "node_modules/playwright-core": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.0.tgz", - "integrity": "sha512-fvKewVJpGeca8t0ipM56jkVSU6Eo0RmFvQ/MaCQNDYm+sdvKkMBBWTE1FdeMqIdumRaXXjZChWHvIzCGM/tA/Q==", + "version": "1.49.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.1.tgz", + "integrity": "sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==", "dev": true, "bin": { "playwright-core": "cli.js" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/prelude-ls": { diff --git a/tools/e2e/package.json b/tools/e2e/package.json index 3a00f3f4d..7ada8bcca 100644 --- a/tools/e2e/package.json +++ b/tools/e2e/package.json @@ -12,7 +12,7 @@ "author": "Sebastian", "license": "ISC", "devDependencies": { - "@playwright/test": "^1.40.0", + "@playwright/test": "^1.49.1", "@types/node": "^20.9.3", "@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^6.12.0", diff --git a/tools/e2e/tests/login-start.spec.ts b/tools/e2e/tests/login-start.spec.ts index 3431f7ce6..1b670494d 100644 --- a/tools/e2e/tests/login-start.spec.ts +++ b/tools/e2e/tests/login-start.spec.ts @@ -16,5 +16,5 @@ test('has title', async ({ page }) => { }); test('visual test', async ({ page }) => { - await expect(page).toHaveScreenshot(); + await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 0.05 }); }); \ No newline at end of file diff --git a/tools/e2e/tests/login.spec.ts b/tools/e2e/tests/login.spec.ts index 8d27e0f3b..e10289819 100644 --- a/tools/e2e/tests/login.spec.ts +++ b/tools/e2e/tests/login.spec.ts @@ -25,5 +25,5 @@ test('login', async ({ page, loginPage }) => { test('visual test', async ({ loginPage }) => { const popup = await loginPage.openPopup(); - await expect(popup.root).toHaveScreenshot({ fullPage: true }); + await expect(popup.root).toHaveScreenshot({ maxDiffPixelRatio: 0.05, fullPage: true }); }); \ No newline at end of file