diff --git a/src/Auth0.ManagementApi/Clients/FormsClient.cs b/src/Auth0.ManagementApi/Clients/FormsClient.cs new file mode 100644 index 00000000..3c04a97c --- /dev/null +++ b/src/Auth0.ManagementApi/Clients/FormsClient.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; + +using Auth0.ManagementApi.Models.Forms; +using Auth0.ManagementApi.Paging; + +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Clients +{ + public class FormsClient : BaseClient, IFormsClient + { + private readonly JsonConverter[] formsConverters = { new PagedListConverter("forms") }; + + /// + /// Initializes a new instance of . + /// + /// used to make all API calls. + /// of the endpoint to use in making API calls. + /// Dictionary containing default headers included with every request this client makes. + public FormsClient(IManagementConnection connection, Uri baseUri, IDictionary defaultHeaders) : base(connection, baseUri, defaultHeaders) + { + + } + + /// + public Task> GetAllAsync(FormsGetRequest request, CancellationToken cancellationToken = default) + { + if (request == null) + throw new ArgumentNullException(nameof(request)); + + var queryStrings = new Dictionary(); + + if (request.Hydrate != null && request.Hydrate.Any()) + { + var hydrateValues = string.Join(",", request.Hydrate.Select( x => x.ToString().ToLower())); + queryStrings["hydrate"] = hydrateValues; + } + + if (request.PaginationInfo != null) + { + queryStrings["page"] = request.PaginationInfo.PageNo.ToString(); + queryStrings["per_page"] = request.PaginationInfo.PerPage.ToString(); + queryStrings["include_totals"] = request.PaginationInfo.IncludeTotals.ToString().ToLower(); + } + + return Connection.GetAsync>(BuildUri("forms", queryStrings), DefaultHeaders, formsConverters, cancellationToken); + } + + /// + public Task
GetAsync(FormsGetRequest request, CancellationToken cancellationToken = default) + { + if (request == null) + throw new ArgumentNullException(nameof(request)); + var queryStrings = new Dictionary(); + + if (request.Hydrate != null && request.Hydrate.Any()) + { + var hydrateValues = string.Join(",", request.Hydrate.Select( x => x.ToString().ToLower())); + queryStrings["hydrate"] = hydrateValues; + } + + return Connection.GetAsync(BuildUri($"forms/{EncodePath(request.Id)}", queryStrings), DefaultHeaders, null, cancellationToken); + } + + /// + public Task CreateAsync(FormCreateRequest request, CancellationToken cancellationToken = default) + { + return Connection.SendAsync(HttpMethod.Post, BuildUri("forms"), request, DefaultHeaders, cancellationToken: cancellationToken); + } + + /// + public Task UpdateAsync(string id, FormUpdateRequest request, CancellationToken cancellationToken = default) + { + if (string.IsNullOrEmpty(id)) + { + throw new ArgumentNullException(nameof(id)); + } + return Connection.SendAsync(new HttpMethod("PATCH"), BuildUri($"forms/{EncodePath(id)}"), request, DefaultHeaders, cancellationToken: cancellationToken); + } + + /// + public Task DeleteAsync(string id, CancellationToken cancellationToken = default) + { + if (string.IsNullOrEmpty(id)) + { + throw new ArgumentNullException(nameof(id)); + } + return Connection.SendAsync(HttpMethod.Delete, BuildUri($"forms/{EncodePath(id)}"), null, DefaultHeaders, cancellationToken: cancellationToken); + } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Clients/IFormsClient.cs b/src/Auth0.ManagementApi/Clients/IFormsClient.cs new file mode 100644 index 00000000..70f37911 --- /dev/null +++ b/src/Auth0.ManagementApi/Clients/IFormsClient.cs @@ -0,0 +1,53 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Auth0.ManagementApi.Models.Forms; +using Auth0.ManagementApi.Paging; + +namespace Auth0.ManagementApi.Clients +{ + public interface IFormsClient + { + /// + /// Get all Forms + /// + /// + /// + /// All available s. + Task> GetAllAsync(FormsGetRequest request, CancellationToken cancellationToken = default); + + /// + /// Get A form. + /// + /// + /// + /// All available s. + Task GetAsync(FormsGetRequest request, CancellationToken cancellationToken = default); + + /// + /// Create a form. + /// + /// + /// + /// + Task CreateAsync(FormCreateRequest request, CancellationToken cancellationToken = default); + + /// + /// Update a form. + /// + /// ID of the form to be updated + /// + /// + /// + Task UpdateAsync(string id, FormUpdateRequest request, CancellationToken cancellationToken = default); + + /// + /// Delete a form. + /// + /// ID of the form to be deleted + /// + /// + Task DeleteAsync(string id, CancellationToken cancellationToken = default); + } +} + diff --git a/src/Auth0.ManagementApi/IManagementApiClient.cs b/src/Auth0.ManagementApi/IManagementApiClient.cs index 4ceaf0e8..8cc96a12 100644 --- a/src/Auth0.ManagementApi/IManagementApiClient.cs +++ b/src/Auth0.ManagementApi/IManagementApiClient.cs @@ -165,6 +165,11 @@ public interface IManagementApiClient : IDisposable /// Contains all the methods to call the /self-service-profile endpoints. /// ISelfServiceProfilesClient SelfServiceProfilesClient { get; } + + /// + /// Contains all the methods to call the /forms endpoints. + /// + IFormsClient FormsClient { get; } /// /// Update the Access Token used with every request. diff --git a/src/Auth0.ManagementApi/ManagementApiClient.cs b/src/Auth0.ManagementApi/ManagementApiClient.cs index c985313b..07a524df 100644 --- a/src/Auth0.ManagementApi/ManagementApiClient.cs +++ b/src/Auth0.ManagementApi/ManagementApiClient.cs @@ -172,6 +172,9 @@ public class ManagementApiClient : IManagementApiClient /// public ISelfServiceProfilesClient SelfServiceProfilesClient { get; } + + /// + public IFormsClient FormsClient { get; } private Dictionary DefaultHeaders { get; set; } @@ -226,6 +229,7 @@ public ManagementApiClient(string token, Uri baseUri, IManagementConnection mana RefreshTokens = new RefreshTokenClient(managementConnection, baseUri, DefaultHeaders); Sessions = new SessionsClient(managementConnection, baseUri, DefaultHeaders); SelfServiceProfilesClient = new SelfServiceProfilesClient(managementConnection, baseUri, DefaultHeaders); + FormsClient = new FormsClient(managementConnection, baseUri, DefaultHeaders); } /// diff --git a/src/Auth0.ManagementApi/Models/Forms/AfterSubmit.cs b/src/Auth0.ManagementApi/Models/Forms/AfterSubmit.cs new file mode 100644 index 00000000..c6341203 --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/AfterSubmit.cs @@ -0,0 +1,10 @@ +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Models.Forms +{ + public class AfterSubmit + { + [JsonProperty("flow_id")] + public string FlowId { get; set; } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/Coordinates.cs b/src/Auth0.ManagementApi/Models/Forms/Coordinates.cs new file mode 100644 index 00000000..93d53e7d --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/Coordinates.cs @@ -0,0 +1,13 @@ +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Models.Forms +{ + public class Coordinates + { + [JsonProperty("x")] + public int X { get; set; } + + [JsonProperty("y")] + public int Y { get; set; } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/Ending.cs b/src/Auth0.ManagementApi/Models/Forms/Ending.cs new file mode 100644 index 00000000..555bfbc1 --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/Ending.cs @@ -0,0 +1,19 @@ +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Models.Forms +{ + public class Ending + { + [JsonProperty("redirection")] + public Redirection Redirection { get; set; } + + [JsonProperty("after_submit")] + public AfterSubmit AfterSubmit { get; set; } + + [JsonProperty("coordinates")] + public Coordinates Coordinates { get; set; } + + [JsonProperty("resume_flow")] + public bool? ResumeFlow { get; set; } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/Form.cs b/src/Auth0.ManagementApi/Models/Forms/Form.cs new file mode 100644 index 00000000..8e990586 --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/Form.cs @@ -0,0 +1,33 @@ +using System; +using Newtonsoft.Json; +using Auth0.ManagementApi.Models.Forms; + +namespace Auth0.ManagementApi.Models.Forms +{ + /// + /// Represents a Form + /// + public class Form : FormBase + { + [JsonProperty("messages")] + public Messages Messages { get; set; } + + [JsonProperty("languages")] + public Languages Languages { get; set; } + + [JsonProperty("translations")] + public dynamic Translations { get; set; } + + [JsonProperty("nodes")] + public Node[] Nodes { get; set; } + + [JsonProperty("start")] + public Start Start { get; set; } + + [JsonProperty("ending")] + public Ending Ending { get; set; } + + [JsonProperty("style")] + public Style Style { get; set; } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/FormBase.cs b/src/Auth0.ManagementApi/Models/Forms/FormBase.cs new file mode 100644 index 00000000..470c3ccb --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/FormBase.cs @@ -0,0 +1,26 @@ +using System; +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Models.Forms +{ + public class FormBase + { + [JsonProperty("id")] + public string Id { get; set; } + + [JsonProperty("name")] + public string Name { get; set; } + + [JsonProperty("created_at")] + public DateTime CreatedAt { get; set; } + + [JsonProperty("updated_at")] + public DateTime UpdatedAt { get; set; } + + [JsonProperty("embedded_at")] + public DateTime EmbeddedAt { get; set; } + + [JsonProperty("submitted_at")] + public DateTime SubmittedAt { get; set; } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/FormCreateRequest.cs b/src/Auth0.ManagementApi/Models/Forms/FormCreateRequest.cs new file mode 100644 index 00000000..7b2b8080 --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/FormCreateRequest.cs @@ -0,0 +1,34 @@ +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Models.Forms +{ + /// + /// Contains information required to create a new form. + /// + public class FormCreateRequest + { + [JsonProperty("name")] + public string Name { get; set; } + + [JsonProperty("messages")] + public Messages Messages { get; set; } + + [JsonProperty("languages")] + public Languages Languages { get; set; } + + [JsonProperty("translations")] + public dynamic Translations { get; set; } + + [JsonProperty("nodes")] + public Node[] Nodes { get; set; } + + [JsonProperty("start")] + public Start Start { get; set; } + + [JsonProperty("ending")] + public Ending Ending { get; set; } + + [JsonProperty("style")] + public Style Style { get; set; } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/FormUpdateRequest.cs b/src/Auth0.ManagementApi/Models/Forms/FormUpdateRequest.cs new file mode 100644 index 00000000..652cce12 --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/FormUpdateRequest.cs @@ -0,0 +1,7 @@ +namespace Auth0.ManagementApi.Models.Forms +{ + public class FormUpdateRequest : FormCreateRequest + { + + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/FormsGetRequest.cs b/src/Auth0.ManagementApi/Models/Forms/FormsGetRequest.cs new file mode 100644 index 00000000..4a0ed551 --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/FormsGetRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Specialized; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +using Auth0.ManagementApi.Paging; + +namespace Auth0.ManagementApi.Models.Forms +{ + public class FormsGetRequest + { + public PaginationInfo PaginationInfo { get; set; } + + /// + /// Hydration parameter + /// + [JsonConverter(typeof(StringEnumConverter))] + public Hydrate[] Hydrate { get; set; } + + /// + /// Form Identifier + /// + public string Id { get; set; } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/HiddenFields.cs b/src/Auth0.ManagementApi/Models/Forms/HiddenFields.cs new file mode 100644 index 00000000..e5d043d7 --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/HiddenFields.cs @@ -0,0 +1,13 @@ +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Models.Forms +{ + public class HiddenFields + { + [JsonProperty("key")] + public string Key { get; set; } + + [JsonProperty("value")] + public string Value { get; set; } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/Hydrate.cs b/src/Auth0.ManagementApi/Models/Forms/Hydrate.cs new file mode 100644 index 00000000..b65930b5 --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/Hydrate.cs @@ -0,0 +1,13 @@ +using System.Runtime.Serialization; + +namespace Auth0.ManagementApi.Models.Forms +{ + public enum Hydrate + { + [EnumMember(Value = "flow_count")] + FLOW_COUNT, + + [EnumMember(Value = "links")] + LINKS + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/Languages.cs b/src/Auth0.ManagementApi/Models/Forms/Languages.cs new file mode 100644 index 00000000..589671ff --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/Languages.cs @@ -0,0 +1,13 @@ +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Models.Forms +{ + public class Languages + { + [JsonProperty("primary")] + public string Primary { get; set; } + + [JsonProperty("default")] + public string Default { get; set; } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/Messages.cs b/src/Auth0.ManagementApi/Models/Forms/Messages.cs new file mode 100644 index 00000000..d61f596d --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/Messages.cs @@ -0,0 +1,13 @@ +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Models.Forms +{ + public class Messages + { + [JsonProperty("errors")] + public dynamic Errors { get; set; } + + [JsonProperty("custom")] + public dynamic Custom { get; set; } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/Node.cs b/src/Auth0.ManagementApi/Models/Forms/Node.cs new file mode 100644 index 00000000..a33396c4 --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/Node.cs @@ -0,0 +1,25 @@ +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Models.Forms +{ + public class Node + { + /// + /// format: format-custom-identifier + /// + [JsonProperty("id")] + public string Id { get; set; } + + [JsonProperty("type")] + public string Type { get; set; } + + [JsonProperty("coordinates")] + public Coordinates Coordinates { get; set; } + + [JsonProperty("alias")] + public string Alias { get; set; } + + [JsonProperty("config")] + public dynamic Config { get; set; } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/Redirection.cs b/src/Auth0.ManagementApi/Models/Forms/Redirection.cs new file mode 100644 index 00000000..6ba460fd --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/Redirection.cs @@ -0,0 +1,13 @@ +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Models.Forms +{ + public class Redirection + { + [JsonProperty("delay")] + public int Delay { get; set; } + + [JsonProperty("target")] + public string Target { get; set; } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/Start.cs b/src/Auth0.ManagementApi/Models/Forms/Start.cs new file mode 100644 index 00000000..45b19191 --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/Start.cs @@ -0,0 +1,16 @@ +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Models.Forms +{ + public class Start + { + [JsonProperty("hidden_fields")] + public HiddenFields[] HiddenFields { get; set; } + + [JsonProperty("next_node")] + public string NextNode { get; set; } + + [JsonProperty("coordinates")] + public Coordinates Coordinates { get; set; } + } +} \ No newline at end of file diff --git a/src/Auth0.ManagementApi/Models/Forms/Style.cs b/src/Auth0.ManagementApi/Models/Forms/Style.cs new file mode 100644 index 00000000..111e22e3 --- /dev/null +++ b/src/Auth0.ManagementApi/Models/Forms/Style.cs @@ -0,0 +1,10 @@ +using Newtonsoft.Json; + +namespace Auth0.ManagementApi.Models.Forms +{ + public class Style + { + [JsonProperty("css")] + public string Css { get; set; } + } +} \ No newline at end of file diff --git a/tests/Auth0.AuthenticationApi.IntegrationTests/Testing/ManagementTestBaseUtils.cs b/tests/Auth0.AuthenticationApi.IntegrationTests/Testing/ManagementTestBaseUtils.cs index a72166a8..fd1b0d19 100644 --- a/tests/Auth0.AuthenticationApi.IntegrationTests/Testing/ManagementTestBaseUtils.cs +++ b/tests/Auth0.AuthenticationApi.IntegrationTests/Testing/ManagementTestBaseUtils.cs @@ -25,7 +25,8 @@ public static async Task CleanupAsync(ManagementApiClient client, CleanUpType ty new LogStreamsCleanUpStrategy(client), new RolesCleanUpStrategy(client), new EncryptionKeysCleanupStrategy(client), - new SelfServiceProviderCleanUpStrategy(client) + new SelfServiceProviderCleanUpStrategy(client), + new FormsCleanUpStrategy(client) }; var cleanUpStrategy = strategies.Single(s => s.Type == type); diff --git a/tests/Auth0.IntegrationTests.Shared/CleanUp/CleanUpType.cs b/tests/Auth0.IntegrationTests.Shared/CleanUp/CleanUpType.cs index 413a81be..fb19f582 100644 --- a/tests/Auth0.IntegrationTests.Shared/CleanUp/CleanUpType.cs +++ b/tests/Auth0.IntegrationTests.Shared/CleanUp/CleanUpType.cs @@ -14,6 +14,7 @@ public enum CleanUpType Rules, LogStreams, EncryptionKeys, - SelfServiceProvider + SelfServiceProvider, + Forms } } \ No newline at end of file diff --git a/tests/Auth0.IntegrationTests.Shared/CleanUp/FormsCleanUpStrategy.cs b/tests/Auth0.IntegrationTests.Shared/CleanUp/FormsCleanUpStrategy.cs new file mode 100644 index 00000000..78c06045 --- /dev/null +++ b/tests/Auth0.IntegrationTests.Shared/CleanUp/FormsCleanUpStrategy.cs @@ -0,0 +1,19 @@ +using System.Threading.Tasks; +using Auth0.ManagementApi; + +namespace Auth0.IntegrationTests.Shared.CleanUp +{ + public class FormsCleanUpStrategy : CleanUpStrategy + { + public FormsCleanUpStrategy(ManagementApiClient apiClient) : base(CleanUpType.Forms, apiClient) + { + + } + + public override async Task Run(string id) + { + System.Diagnostics.Debug.WriteLine("Running FormsCleanup"); + await ApiClient.FormsClient.DeleteAsync(id); + } + } +} \ No newline at end of file diff --git a/tests/Auth0.ManagementApi.IntegrationTests/FormsTest.cs b/tests/Auth0.ManagementApi.IntegrationTests/FormsTest.cs new file mode 100644 index 00000000..d5a5c442 --- /dev/null +++ b/tests/Auth0.ManagementApi.IntegrationTests/FormsTest.cs @@ -0,0 +1,110 @@ +using System.Threading.Tasks; +using System.Collections.Generic; +using System.Linq; + +using FluentAssertions; +using Xunit; + +using Auth0.ManagementApi.Models.Forms; +using Auth0.IntegrationTests.Shared.CleanUp; +using Auth0.ManagementApi.IntegrationTests.Testing; + +namespace Auth0.ManagementApi.IntegrationTests +{ + public class FormsTestFixture : TestBaseFixture + { + public override async Task DisposeAsync() + { + foreach (KeyValuePair> entry in identifiers) + { + await ManagementTestBaseUtils.CleanupAsync(ApiClient, entry.Key, entry.Value); + } + + ApiClient.Dispose(); + } + } + + public class FormsTest : IClassFixture + { + FormsTestFixture fixture; + + public FormsTest(FormsTestFixture fixture) + { + this.fixture = fixture; + } + + [Fact] + public async Task Test_forms_crud_sequence() + { + // Create a form + var createRequest = new FormCreateRequest() + { + Ending = new Ending() + { + Coordinates = new Coordinates() + { + X = 10, + Y = 20 + }, + Redirection = new Redirection() + { + Delay = 1, + Target = "sample" + } + }, + Languages = new Languages() + { + Default = "en", + Primary = "en" + }, + Messages = new Messages() + { + Custom = new object(), + Errors = new object() + }, + Style = new Style() + { + Css = "<>" + }, + Translations = new object(), + Name = "Test-Form" + }; + + var createdForm = await fixture.ApiClient.FormsClient.CreateAsync(createRequest); + + var allForms = await fixture.ApiClient.FormsClient.GetAllAsync(new FormsGetRequest() + { + Hydrate = new [] { Hydrate.LINKS} + }); + + allForms.Should().NotBeNull(); + allForms.Count.Should().Be(1); + + var form = await fixture.ApiClient.FormsClient.GetAsync(new FormsGetRequest { Id = allForms.First().Id }); + + form.Should().BeEquivalentTo(createdForm, options => options.ExcludingMissingMembers()); + + var updateRequest = new FormUpdateRequest() + { + Languages = new Languages() + { + Primary = "es" + }, + Ending = new Ending() + { + Redirection = new Redirection() + { + Target = "UpdatedSample" + } + } + }; + + var updatedForm = await fixture.ApiClient.FormsClient.UpdateAsync(createdForm.Id, updateRequest); + + updatedForm.Languages.Primary.Should().Be(updateRequest.Languages.Primary); + updatedForm.Ending.Redirection.Target.Should().Be(updateRequest.Ending.Redirection.Target); + + await fixture.ApiClient.FormsClient.DeleteAsync(allForms.First().Id); + } + } +} \ No newline at end of file diff --git a/tests/Auth0.ManagementApi.IntegrationTests/HooksTests.cs b/tests/Auth0.ManagementApi.IntegrationTests/HooksTests.cs index 7669ea3c..bd9bd221 100644 --- a/tests/Auth0.ManagementApi.IntegrationTests/HooksTests.cs +++ b/tests/Auth0.ManagementApi.IntegrationTests/HooksTests.cs @@ -42,7 +42,7 @@ public HooksTests(HooksTestsFixture fixture) /// only enable/disable it (None of the other properties can be updated). /// Modifying the below test case to work with the existing hooks. /// - [Fact] + [Fact(Skip = "Hooks are deprecated")] public async Task Test_hooks_crud_sequence() { // Get all hooks @@ -67,7 +67,7 @@ public async Task Test_hooks_crud_sequence() hook.Enabled.Should().BeFalse(); } - [Fact] + [Fact(Skip = "Hooks are deprecated")] public async Task Test_when_paging_not_specified_does_not_include_totals() { // Act @@ -77,7 +77,7 @@ public async Task Test_when_paging_not_specified_does_not_include_totals() Assert.Null(hooks.Paging); } - [Fact] + [Fact(Skip = "Hooks are deprecated")] public async Task Test_paging_does_not_include_totals() { // Act @@ -87,7 +87,7 @@ public async Task Test_paging_does_not_include_totals() Assert.Null(hooks.Paging); } - [Fact] + [Fact(Skip = "Hooks are deprecated")] public async Task Test_paging_includes_totals() { // Act @@ -104,7 +104,7 @@ public async Task Test_paging_includes_totals() /// only enable/disable it (None of the other properties can be updated). /// Modifying the below test case to work with the existing hooks. /// - [Fact] + [Fact(Skip = "Hooks are deprecated")] public async Task Test_without_paging() { // Act diff --git a/tests/Auth0.ManagementApi.IntegrationTests/Testing/ManagementTestBaseUtils.cs b/tests/Auth0.ManagementApi.IntegrationTests/Testing/ManagementTestBaseUtils.cs index e6f1df45..50c67a2f 100644 --- a/tests/Auth0.ManagementApi.IntegrationTests/Testing/ManagementTestBaseUtils.cs +++ b/tests/Auth0.ManagementApi.IntegrationTests/Testing/ManagementTestBaseUtils.cs @@ -23,7 +23,8 @@ public static async Task CleanupAsync(ManagementApiClient client, CleanUpType ty new LogStreamsCleanUpStrategy(client), new RolesCleanUpStrategy(client), new EncryptionKeysCleanupStrategy(client), - new SelfServiceProviderCleanUpStrategy(client) + new SelfServiceProviderCleanUpStrategy(client), + new FormsCleanUpStrategy(client) }; var cleanUpStrategy = strategies.Single(s => s.Type == type);