Browse Source

Update tool version.

pull/1044/head
Sebastian 3 years ago
parent
commit
18e9874bcc
  1. 6
      .github/workflows/dev.yml
  2. 6
      .github/workflows/release.yml
  3. 14
      tools/.editorconfig
  4. 2
      tools/TestSuite/TestSuite.ApiTests/AdminUsersTests.cs
  5. 24
      tools/TestSuite/TestSuite.ApiTests/AppLanguagesTests.cs
  6. 2
      tools/TestSuite/TestSuite.ApiTests/AppRolesTests.cs
  7. 12
      tools/TestSuite/TestSuite.ApiTests/AppTests.cs
  8. 18
      tools/TestSuite/TestSuite.ApiTests/AssetTests.cs
  9. 2
      tools/TestSuite/TestSuite.ApiTests/ContentLanguageTests.cs
  10. 44
      tools/TestSuite/TestSuite.ApiTests/ContentQueryTests.cs
  11. 44
      tools/TestSuite/TestSuite.ApiTests/ContentReferencesTests.cs
  12. 14
      tools/TestSuite/TestSuite.ApiTests/ContentScriptingTests.cs
  13. 10
      tools/TestSuite/TestSuite.ApiTests/ContentUpdateTests.cs
  14. 46
      tools/TestSuite/TestSuite.ApiTests/GraphQLFixture.cs
  15. 18
      tools/TestSuite/TestSuite.ApiTests/GraphQLTests.cs
  16. 12
      tools/TestSuite/TestSuite.ApiTests/RuleRunnerTests.cs
  17. 10
      tools/TestSuite/TestSuite.ApiTests/SchemaTests.cs
  18. 36
      tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj
  19. 10
      tools/TestSuite/TestSuite.LoadTests/TestSuite.LoadTests.csproj
  20. 24
      tools/TestSuite/TestSuite.Shared/TestSuite.Shared.csproj

6
.github/workflows/dev.yml

@ -43,7 +43,7 @@ jobs:
- name: Test - RUN
uses: kohlerdominik/docker-run-action@v1.1.0
with:
image: squidex/build:7
image: squidex/build:8
environment: |
CONFIG__BACKUPURL=http://localhost:5000
CONFIG__WAIT=60
@ -57,7 +57,7 @@ jobs:
- name: Test - RUN on path
uses: kohlerdominik/docker-run-action@v1.1.0
with:
image: squidex/build:7
image: squidex/build:8
environment: |
CONFIG__BACKUPURL=http://localhost:5000
CONFIG__WAIT=60
@ -71,7 +71,7 @@ jobs:
- name: Test - RUN with dedicated collections
uses: kohlerdominik/docker-run-action@v1.1.0
with:
image: squidex/build:7
image: squidex/build:8
environment: |
CONFIG__BACKUPURL=http://localhost:5000
CONFIG__WAIT=60

6
.github/workflows/release.yml

@ -38,7 +38,7 @@ jobs:
- name: Test - RUN
uses: kohlerdominik/docker-run-action@v1.1.0
with:
image: squidex/build:7
image: squidex/build:8
environment: |
CONFIG__BACKUPURL=http://localhost:5000
CONFIG__WAIT=60
@ -52,7 +52,7 @@ jobs:
- name: Test - RUN on path
uses: kohlerdominik/docker-run-action@v1.1.0
with:
image: squidex/build:7
image: squidex/build:8
environment: |
CONFIG__BACKUPURL=http://localhost:5000
CONFIG__WAIT=60
@ -66,7 +66,7 @@ jobs:
- name: Test - RUN with dedicated collections
uses: kohlerdominik/docker-run-action@v1.1.0
with:
image: squidex/build:7
image: squidex/build:8
environment: |
CONFIG__BACKUPURL=http://localhost:5000
CONFIG__WAIT=60

14
tools/.editorconfig

@ -21,6 +21,12 @@ dotnet_diagnostic.RECS0117.severity = none
dotnet_diagnostic.SA0001.severity = none
dotnet_diagnostic.SA1649.severity = none
# IDE0290: Use primary constructor
dotnet_diagnostic.IDE0290.severity = none
# IDE0305: Simplify collection initialization
dotnet_diagnostic.IDE0305.severity = none
# CA1707: Identifiers should not contain underscores
dotnet_diagnostic.CA1707.severity = none
@ -117,6 +123,9 @@ dotnet_diagnostic.RECS0154.severity = none
# SA1009: Closing parenthesis should be spaced correctly
dotnet_diagnostic.SA1009.severity = none
# SA1010: Opening square brackets should be spaced correctly
dotnet_diagnostic.SA1010.severity = none
# SA1011: Closing square brackets should be spaced correctly
dotnet_diagnostic.SA1011.severity = none
@ -172,4 +181,7 @@ dotnet_diagnostic.SA1602.severity = none
dotnet_diagnostic.SA1615.severity = none
# SA1623: Property summary documentation should match accessors
dotnet_diagnostic.SA1623.severity = none
dotnet_diagnostic.SA1623.severity = none
# xUnit1033: Test classes decorated with 'Xunit.IClassFixture<TFixture>' or 'Xunit.ICollectionFixture<TFixture>' should add a constructor argument of type TFixture
dotnet_diagnostic.xUnit1033.severity = none

2
tools/TestSuite/TestSuite.ApiTests/AdminUsersTests.cs

@ -113,7 +113,7 @@ public sealed class AdminUsersTests : IClassFixture<ClientFixture>
{
Email = email,
Password = "1q2w3e$R",
Permissions = new List<string>(),
Permissions = [],
// The API requests to also set the display name.
DisplayName = email,
};

24
tools/TestSuite/TestSuite.ApiTests/AppLanguagesTests.cs

@ -36,7 +36,7 @@ public sealed class AppLanguagesTests : IClassFixture<ClientFixture>
var languages_1 = await app.Apps.GetLanguagesAsync();
Assert.Equal(new string[] { "en", "de", "it" }, languages_1.Items.Select(x => x.Iso2Code).ToArray());
Assert.Equal(new[] { "en", "de", "it" }, languages_1.Items.Select(x => x.Iso2Code).ToArray());
await Verify(languages_1);
}
@ -54,7 +54,7 @@ public sealed class AppLanguagesTests : IClassFixture<ClientFixture>
var languages_1 = await app.Apps.GetLanguagesAsync();
Assert.Equal(new string[] { "en", "abc", "xyz" }, languages_1.Items.Select(x => x.Iso2Code).ToArray());
Assert.Equal(new[] { "en", "abc", "xyz" }, languages_1.Items.Select(x => x.Iso2Code).ToArray());
await Verify(languages_1);
}
@ -74,10 +74,10 @@ public sealed class AppLanguagesTests : IClassFixture<ClientFixture>
// STEP 3: Update German language.
var updateRequest = new UpdateLanguageDto
{
Fallback = new List<string>
{
Fallback =
[
"it"
},
],
IsOptional = true
};
@ -105,10 +105,10 @@ public sealed class AppLanguagesTests : IClassFixture<ClientFixture>
// STEP 2: Update Italian language.
var updateRequest = new UpdateLanguageDto
{
Fallback = new List<string>
{
Fallback =
[
"de"
},
],
IsOptional = true
};
@ -154,10 +154,10 @@ public sealed class AppLanguagesTests : IClassFixture<ClientFixture>
// STEP 2: Update Italian language.
var updateRequest = new UpdateLanguageDto
{
Fallback = new List<string>
{
Fallback =
[
"de"
},
],
IsOptional = true
};
@ -170,7 +170,7 @@ public sealed class AppLanguagesTests : IClassFixture<ClientFixture>
// Fallback language must be removed.
Assert.Empty(language_2_IT.Fallback);
Assert.Equal(new string[] { "en", "it" }, languages_2.Items.Select(x => x.Iso2Code).ToArray());
Assert.Equal(new[] { "en", "it" }, languages_2.Items.Select(x => x.Iso2Code).ToArray());
await Verify(languages_2);
}

2
tools/TestSuite/TestSuite.ApiTests/AppRolesTests.cs

@ -63,7 +63,7 @@ public sealed class AppRolesTests : IClassFixture<CreatedAppFixture>
// STEP 2: Update role..
var updateRequest = new UpdateRoleDto
{
Permissions = new List<string> { "a", "b" }
Permissions = ["a", "b"]
};
var roles_2 = await _.Client.Apps.PutRoleAsync(roleName, updateRequest);

12
tools/TestSuite/TestSuite.ApiTests/AppTests.cs

@ -129,14 +129,14 @@ public sealed class AppTests : IClassFixture<CreatedAppFixture>
// STEP 1: Update settings with new state.
var updateRequest = new UpdateAppSettingsDto
{
Patterns = new List<PatternDto>
{
Patterns =
[
new PatternDto { Name = "pattern", Regex = ".*" }
},
Editors = new List<EditorDto>
{
],
Editors =
[
new EditorDto { Name = "editor", Url = "http://squidex.io/path/to/editor" }
}
]
};
var settings_1 = await _.Client.Apps.PutSettingsAsync(updateRequest);

18
tools/TestSuite/TestSuite.ApiTests/AssetTests.cs

@ -313,11 +313,11 @@ public class AssetTests : IClassFixture<CreatedAppFixture>
// STEP 2: Annotate tags.
var tagsRequest = new AnnotateAssetDto
{
Tags = new List<string>
{
Tags =
[
"tag1",
"tag2"
}
]
};
var asset_2 = await _.Client.Assets.PutAssetAsync(asset_1.Id, tagsRequest);
@ -345,11 +345,11 @@ public class AssetTests : IClassFixture<CreatedAppFixture>
var randomMetadataRequest = new AnnotateAssetDto
{
Tags = new List<string>
{
Tags =
[
randomTag1,
randomTag2
}
]
};
await _.Client.Assets.PutAssetAsync(asset_1.Id, randomMetadataRequest, ct);
@ -367,11 +367,11 @@ public class AssetTests : IClassFixture<CreatedAppFixture>
var metadataRequest = new AnnotateAssetDto
{
Tags = new List<string>
{
Tags =
[
tag1,
tag2
}
]
};
var asset_2 = await _.Client.Assets.PutAssetAsync(asset_1.Id, metadataRequest);

2
tools/TestSuite/TestSuite.ApiTests/ContentLanguageTests.cs

@ -80,7 +80,7 @@ public class ContentLanguageTests : IClassFixture<ContentFixture>
// STEP 2: Get content.
var (etag1, _) = await GetEtagAsync(content.Id, new Dictionary<string, string>());
var (etag1, _) = await GetEtagAsync(content.Id, []);
var (etag2, _) = await GetEtagAsync(content.Id, new Dictionary<string, string>
{

44
tools/TestSuite/TestSuite.ApiTests/ContentQueryTests.cs

@ -110,8 +110,8 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items_1 = await _.Contents.GetAsync(q1);
AssertItems(items_0, 3, new[] { 4, 5, 6 });
AssertItems(items_1, 3, new[] { 4, 5, 6 });
AssertItems(items_0, 3, [4, 5, 6]);
AssertItems(items_1, 3, [4, 5, 6]);
}
[Fact]
@ -149,7 +149,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.GetAsync(q);
AssertItems(items, 10, new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 });
AssertItems(items, 10, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
}
[Fact]
@ -171,7 +171,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.GetAsync(q);
AssertItems(items, 10, new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 });
AssertItems(items, 10, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
}
[Fact]
@ -207,7 +207,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.GetAsync(q);
AssertItems(items, 10, new[] { 6, 7, 8, 9, 10 });
AssertItems(items, 10, [6, 7, 8, 9, 10]);
}
[Fact]
@ -230,7 +230,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.GetAsync(q);
AssertItems(items, 10, new[] { 6, 7, 8, 9, 10 });
AssertItems(items, 10, [6, 7, 8, 9, 10]);
}
[Fact]
@ -240,7 +240,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.GetAsync(q);
AssertItems(items, 10, new[] { 3, 4, 5, 6, 7 });
AssertItems(items, 10, [3, 4, 5, 6, 7]);
}
[Fact]
@ -264,7 +264,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.GetAsync(q);
AssertItems(items, 10, new[] { 3, 4, 5, 6, 7 });
AssertItems(items, 10, [3, 4, 5, 6, 7]);
}
[Fact]
@ -274,7 +274,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.GetAsync(q);
AssertItems(items, 3, new[] { 4, 5, 6 });
AssertItems(items, 3, [4, 5, 6]);
}
[Fact]
@ -314,7 +314,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.GetAsync(q);
AssertItems(items, 3, new[] { 4, 5, 6 });
AssertItems(items, 3, [4, 5, 6]);
}
[Fact]
@ -354,7 +354,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.GetAsync(q);
AssertItems(items, 3, new[] { 4, 5, 6 });
AssertItems(items, 3, [4, 5, 6]);
}
[Fact]
@ -364,7 +364,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.PollAsync(q, x => true);
AssertItems(items, 1, new[] { 2 });
AssertItems(items, 1, [2]);
}
[Fact]
@ -380,7 +380,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.PollAsync(q, x => true);
AssertItems(items, 1, new[] { 2 });
AssertItems(items, 1, [2]);
}
[Fact]
@ -390,7 +390,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.PollAsync(q, x => true);
AssertItems(items, 1, new[] { 3 });
AssertItems(items, 1, [3]);
}
[Fact]
@ -416,7 +416,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.PollAsync(q, x => true);
AssertItems(items, 1, new[] { 3 });
AssertItems(items, 1, [3]);
}
[Fact]
@ -426,7 +426,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.PollAsync(q, x => true);
AssertItems(items, 1, new[] { 4 });
AssertItems(items, 1, [4]);
}
[Fact]
@ -501,7 +501,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items = await _.Contents.PollAsync(q, x => true);
AssertItems(items, 1, new[] { 4 });
AssertItems(items, 1, [4]);
}
[Fact]
@ -614,8 +614,8 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var items1 = results.ElementAt(0).Data.Items;
var items2 = results.ElementAt(1).Data.Items;
Assert.Equal(items1.Select(x => x.Data.Number).ToArray(), new[] { 4, 5, 6 });
Assert.Equal(items2.Select(x => x.Data.Number).ToArray(), new[] { 5, 6 });
Assert.Equal(new[] { 4, 5, 6 }, items1.Select(x => x.Data.Number).ToArray());
Assert.Equal(new[] { 5, 6 }, items2.Select(x => x.Data.Number).ToArray());
}
[Fact]
@ -643,7 +643,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var result = await _.Client.SharedDynamicContents.GraphQlAsync<QueryResult>(query);
var items = result.Items;
Assert.Equal(items.Select(x => x.Data.Number).ToArray(), new[] { 4, 5, 6 });
Assert.Equal(new[] { 4, 5, 6 }, items.Select(x => x.Data.Number).ToArray());
}
[Fact]
@ -671,7 +671,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var result = await _.Client.SharedDynamicContents.GraphQlGetAsync<QueryResult>(query);
var items = result.Items;
Assert.Equal(items.Select(x => x.Data.Number).ToArray(), new[] { 4, 5, 6 });
Assert.Equal(new[] { 4, 5, 6 }, items.Select(x => x.Data.Number).ToArray());
}
[Fact]
@ -695,7 +695,7 @@ public class ContentQueryTests : IClassFixture<ContentQueryFixture>
var result = await _.Client.SharedDynamicContents.GraphQlAsync<JObject>(query);
var items = result["queryMyReadsContents"];
Assert.Equal(items.Select(x => x["data"]["number"]["iv"].Value<int>()).ToArray(), new[] { 4, 5, 6 });
Assert.Equal(new[] { 4, 5, 6 }, items.Select(x => x["data"]["number"]["iv"].Value<int>()).ToArray());
}
[Fact]

44
tools/TestSuite/TestSuite.ApiTests/ContentReferencesTests.cs

@ -35,7 +35,7 @@ public class ContentReferencesTests : IClassFixture<ContentReferencesFixture>
// STEP 2: Create a content with a reference.
var contentB_1 = await _.Contents.CreateAsync(new TestEntityWithReferencesData
{
References = new[] { contentA_1.Id }
References = [contentA_1.Id]
}, ContentCreateOptions.AsPublish);
@ -55,7 +55,7 @@ public class ContentReferencesTests : IClassFixture<ContentReferencesFixture>
// STEP 5: Query new item again.
var contentB_3 = await _.Contents.GetAsync(contentB_1.Id);
Assert.Equal(new string[] { contentA_1.Id }, contentB_3.Data.References);
Assert.Equal(new[] { contentA_1.Id }, contentB_3.Data.References);
}
[Fact]
@ -71,7 +71,7 @@ public class ContentReferencesTests : IClassFixture<ContentReferencesFixture>
// STEP 2: Create a content with a reference.
await _.Contents.CreateAsync(new TestEntityWithReferencesData
{
References = new[] { contentA_1.Id }
References = [contentA_1.Id]
}, ContentCreateOptions.AsPublish);
@ -101,7 +101,7 @@ public class ContentReferencesTests : IClassFixture<ContentReferencesFixture>
// STEP 2: Create a content with a reference.
await _.Contents.CreateAsync(new TestEntityWithReferencesData
{
References = new[] { contentA_1.Id }
References = [contentA_1.Id]
}, ContentCreateOptions.AsPublish);
@ -139,22 +139,22 @@ public class ContentReferencesTests : IClassFixture<ContentReferencesFixture>
// STEP 2: Create a content with a reference.
await _.Contents.CreateAsync(new TestEntityWithReferencesData
{
References = new[] { contentA_1.Id }
References = [contentA_1.Id]
}, ContentCreateOptions.AsPublish);
// STEP 3: Try to delete with referrer check.
var result1 = await _.Contents.BulkUpdateAsync(new BulkUpdate
{
Jobs = new List<BulkUpdateJob>
{
Jobs =
[
new BulkUpdateJob
{
Id = contentA_1.Id,
Type = BulkUpdateType.Delete,
Status = "Draft"
}
},
},
],
CheckReferrers = true
});
@ -164,15 +164,15 @@ public class ContentReferencesTests : IClassFixture<ContentReferencesFixture>
// STEP 4: Delete without referrer check.
var result2 = await _.Contents.BulkUpdateAsync(new BulkUpdate
{
Jobs = new List<BulkUpdateJob>
{
Jobs =
[
new BulkUpdateJob
{
Id = contentA_1.Id,
Type = BulkUpdateType.Delete,
Status = "Draft"
}
},
},
],
CheckReferrers = false
});
@ -192,22 +192,22 @@ public class ContentReferencesTests : IClassFixture<ContentReferencesFixture>
// STEP 2: Create a published content with a reference.
await _.Contents.CreateAsync(new TestEntityWithReferencesData
{
References = new[] { contentA_1.Id }
References = [contentA_1.Id]
}, ContentCreateOptions.AsPublish);
// STEP 3: Try to delete with referrer check.
var result1 = await _.Contents.BulkUpdateAsync(new BulkUpdate
{
Jobs = new List<BulkUpdateJob>
{
Jobs =
[
new BulkUpdateJob
{
Id = contentA_1.Id,
Type = BulkUpdateType.ChangeStatus,
Status = "Draft"
}
},
},
],
CheckReferrers = true
});
@ -217,15 +217,15 @@ public class ContentReferencesTests : IClassFixture<ContentReferencesFixture>
// STEP 4: Delete without referrer check.
var result2 = await _.Contents.BulkUpdateAsync(new BulkUpdate
{
Jobs = new List<BulkUpdateJob>
{
Jobs =
[
new BulkUpdateJob
{
Id = contentA_1.Id,
Type = BulkUpdateType.ChangeStatus,
Status = "Draft"
}
},
},
],
CheckReferrers = false
});

14
tools/TestSuite/TestSuite.ApiTests/ContentScriptingTests.cs

@ -123,8 +123,8 @@ public class ContentScriptingTests : IClassFixture<CreatedAppFixture>
{
DoNotScript = false,
DoNotValidate = false,
Jobs = new List<BulkUpdateJob>
{
Jobs =
[
new BulkUpdateJob
{
Type = BulkUpdateType.Upsert,
@ -135,8 +135,8 @@ public class ContentScriptingTests : IClassFixture<CreatedAppFixture>
iv = 99
}
}
}
},
},
],
Publish = true
});
@ -171,8 +171,8 @@ public class ContentScriptingTests : IClassFixture<CreatedAppFixture>
{
DoNotScript = true,
DoNotValidate = false,
Jobs = new List<BulkUpdateJob>
{
Jobs =
[
new BulkUpdateJob
{
Type = BulkUpdateType.Upsert,
@ -184,7 +184,7 @@ public class ContentScriptingTests : IClassFixture<CreatedAppFixture>
}
}
}
},
],
Publish = true
});

10
tools/TestSuite/TestSuite.ApiTests/ContentUpdateTests.cs

@ -167,7 +167,7 @@ public class ContentUpdateTests : IClassFixture<ContentFixture>
// STEP 1: Create a content item with a text that caused a bug before.
var content = await _.Contents.CreateAsync(new TestEntityData
{
Localized = new Dictionary<string, string>()
Localized = []
}, ContentCreateOptions.AsPublish);
@ -643,14 +643,14 @@ public class ContentUpdateTests : IClassFixture<ContentFixture>
Name = schemaName,
IsPublished = true,
IsSingleton = true,
Fields = new List<UpsertSchemaFieldDto>
{
Fields =
[
new UpsertSchemaFieldDto
{
Name = "my-field",
Properties = new StringFieldPropertiesDto()
}
}
},
]
};
await _.Client.Schemas.PostSchemaAsync(createRequest);

46
tools/TestSuite/TestSuite.ApiTests/GraphQLFixture.cs

@ -66,14 +66,14 @@ public sealed class GraphQLFixture : ContentFixture
var createLocationRequest = new CreateSchemaDto
{
Name = "location",
Fields = new List<UpsertSchemaFieldDto>
{
Fields =
[
new UpsertSchemaFieldDto
{
Name = "name",
Properties = new StringFieldPropertiesDto()
}
},
},
],
Type = SchemaType.Component
};
@ -84,8 +84,8 @@ public sealed class GraphQLFixture : ContentFixture
var createCitiesRequest = new CreateSchemaDto
{
Name = "cities",
Fields = new List<UpsertSchemaFieldDto>
{
Fields =
[
new UpsertSchemaFieldDto
{
Name = "name",
@ -96,10 +96,10 @@ public sealed class GraphQLFixture : ContentFixture
Name = "topLocation",
Properties = new ComponentFieldPropertiesDto
{
SchemaIds = new List<string>
{
SchemaIds =
[
locationsId
}
]
}
},
new UpsertSchemaFieldDto
@ -107,13 +107,13 @@ public sealed class GraphQLFixture : ContentFixture
Name = "locations",
Properties = new ComponentsFieldPropertiesDto
{
SchemaIds = new List<string>
{
SchemaIds =
[
locationsId
}
]
}
}
},
},
],
IsPublished = true
};
@ -124,8 +124,8 @@ public sealed class GraphQLFixture : ContentFixture
var createStatesRequest = new CreateSchemaDto
{
Name = "states",
Fields = new List<UpsertSchemaFieldDto>
{
Fields =
[
new UpsertSchemaFieldDto
{
Name = "name",
@ -136,10 +136,10 @@ public sealed class GraphQLFixture : ContentFixture
Name = "cities",
Properties = new ReferencesFieldPropertiesDto
{
SchemaIds = new List<string> { citiesId }
SchemaIds = [citiesId]
}
}
},
],
IsPublished = true
};
@ -150,8 +150,8 @@ public sealed class GraphQLFixture : ContentFixture
var createCountriesRequest = new CreateSchemaDto
{
Name = "countries",
Fields = new List<UpsertSchemaFieldDto>
{
Fields =
[
new UpsertSchemaFieldDto
{
Name = "name",
@ -162,10 +162,10 @@ public sealed class GraphQLFixture : ContentFixture
Name = "states",
Properties = new ReferencesFieldPropertiesDto
{
SchemaIds = new List<string> { statesId }
SchemaIds = [statesId]
}
}
},
},
],
IsPublished = true
};

18
tools/TestSuite/TestSuite.ApiTests/GraphQLTests.cs

@ -102,8 +102,8 @@ public sealed class GraphQLTests : IClassFixture<GraphQLFixture>
{
Name = "Leipzig Top Location"
},
Locations = new List<LocationData>
{
Locations =
[
new LocationData
{
Name = "Leipzig Location 1"
@ -111,8 +111,8 @@ public sealed class GraphQLTests : IClassFixture<GraphQLFixture>
new LocationData
{
Name = "Leipzig Location 2"
}
}
},
],
}
},
new City
@ -124,8 +124,8 @@ public sealed class GraphQLTests : IClassFixture<GraphQLFixture>
{
Name = "Munich Top Location"
},
Locations = new List<LocationData>
{
Locations =
[
new LocationData
{
Name = "Munich Location 1"
@ -133,8 +133,8 @@ public sealed class GraphQLTests : IClassFixture<GraphQLFixture>
new LocationData
{
Name = "Munich Location 2"
}
}
},
],
}
}
});
@ -450,7 +450,7 @@ public sealed class GraphQLTests : IClassFixture<GraphQLFixture>
// Create the request manually to check the headers.
var response = await httpClient.PostAsJsonAsync($"api/content/{_.AppName}/graphql", query);
Assert.Equal(new string[]
Assert.Equal(new[]
{
"Auth-State",
"X-Fields",

12
tools/TestSuite/TestSuite.ApiTests/RuleRunnerTests.cs

@ -133,20 +133,20 @@ public class RuleRunnerTests : IClassFixture<ClientFixture>, IClassFixture<Webho
},
Trigger = new ContentChangedRuleTriggerDto
{
Schemas = new List<SchemaCondition>
{
Schemas =
[
new SchemaCondition
{
SchemaId = parentSchema.Id
}
},
ReferencedSchemas = new List<SchemaCondition>
{
],
ReferencedSchemas =
[
new SchemaCondition
{
SchemaId = referencedSchema.Id
}
}
]
}
};

10
tools/TestSuite/TestSuite.ApiTests/SchemaTests.cs

@ -146,8 +146,8 @@ public class SchemaTests : IClassFixture<CreatedAppFixture>
var createRequest = new CreateSchemaDto
{
Name = schemaName,
Fields = new List<UpsertSchemaFieldDto>
{
Fields =
[
new UpsertSchemaFieldDto
{
Name = "references",
@ -164,10 +164,10 @@ public class SchemaTests : IClassFixture<CreatedAppFixture>
Properties = new TagsFieldPropertiesDto
{
Editor = TagsFieldEditor.Checkboxes,
AllowedValues = new List<string> { "value1" }
AllowedValues = ["value1"]
}
}
}
},
]
};
var schema = await _.Client.Schemas.PostSchemaAsync(createRequest);

36
tools/TestSuite/TestSuite.ApiTests/TestSuite.ApiTests.csproj

@ -1,35 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>11.0</LangVersion>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<None Remove="Assets\SampleImage_BMP_3MB - Copy.bmp" />
<None Remove="Assets\SampleImage_GIF_500kb - Copy.gif" />
<None Remove="Assets\SampleImage_JPG_200kb - Copy.jpg" />
<None Remove="Assets\SampleImage_PNG_1mb - Copy.png" />
<None Remove="Assets\SampleImage_TGA_2mb - Copy.tga" />
<None Remove="Assets\SampleImage_WEBP_350kb - Copy.webp" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Codeuctivity.ImageSharpCompare" Version="3.0.118" />
<PackageReference Include="FluentAssertions" Version="6.11.0" />
<PackageReference Include="GraphQL.Client" Version="5.1.1" />
<PackageReference Include="GraphQL.Client.Serializer.Newtonsoft" Version="5.1.1" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.22">
<PackageReference Include="Codeuctivity.ImageSharpCompare" Version="3.0.183" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="GraphQL.Client" Version="6.0.1" />
<PackageReference Include="GraphQL.Client.Serializer.Newtonsoft" Version="6.0.1" />
<PackageReference Include="Meziantou.Analyzer" Version="2.0.110">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="NSwag.Core" Version="13.18.2" />
<PackageReference Include="PuppeteerSharp" Version="9.0.2" />
<PackageReference Include="Squidex.Assets" Version="5.16.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NSwag.Core" Version="13.20.0" />
<PackageReference Include="PuppeteerSharp" Version="12.0.0" />
<PackageReference Include="Squidex.Assets" Version="6.2.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="Verify.Xunit" Version="19.11.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="Verify.Xunit" Version="22.5.0" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>

10
tools/TestSuite/TestSuite.LoadTests/TestSuite.LoadTests.csproj

@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>11.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meziantou.Analyzer" Version="2.0.22">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.110">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>

24
tools/TestSuite/TestSuite.Shared/TestSuite.Shared.csproj

@ -1,27 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>TestSuite</RootNamespace>
<LangVersion>11.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meziantou.Analyzer" Version="2.0.22">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.110">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="Squidex.Assets" Version="5.16.0" />
<PackageReference Include="Squidex.ClientLibrary" Version="16.1.0" />
<PackageReference Include="Squidex.ClientLibrary.ServiceExtensions" Version="16.1.0" />
<PackageReference Include="Squidex.Assets" Version="6.2.0" />
<PackageReference Include="Squidex.ClientLibrary" Version="17.0.0" />
<PackageReference Include="Squidex.ClientLibrary.ServiceExtensions" Version="17.0.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="Verify" Version="19.11.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="Verify" Version="22.5.0" />
<PackageReference Include="xunit" Version="2.6.1" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />

Loading…
Cancel
Save