diff --git a/backend/src/Designer/Controllers/AppDevelopmentController.cs b/backend/src/Designer/Controllers/AppDevelopmentController.cs index 4b7d29b0d9f..745fd9a2b4e 100644 --- a/backend/src/Designer/Controllers/AppDevelopmentController.cs +++ b/backend/src/Designer/Controllers/AppDevelopmentController.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Text.Json.Nodes; using System.Threading; using System.Threading.Tasks; @@ -123,27 +124,24 @@ public async Task SaveFormLayout(string org, string app, [FromQuer if (formLayoutPayload.ComponentIdsChange is not null && !string.IsNullOrEmpty(layoutSetName)) { - foreach (var componentIdChange in formLayoutPayload.ComponentIdsChange) + foreach (var componentIdChange in formLayoutPayload.ComponentIdsChange.Where((componentIdChange) => componentIdChange.OldComponentId != componentIdChange.NewComponentId)) { - if (componentIdChange.OldComponentId != componentIdChange.NewComponentId) + if (componentIdChange.NewComponentId == null) { - if (componentIdChange.NewComponentId == null) + await _mediator.Publish(new ComponentDeletedEvent { - await _mediator.Publish(new ComponentDeletedEvent - { - ComponentId = componentIdChange.OldComponentId, - LayoutSetName = layoutSetName, - EditingContext = editingContext - }, cancellationToken); - } - await _mediator.Publish(new ComponentIdChangedEvent - { - OldComponentId = componentIdChange.OldComponentId, - NewComponentId = componentIdChange.NewComponentId, + ComponentId = componentIdChange.OldComponentId, LayoutSetName = layoutSetName, EditingContext = editingContext }, cancellationToken); } + await _mediator.Publish(new ComponentIdChangedEvent + { + OldComponentId = componentIdChange.OldComponentId, + NewComponentId = componentIdChange.NewComponentId, + LayoutSetName = layoutSetName, + EditingContext = editingContext + }, cancellationToken); } } if (!formLayouts.ContainsKey(layoutName)) @@ -207,24 +205,16 @@ await _mediator.Publish(new LayoutPageDeletedEvent /// Application identifier which is unique within an organisation. /// Name of the layout set the specific layout belongs to /// The current name of the form layout - /// An that observes if operation is cancelled. /// A success message if the save was successful [HttpPost] [Route("form-layout-name/{layoutName}")] - public async Task UpdateFormLayoutName(string org, string app, [FromQuery] string layoutSetName, [FromRoute] string layoutName, [FromBody] string newName, CancellationToken cancellationToken) + public ActionResult UpdateFormLayoutName(string org, string app, [FromQuery] string layoutSetName, [FromRoute] string layoutName, [FromBody] string newName) { try { string developer = AuthenticationHelper.GetDeveloperUserName(HttpContext); var editingContext = AltinnRepoEditingContext.FromOrgRepoDeveloper(org, app, developer); _appDevelopmentService.UpdateFormLayoutName(editingContext, layoutSetName, layoutName, newName); - await _mediator.Publish(new LayoutPageIdChangedEvent - { - EditingContext = editingContext, - LayoutSetName = layoutSetName, - LayoutName = layoutName, - NewLayoutName = newName, - }, cancellationToken); return Ok(); } catch (FileNotFoundException exception) @@ -415,12 +405,6 @@ public async Task UpdateLayoutSetName(string org, string app, [Fro string developer = AuthenticationHelper.GetDeveloperUserName(HttpContext); var editingContext = AltinnRepoEditingContext.FromOrgRepoDeveloper(org, app, developer); LayoutSets layoutSets = await _appDevelopmentService.UpdateLayoutSetName(editingContext, layoutSetIdToUpdate, newLayoutSetName, cancellationToken); - await _mediator.Publish(new LayoutSetIdChangedEvent - { - EditingContext = editingContext, - LayoutSetName = layoutSetIdToUpdate, - NewLayoutSetName = newLayoutSetName, - }, cancellationToken); return Ok(layoutSets); } diff --git a/backend/src/Designer/EventHandlers/ComponentIdChanged/ComponentIdChangedLayoutsHandler.cs b/backend/src/Designer/EventHandlers/ComponentIdChanged/ComponentIdChangedLayoutsHandler.cs index 2de41203bef..ecbfcc46d1e 100644 --- a/backend/src/Designer/EventHandlers/ComponentIdChanged/ComponentIdChangedLayoutsHandler.cs +++ b/backend/src/Designer/EventHandlers/ComponentIdChanged/ComponentIdChangedLayoutsHandler.cs @@ -1,11 +1,9 @@ -using System.Collections.Generic; using System.Linq; using System.Text.Json.Nodes; using System.Threading; using System.Threading.Tasks; using Altinn.Studio.Designer.Events; using Altinn.Studio.Designer.Hubs.SyncHub; -using Altinn.Studio.Designer.Models; using Altinn.Studio.Designer.Services.Interfaces; using MediatR; @@ -15,7 +13,6 @@ public class ComponentIdChangedLayoutsHandler : INotificationHandler referencesToUpdate = [new Reference("component", notification.LayoutSetName, notification.OldComponentId, notification.NewComponentId)]; - hasChanges |= await _appDevelopmentService.UpdateLayoutReferences(notification.EditingContext, referencesToUpdate, cancellationToken); - return hasChanges; }); } diff --git a/backend/src/Designer/EventHandlers/LayoutPageIdChanged/LayoutPageIdChangedLayoutsHandler.cs b/backend/src/Designer/EventHandlers/LayoutPageIdChanged/LayoutPageIdChangedLayoutsHandler.cs deleted file mode 100644 index 7772a125cf1..00000000000 --- a/backend/src/Designer/EventHandlers/LayoutPageIdChanged/LayoutPageIdChangedLayoutsHandler.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Altinn.Studio.Designer.Events; -using Altinn.Studio.Designer.Hubs.SyncHub; -using Altinn.Studio.Designer.Models; -using Altinn.Studio.Designer.Services.Interfaces; -using MediatR; - -namespace Altinn.Studio.Designer.EventHandlers.LayoutPageDeleted; - -public class LayoutPageIdChangedLayoutsHandler(IFileSyncHandlerExecutor fileSyncHandlerExecutor, IAppDevelopmentService appDevelopmentService) : INotificationHandler -{ - public async Task Handle(LayoutPageIdChangedEvent notification, CancellationToken cancellationToken) - { - await fileSyncHandlerExecutor.ExecuteWithExceptionHandlingAndConditionalNotification( - notification.EditingContext, - SyncErrorCodes.LayoutPageIdChangedLayoutsSyncError, - "layouts", - async () => - { - List referencesToUpdate = [new Reference("page", notification.LayoutSetName, notification.LayoutName, notification.NewLayoutName)]; - return await appDevelopmentService.UpdateLayoutReferences(notification.EditingContext, referencesToUpdate, cancellationToken); - }); - } -} diff --git a/backend/src/Designer/EventHandlers/LayoutSetIdChanged/LayoutSetIdChangedLayoutsHandler.cs b/backend/src/Designer/EventHandlers/LayoutSetIdChanged/LayoutSetIdChangedLayoutsHandler.cs deleted file mode 100644 index 6502bd03b6e..00000000000 --- a/backend/src/Designer/EventHandlers/LayoutSetIdChanged/LayoutSetIdChangedLayoutsHandler.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Altinn.Studio.Designer.Events; -using Altinn.Studio.Designer.Hubs.SyncHub; -using Altinn.Studio.Designer.Models; -using Altinn.Studio.Designer.Services.Interfaces; -using MediatR; - -namespace Altinn.Studio.Designer.EventHandlers.LayoutSetDeleted; - -public class LayoutSetIdChangedLayoutsHandler(IFileSyncHandlerExecutor fileSyncHandlerExecutor, IAppDevelopmentService appDevelopmentService) : INotificationHandler -{ - public async Task Handle(LayoutSetIdChangedEvent notification, CancellationToken cancellationToken) - { - await fileSyncHandlerExecutor.ExecuteWithExceptionHandlingAndConditionalNotification( - notification.EditingContext, - SyncErrorCodes.LayoutSetIdChangedLayoutsSyncError, - "layouts", - async () => - { - List referencesToUpdate = [new Reference("layoutSet", notification.LayoutSetName, notification.LayoutSetName, notification.NewLayoutSetName)]; - return await appDevelopmentService.UpdateLayoutReferences(notification.EditingContext, referencesToUpdate, cancellationToken); - }); - } -} diff --git a/backend/src/Designer/EventHandlers/ProcessTaskIdChanged/ProcessTaskIdChangedLayoutsHandler.cs b/backend/src/Designer/EventHandlers/ProcessTaskIdChanged/ProcessTaskIdChangedLayoutsHandler.cs index 0b67fa7a885..acee366380d 100644 --- a/backend/src/Designer/EventHandlers/ProcessTaskIdChanged/ProcessTaskIdChangedLayoutsHandler.cs +++ b/backend/src/Designer/EventHandlers/ProcessTaskIdChanged/ProcessTaskIdChangedLayoutsHandler.cs @@ -1,9 +1,10 @@ -using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text.Json.Nodes; using System.Threading; using System.Threading.Tasks; using Altinn.Studio.Designer.Events; using Altinn.Studio.Designer.Hubs.SyncHub; -using Altinn.Studio.Designer.Models; using Altinn.Studio.Designer.Services.Interfaces; using MediatR; @@ -11,25 +12,90 @@ namespace Altinn.Studio.Designer.EventHandlers.ProcessTaskIdChanged; public class ProcessTaskIdChangedLayoutsHandler : INotificationHandler { + private readonly IAltinnGitRepositoryFactory _altinnGitRepositoryFactory; private readonly IFileSyncHandlerExecutor _fileSyncHandlerExecutor; - private readonly IAppDevelopmentService _appDevelopmentService; - public ProcessTaskIdChangedLayoutsHandler(IFileSyncHandlerExecutor fileSyncHandlerExecutor, IAppDevelopmentService appDevelopmentService) + public ProcessTaskIdChangedLayoutsHandler(IAltinnGitRepositoryFactory altinnGitRepositoryFactory, + IFileSyncHandlerExecutor fileSyncHandlerExecutor) { + _altinnGitRepositoryFactory = altinnGitRepositoryFactory; _fileSyncHandlerExecutor = fileSyncHandlerExecutor; - _appDevelopmentService = appDevelopmentService; } public async Task Handle(ProcessTaskIdChangedEvent notification, CancellationToken cancellationToken) { - await _fileSyncHandlerExecutor.ExecuteWithExceptionHandlingAndConditionalNotification( - notification.EditingContext, - SyncErrorCodes.LayoutTaskIdSyncError, - "layouts", - async () => + var repository = _altinnGitRepositoryFactory.GetAltinnAppGitRepository( + notification.EditingContext.Org, + notification.EditingContext.Repo, + notification.EditingContext.Developer); + + if (!repository.AppUsesLayoutSets()) + { + return; + } + + var layoutSetsFile = await repository.GetLayoutSetsFile(cancellationToken); + + foreach (string layoutSetName in layoutSetsFile.Sets.Select(layoutSet => layoutSet.Id)) + { + string[] layoutNames; + try + { + layoutNames = repository.GetLayoutNames(layoutSetName); + } + catch (FileNotFoundException) { - List referencesToUpdate = [new Reference("task", null, notification.OldId, notification.NewId)]; - return await _appDevelopmentService.UpdateLayoutReferences(notification.EditingContext, referencesToUpdate, cancellationToken); - }); + continue; + } + + await _fileSyncHandlerExecutor.ExecuteWithExceptionHandlingAndConditionalNotification( + notification.EditingContext, + SyncErrorCodes.LayoutTaskIdSyncError, + $"App/ui/{layoutSetName}/layouts", + async () => + { + bool hasChanged = false; + + foreach (string layoutName in layoutNames) + { + var layout = await repository.GetLayout(layoutSetName, layoutName, cancellationToken); + if (TryChangeLayoutTaskIds(layout, notification.OldId, notification.NewId)) + { + await repository.SaveLayout(layoutSetName, layoutName, layout, cancellationToken); + hasChanged = true; + } + } + + return hasChanged; + }); + } + } + + private static bool TryChangeLayoutTaskIds(JsonNode node, string oldId, string newId) + { + bool hasChanged = false; + + if (node is JsonObject jsonObject) + { + foreach (var property in jsonObject.ToList()) + { + if (property.Key == "taskId" && property.Value?.ToString() == oldId) + { + jsonObject["taskId"] = newId; + hasChanged = true; + } + + hasChanged |= TryChangeLayoutTaskIds(property.Value, oldId, newId); + } + } + else if (node is JsonArray jsonArray) + { + foreach (var element in jsonArray) + { + hasChanged |= TryChangeLayoutTaskIds(element, oldId, newId); + } + } + + return hasChanged; } } diff --git a/backend/src/Designer/Events/LayoutPageIdChangedEvent.cs b/backend/src/Designer/Events/LayoutPageIdChangedEvent.cs deleted file mode 100644 index 4059f3ab287..00000000000 --- a/backend/src/Designer/Events/LayoutPageIdChangedEvent.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Altinn.Studio.Designer.Models; -using MediatR; - -namespace Altinn.Studio.Designer.Events; - -public class LayoutPageIdChangedEvent : INotification -{ - public AltinnRepoEditingContext EditingContext { get; set; } - public string LayoutSetName { get; set; } - public string LayoutName { get; set; } - public string NewLayoutName { get; set; } -} diff --git a/backend/src/Designer/Events/LayoutSetIdChangedEvent.cs b/backend/src/Designer/Events/LayoutSetIdChangedEvent.cs deleted file mode 100644 index 1f327277588..00000000000 --- a/backend/src/Designer/Events/LayoutSetIdChangedEvent.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Altinn.Studio.Designer.Models; -using MediatR; - -namespace Altinn.Studio.Designer.Events; - -public class LayoutSetIdChangedEvent : INotification -{ - public AltinnRepoEditingContext EditingContext { get; set; } - public string LayoutSetName { get; set; } - public string NewLayoutSetName { get; set; } -} diff --git a/backend/src/Designer/Hubs/SyncHub/SyncErrorCodes.cs b/backend/src/Designer/Hubs/SyncHub/SyncErrorCodes.cs index d4811e1a898..04178d4eb7e 100644 --- a/backend/src/Designer/Hubs/SyncHub/SyncErrorCodes.cs +++ b/backend/src/Designer/Hubs/SyncHub/SyncErrorCodes.cs @@ -10,11 +10,9 @@ public static class SyncErrorCodes public const string LayoutSetsDataTypeSyncError = nameof(LayoutSetsDataTypeSyncError); public const string LayoutSetComponentIdSyncError = nameof(LayoutSetComponentIdSyncError); public const string LayoutSetDeletedLayoutsSyncError = nameof(LayoutSetDeletedLayoutsSyncError); - public const string LayoutSetIdChangedLayoutsSyncError = nameof(LayoutSetIdChangedLayoutsSyncError); public const string LayoutSetSubFormButtonSyncError = nameof(LayoutSetSubFormButtonSyncError); public const string SettingsComponentIdSyncError = nameof(SettingsComponentIdSyncError); public const string LayoutPageAddSyncError = nameof(LayoutPageAddSyncError); public const string ComponentDeletedLayoutsSyncError = nameof(ComponentDeletedLayoutsSyncError); public const string LayoutPageDeletedLayoutsSyncError = nameof(LayoutPageDeletedLayoutsSyncError); - public const string LayoutPageIdChangedLayoutsSyncError = nameof(LayoutPageIdChangedLayoutsSyncError); } diff --git a/backend/src/Designer/Services/Implementation/AppDevelopmentService.cs b/backend/src/Designer/Services/Implementation/AppDevelopmentService.cs index 169440d9287..6b7cb76324e 100644 --- a/backend/src/Designer/Services/Implementation/AppDevelopmentService.cs +++ b/backend/src/Designer/Services/Implementation/AppDevelopmentService.cs @@ -612,17 +612,11 @@ private async Task UpdateLayoutReferences(AltinnAppGitRepository altinnApp bool hasChanges = false; var deletedReferences = referencesToUpdate.Where(item => string.IsNullOrEmpty(item.NewId)).ToList(); - var updatedReferences = referencesToUpdate.Where(item => !string.IsNullOrEmpty(item.NewId)).ToList(); var deletedLayoutsSetIds = deletedReferences.Where(item => item.Type == "layoutSet").Select(item => item.Id).ToList(); var deletedLayouts = deletedReferences.Where(item => item.Type == "page").ToList(); var deletedComponents = deletedReferences.Where(item => item.Type == "component").ToList(); - var updatedTasks = updatedReferences.Where(item => item.Type == "task").ToList(); - var updatedLayoutsSets = updatedReferences.Where(item => item.Type == "layoutSet").ToList(); - var updatedLayouts = updatedReferences.Where(item => item.Type == "page").ToList(); - var updatedComponents = updatedReferences.Where(item => item.Type == "component").ToList(); - foreach (LayoutSetConfig layoutSet in layoutSets ?? [new() { Id = null }]) { bool isLayoutSetDeleted = deletedLayoutsSetIds.Contains(layoutSet.Id); @@ -642,7 +636,6 @@ private async Task UpdateLayoutReferences(AltinnAppGitRepository altinnApp } var deletedComponentIdsFromCurrentLayoutSet = deletedComponents.Where(item => item.LayoutSetName == layoutSet.Id && string.IsNullOrEmpty(item.NewId)).Select(item => item.Id).ToList(); - var updatedComponentsFromCurrentLayoutSet = updatedComponents.Where(item => item.LayoutSetName == layoutSet.Id && !string.IsNullOrEmpty(item.NewId)).ToList(); if (data["layout"] is JsonArray componentList) { @@ -662,15 +655,6 @@ private async Task UpdateLayoutReferences(AltinnAppGitRepository altinnApp componentList.RemoveAt(i); hasLayoutChanges = true; } - else - { - Reference updatedReference = updatedComponentsFromCurrentLayoutSet.FirstOrDefault(item => item.Id == componentId); - if (updatedReference != null) - { - component["id"] = updatedReference.NewId; - hasLayoutChanges = true; - } - } if (isLayoutSetDeleted || isLayoutDeleted || isComponentDeleted) { @@ -693,15 +677,6 @@ private async Task UpdateLayoutReferences(AltinnAppGitRepository altinnApp componentList.RemoveAt(i); hasLayoutChanges = true; } - else - { - Reference updatedReference = updatedLayoutsSets.FirstOrDefault(item => item.Id == subformLayoutSet); - if (updatedReference != null) - { - component["layoutSet"] = updatedReference.NewId; - hasLayoutChanges = true; - } - } break; case "Summary2": if (component["target"] is JsonObject target) @@ -721,34 +696,6 @@ private async Task UpdateLayoutReferences(AltinnAppGitRepository altinnApp componentList.RemoveAt(i); hasLayoutChanges = true; } - else - { - Reference updatedReference = null; - switch (type) - { - case "page": - updatedReference = updatedLayouts.FirstOrDefault(item => item.LayoutSetName == layoutSetId && item.Id == id); - break; - case "component": - updatedReference = updatedComponents.FirstOrDefault(item => item.LayoutSetName == layoutSetId && item.Id == id); - break; - } - if (updatedReference != null) - { - target["id"] = updatedReference.NewId; - hasLayoutChanges = true; - } - - if (!string.IsNullOrEmpty(taskId)) - { - updatedReference = updatedTasks.FirstOrDefault(item => item.Id == taskId); - if (updatedReference != null) - { - target["taskId"] = updatedReference.NewId; - hasLayoutChanges = true; - } - } - } if (component["overrides"] is JsonArray overrideList) { @@ -761,15 +708,6 @@ private async Task UpdateLayoutReferences(AltinnAppGitRepository altinnApp overrideList.RemoveAt(j); hasLayoutChanges = true; } - else - { - Reference updatedReference = updatedComponents.FirstOrDefault(item => item.LayoutSetName == layoutSetId && item.Id == overrideComponentId); - if (updatedReference != null) - { - overrideItem["componentId"] = updatedReference.NewId; - hasLayoutChanges = true; - } - } if (overrideList.Count == 0) { diff --git a/backend/src/Designer/Services/Interfaces/IAppDevelopmentService.cs b/backend/src/Designer/Services/Interfaces/IAppDevelopmentService.cs index de0541624ae..11e656b1ec0 100644 --- a/backend/src/Designer/Services/Interfaces/IAppDevelopmentService.cs +++ b/backend/src/Designer/Services/Interfaces/IAppDevelopmentService.cs @@ -218,8 +218,8 @@ public Task GetModelMetadata( /// Update layout references /// /// An . - /// The references to delete. + /// The references to update. /// An that observes if operation is cancelled. - public Task UpdateLayoutReferences(AltinnRepoEditingContext altinnRepoEditingContext, List referencesToDelete, CancellationToken cancellationToken); + public Task UpdateLayoutReferences(AltinnRepoEditingContext altinnRepoEditingContext, List referencesToUpdate, CancellationToken cancellationToken); } } diff --git a/backend/tests/Designer.Tests/Controllers/AppDevelopmentController/SaveFormLayoutTests.cs b/backend/tests/Designer.Tests/Controllers/AppDevelopmentController/SaveFormLayoutTests.cs index 0ad67ba963f..9244a74ddd9 100644 --- a/backend/tests/Designer.Tests/Controllers/AppDevelopmentController/SaveFormLayoutTests.cs +++ b/backend/tests/Designer.Tests/Controllers/AppDevelopmentController/SaveFormLayoutTests.cs @@ -139,49 +139,6 @@ public async Task SaveFormLayoutWithDeletedComponent_DeletesAssociatedSummary2Co }); } - [Theory] - [InlineData("ttd", "testUser", "component", "Side2", "Input-Om7N3y", "Input-Om7N3y-new")] - public async Task SaveFormLayoutWithUpdatedComponentName_UpdatesAssociatedSummary2Components_ReturnsOk(string org, string developer, string layoutSetName, string layoutName, string componentId, string newComponentId) - { - string actualApp = "app-with-summary2-components"; - string app = TestDataHelper.GenerateTestRepoName(); - await CopyRepositoryForTest(org, actualApp, developer, app); - - string layout = TestDataHelper.GetFileFromRepo(org, app, developer, $"App/ui/{layoutSetName}/layouts/{layoutName}.json"); - JsonNode layoutWithUpdatedComponent = JsonNode.Parse(layout); - - string url = $"{VersionPrefix(org, app)}/form-layout/{layoutName}?layoutSetName={layoutSetName}"; - var payload = new JsonObject - { - ["componentIdsChange"] = new JsonArray() { - new JsonObject - { - ["oldComponentId"] = componentId, - ["newComponentId"] = newComponentId, - } - }, - ["layout"] = layoutWithUpdatedComponent - }; - HttpResponseMessage response = await SendHttpRequest(url, payload); - response.StatusCode.Should().Be(HttpStatusCode.OK); - - string expectedApp = "app-with-summary2-components-after-updating-references"; - - string[] layoutPaths = [ - "component/layouts/Side1.json", - "component/layouts/Side2.json", - "component2/layouts/Side1.json", - "component2/layouts/Side2.json" - ]; - - layoutPaths.ToList().ForEach(file => - { - string actual = TestDataHelper.GetFileFromRepo(org, app, developer, $"App/ui/{file}"); - string expected = TestDataHelper.GetFileFromRepo(org, expectedApp, developer, $"App/ui/{file}"); - JsonUtils.DeepEquals(actual, expected).Should().BeTrue(); - }); - } - [Theory] [InlineData("ttd", "app-with-layoutsets", "testUser", "testLayout", "layoutSet1", "TestData/App/ui/layoutWithUnknownProperties.json")] public async Task SaveFormLayoutWithNewPageLanguageUpdate_ReturnsOk(string org, string app, string developer, string layoutName, string layoutSetName, string layoutPath) diff --git a/backend/tests/Designer.Tests/Controllers/AppDevelopmentController/UpdateFormLayoutNameTests.cs b/backend/tests/Designer.Tests/Controllers/AppDevelopmentController/UpdateFormLayoutNameTests.cs index f207d9da541..4f5ebe84218 100644 --- a/backend/tests/Designer.Tests/Controllers/AppDevelopmentController/UpdateFormLayoutNameTests.cs +++ b/backend/tests/Designer.Tests/Controllers/AppDevelopmentController/UpdateFormLayoutNameTests.cs @@ -71,38 +71,5 @@ public async Task UpdateFormLayoutName_NonExistingName_ShouldReturnNotFound(stri response.StatusCode.Should().Be(HttpStatusCode.NotFound); } - [Theory] - [InlineData("ttd", "testUser", "layout", "Side2", "Side2-new")] - public async Task UpdateFormLayoutName_UpdatesAssociatedSummary2Components_ReturnsOk(string org, string developer, string layoutSetName, string layoutName, string newLayoutName) - { - string actualApp = "app-with-summary2-components"; - string app = TestDataHelper.GenerateTestRepoName(); - await CopyRepositoryForTest(org, actualApp, developer, app); - - string url = $"{VersionPrefix(org, app)}/form-layout-name/{layoutName}?layoutSetName={layoutSetName}"; - using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, url) - { - Content = new StringContent($"\"{newLayoutName}\"", Encoding.UTF8, MediaTypeNames.Application.Json) - }; - - using var response = await HttpClient.SendAsync(httpRequestMessage); - response.StatusCode.Should().Be(HttpStatusCode.OK); - - string expectedApp = "app-with-summary2-components-after-updating-references"; - - string[] layoutPaths = [ - "layout/layouts/Side1.json", - "layout/layouts/Side2.json", - "layout2/layouts/Side1.json", - "layout2/layouts/Side2.json", - ]; - - layoutPaths.ToList().ForEach(file => - { - string actual = TestDataHelper.GetFileFromRepo(org, app, developer, $"App/ui/{file}"); - string expected = TestDataHelper.GetFileFromRepo(org, expectedApp, developer, $"App/ui/{file}"); - JsonUtils.DeepEquals(actual, expected).Should().BeTrue(); - }); - } } } diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component/Settings.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component/Settings.json deleted file mode 100644 index 6bb44cf6db8..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component/Settings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://altinncdn.no/schemas/json/layout/layoutSettings.schema.v1.json", - "pages": { - "order": [ - "Side1", - "Side2" - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component/layouts/Side1.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component/layouts/Side1.json deleted file mode 100644 index 6345da9bdc3..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component/layouts/Side1.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", - "data": { - "layout": [ - { - "target": { - "type": "layoutSet", - "id": "", - "taskId": "" - }, - "id": "Summary2-9iG1lB", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side1", - "taskId": "" - }, - "id": "Summary2-R8HsuB", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side2", - "taskId": "" - }, - "id": "Summary2-mL8NjJ", - "type": "Summary2", - "overrides": [ - { - "componentId": "Input-Om7N3y-new", - "displayType": "string" - } - ] - }, - { - "target": { - "type": "component", - "id": "Input-qWr0oa", - "taskId": "" - }, - "id": "Summary2-0BV88Q", - "type": "Summary2" - }, - { - "target": { - "type": "component", - "id": "Input-Om7N3y-new", - "taskId": "" - }, - "id": "Summary2-dTepe0", - "type": "Summary2" - }, - { - "id": "NavigationButtons-DfcNol", - "showBackButton": true, - "textResourceBindings": {}, - "type": "NavigationButtons" - } - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component/layouts/Side2.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component/layouts/Side2.json deleted file mode 100644 index ec9bc398b4b..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component/layouts/Side2.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", - "data": { - "layout": [ - { - "dataModelBindings": { - "simpleBinding": "" - }, - "id": "Input-Om7N3y-new", - "type": "Input" - }, - { - "dataModelBindings": { - "simpleBinding": "" - }, - "id": "Input-qWr0oa", - "type": "Input" - }, - { - "id": "NavigationButtons-GAW8Dx", - "showBackButton": true, - "textResourceBindings": {}, - "type": "NavigationButtons" - } - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component2/Settings.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component2/Settings.json deleted file mode 100644 index 6bb44cf6db8..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component2/Settings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://altinncdn.no/schemas/json/layout/layoutSettings.schema.v1.json", - "pages": { - "order": [ - "Side1", - "Side2" - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component2/layouts/Side1.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component2/layouts/Side1.json deleted file mode 100644 index 8489464261c..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component2/layouts/Side1.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", - "data": { - "layout": [ - { - "dataModelBindings": { - "simpleBinding": "" - }, - "id": "Input-LCr3oK", - "type": "Input" - }, - { - "target": { - "type": "layoutSet", - "id": "", - "taskId": "" - }, - "id": "Summary2-eoT5QK", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side1", - "taskId": "" - }, - "id": "Summary2-NJfE92", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side2", - "taskId": "" - }, - "id": "Summary2-BGHvph", - "type": "Summary2" - }, - { - "target": { - "type": "component", - "id": "Input-LCr3oK", - "taskId": "" - }, - "id": "Summary2-rb2ml2", - "type": "Summary2" - }, - { - "id": "NavigationButtons-t7UTGJ", - "showBackButton": true, - "textResourceBindings": {}, - "type": "NavigationButtons" - } - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component2/layouts/Side2.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component2/layouts/Side2.json deleted file mode 100644 index 6fc08c2ad27..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/component2/layouts/Side2.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", - "data": { - "layout": [ - { - "target": { - "type": "layoutSet", - "id": "", - "taskId": "component" - }, - "id": "Summary2-2FSqcf", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side1", - "taskId": "component" - }, - "id": "Summary2-eGrDpP", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side2", - "taskId": "component" - }, - "id": "Summary2-uJDgMu", - "type": "Summary2", - "overrides": [ - { - "componentId": "Input-Om7N3y-new", - "displayType": "string" - } - ] - }, - { - "target": { - "type": "component", - "id": "Input-qWr0oa", - "taskId": "component" - }, - "id": "Summary2-2JiT3P", - "type": "Summary2" - }, - { - "target": { - "type": "component", - "id": "Input-Om7N3y-new", - "taskId": "component" - }, - "id": "Summary2-vIXkWO", - "type": "Summary2" - }, - { - "id": "NavigationButtons-BYcvaT", - "showBackButton": true, - "textResourceBindings": {}, - "type": "NavigationButtons" - } - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout-sets.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout-sets.json deleted file mode 100644 index b28d6340c73..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout-sets.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout-sets.schema.v1.json", - "sets": [ - { - "id": "component", - "tasks": [ - "component" - ] - }, - { - "id": "layout", - "tasks": [ - "layout" - ] - }, - { - "id": "layoutSet-new", - "tasks": [ - "layoutSet-new" - ] - }, - { - "id": "component2", - "tasks": [ - "component2" - ] - }, - { - "id": "layout2", - "tasks": [ - "layout2" - ] - }, - { - "id": "layoutSet2", - "tasks": [ - "layoutSet2" - ] - } - ], - "uiSettings": {} -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout/Settings.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout/Settings.json deleted file mode 100644 index 4668d52f882..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout/Settings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://altinncdn.no/schemas/json/layout/layoutSettings.schema.v1.json", - "pages": { - "order": [ - "Side1", - "Side2-new" - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout/layouts/Side1.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout/layouts/Side1.json deleted file mode 100644 index e9968cf6512..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout/layouts/Side1.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", - "data": { - "layout": [ - { - "target": { - "type": "layoutSet", - "id": "", - "taskId": "" - }, - "id": "Summary2-FEI1HC", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side1", - "taskId": "" - }, - "id": "Summary2-e2yYpk", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side2-new", - "taskId": "" - }, - "id": "Summary2-qOn2O1", - "type": "Summary2" - }, - { - "target": { - "type": "component", - "id": "Input-AVRSNf", - "taskId": "" - }, - "id": "Summary2-da0Tq6", - "type": "Summary2" - }, - { - "id": "NavigationButtons-7g3XcW", - "showBackButton": true, - "textResourceBindings": {}, - "type": "NavigationButtons" - } - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout/layouts/Side2-new.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout/layouts/Side2-new.json deleted file mode 100644 index 8b8ea337e26..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout/layouts/Side2-new.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", - "data": { - "layout": [ - { - "dataModelBindings": { - "simpleBinding": "" - }, - "id": "Input-AVRSNf", - "type": "Input" - }, - { - "id": "NavigationButtons-wDmNQu", - "showBackButton": true, - "textResourceBindings": {}, - "type": "NavigationButtons" - } - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout2/Settings.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout2/Settings.json deleted file mode 100644 index 6bb44cf6db8..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout2/Settings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://altinncdn.no/schemas/json/layout/layoutSettings.schema.v1.json", - "pages": { - "order": [ - "Side1", - "Side2" - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout2/layouts/Side1.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout2/layouts/Side1.json deleted file mode 100644 index 2530921cc4e..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout2/layouts/Side1.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", - "data": { - "layout": [ - { - "dataModelBindings": { - "simpleBinding": "" - }, - "id": "Input-QCSonu", - "type": "Input" - }, - { - "target": { - "type": "layoutSet", - "id": "" - }, - "id": "Summary2-18hFaH", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side1" - }, - "id": "Summary2-iZJ80j", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side2", - "taskId": "" - }, - "id": "Summary2-V55C6Q", - "type": "Summary2" - }, - { - "target": { - "type": "component", - "id": "Input-QCSonu" - }, - "id": "Summary2-aI91Tv", - "type": "Summary2" - }, - { - "id": "NavigationButtons-2hGPi1", - "showBackButton": true, - "textResourceBindings": {}, - "type": "NavigationButtons" - } - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout2/layouts/Side2.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout2/layouts/Side2.json deleted file mode 100644 index 223f8377420..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layout2/layouts/Side2.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", - "data": { - "layout": [ - { - "target": { - "type": "layoutSet", - "id": "", - "taskId": "layout" - }, - "id": "Summary2-MfRiX8", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side1", - "taskId": "layout" - }, - "id": "Summary2-66YavC", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side2-new", - "taskId": "layout" - }, - "id": "Summary2-bmqvUb", - "type": "Summary2" - }, - { - "target": { - "type": "component", - "id": "Input-AVRSNf", - "taskId": "layout" - }, - "id": "Summary2-uuKXTD", - "type": "Summary2" - }, - { - "id": "NavigationButtons-h0g3Wt", - "showBackButton": true, - "textResourceBindings": {}, - "type": "NavigationButtons" - } - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet-new/Settings.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet-new/Settings.json deleted file mode 100644 index 6bb44cf6db8..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet-new/Settings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://altinncdn.no/schemas/json/layout/layoutSettings.schema.v1.json", - "pages": { - "order": [ - "Side1", - "Side2" - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet-new/layouts/Side1.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet-new/layouts/Side1.json deleted file mode 100644 index 48f8a1f9cf7..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet-new/layouts/Side1.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", - "data": { - "layout": [ - { - "id": "NavigationButtons-n2jUp6", - "showBackButton": true, - "textResourceBindings": {}, - "type": "NavigationButtons" - } - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet-new/layouts/Side2.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet-new/layouts/Side2.json deleted file mode 100644 index 6fa6e9455ff..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet-new/layouts/Side2.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", - "data": { - "layout": [ - { - "dataModelBindings": { - "simpleBinding": "" - }, - "id": "Input-hqcYqo", - "type": "Input" - }, - { - "id": "NavigationButtons-QzkEka", - "showBackButton": true, - "textResourceBindings": {}, - "type": "NavigationButtons" - } - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet2/Settings.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet2/Settings.json deleted file mode 100644 index 6bb44cf6db8..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet2/Settings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://altinncdn.no/schemas/json/layout/layoutSettings.schema.v1.json", - "pages": { - "order": [ - "Side1", - "Side2" - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet2/layouts/Side1.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet2/layouts/Side1.json deleted file mode 100644 index 60fc1029c15..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet2/layouts/Side1.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", - "data": { - "layout": [ - { - "dataModelBindings": { - "simpleBinding": "" - }, - "id": "Input-wrspcN", - "type": "Input" - }, - { - "target": { - "type": "layoutSet", - "id": "" - }, - "id": "Summary2-00SFBO", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side1" - }, - "id": "Summary2-4069IB", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side2", - "taskId": "" - }, - "id": "Summary2-Orxmu1", - "type": "Summary2" - }, - { - "target": { - "type": "component", - "id": "Input-wrspcN", - "taskId": "" - }, - "id": "Summary2-2YoJGY", - "type": "Summary2" - }, - { - "id": "NavigationButtons-KnXA9y", - "showBackButton": true, - "textResourceBindings": {}, - "type": "NavigationButtons" - } - ] - } -} \ No newline at end of file diff --git a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet2/layouts/Side2.json b/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet2/layouts/Side2.json deleted file mode 100644 index b6351845ad5..00000000000 --- a/backend/tests/Designer.Tests/_TestData/Repositories/testUser/ttd/app-with-summary2-components-after-updating-references/App/ui/layoutSet2/layouts/Side2.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://altinncdn.no/toolkits/altinn-app-frontend/4/schemas/json/layout/layout.schema.v1.json", - "data": { - "layout": [ - { - "target": { - "type": "layoutSet", - "id": "", - "taskId": "layoutSet-new" - }, - "id": "Summary2-6VQ3LC", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side1", - "taskId": "layoutSet-new" - }, - "id": "Summary2-LZxPWb", - "type": "Summary2" - }, - { - "target": { - "type": "page", - "id": "Side2", - "taskId": "layoutSet-new" - }, - "id": "Summary2-El9z2Y", - "type": "Summary2" - }, - { - "target": { - "type": "component", - "id": "Input-hqcYqo", - "taskId": "layoutSet-new" - }, - "id": "Summary2-SMqpYV", - "type": "Summary2" - }, - { - "id": "NavigationButtons-5ukC2N", - "showBackButton": true, - "textResourceBindings": {}, - "type": "NavigationButtons" - } - ] - } -} \ No newline at end of file