Skip to content

Commit

Permalink
Fix/create workspace template (#85)
Browse files Browse the repository at this point in the history
* fix: update create workspace from UI template

* fix: update import default workspace slots renaming

* fix: update tests

---------

Co-authored-by: milan.horvath <[email protected]>
  • Loading branch information
milanhorvath and milan.horvath authored Jun 7, 2024
1 parent 45a28ea commit f2b15b2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/main/resources/template/workspace-create.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"slots": [
{
"name": "menu",
"name": "onecx-shell-vertical-menu",
"components": [
{
"productName": "onecx-workspace",
Expand All @@ -16,7 +16,7 @@
]
},
{
"name": "headerRight",
"name": "onecx-shell-header-right",
"components": [
{
"productName": "onecx-help",
Expand All @@ -26,7 +26,7 @@
]
},
{
"name": "horizontalMenu",
"name": "onecx-shell-horizontal-menu",
"components": [
{
"productName": "onecx-workspace",
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/template/workspace-import.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
],
"slots": [
{
"name": "menu",
"name": "onecx-shell-vertical-menu",
"components": [
{
"productName": "onecx-workspace",
Expand All @@ -69,7 +69,7 @@
]
},
{
"name": "headerRight",
"name": "onecx-shell-header-right",
"components": [
{
"productName": "onecx-help",
Expand All @@ -79,7 +79,7 @@
]
},
{
"name": "horizontalMenu",
"name": "onecx-shell-horizontal-menu",
"components": [
{
"productName": "onecx-workspace",
Expand Down Expand Up @@ -174,4 +174,4 @@
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ void createWorkspaceTest() {

assertThat(slotsResponse.getSlots().get(0)).isNotNull();
var slotMap = slotsResponse.getSlots().stream().collect(Collectors.toMap(SlotDTO::getName, x -> x));
assertThat(slotMap).containsOnlyKeys("menu", "headerRight", "horizontalMenu");
assertThat(slotMap).containsOnlyKeys("onecx-shell-vertical-menu", "onecx-shell-header-right",
"onecx-shell-horizontal-menu");

var productsResponse = given()
.when()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,9 @@ void createWorkspaceFileTest() {
assertThat(slotsResponse.getSlots()).isNotNull().hasSize(3);
assertThat(slotsResponse.getSlots().get(0)).isNotNull();
var slotMap = slotsResponse.getSlots().stream().collect(Collectors.toMap(SlotDTO::getName, x -> x));
assertThat(slotMap).containsOnlyKeys("menu", "headerRight", "horizontalMenu");
assertThat(slotMap.get("menu").getComponents()).isNotNull().hasSize(2);
assertThat(slotMap).containsOnlyKeys("onecx-shell-vertical-menu", "onecx-shell-header-right",
"onecx-shell-horizontal-menu");
assertThat(slotMap.get("onecx-shell-vertical-menu").getComponents()).isNotNull().hasSize(2);

var productsResponse = given()
.when()
Expand Down
6 changes: 3 additions & 3 deletions src/test/resources/template/workspace-create-test.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"slots": [
{
"name": "menu",
"name": "onecx-shell-vertical-menu",
"components": [
{
"productName": "onecx-workspace",
Expand All @@ -16,7 +16,7 @@
]
},
{
"name": "headerRight",
"name": "onecx-shell-header-right",
"components": [
{
"productName": "onecx-help",
Expand All @@ -26,7 +26,7 @@
]
},
{
"name": "horizontalMenu",
"name": "onecx-shell-horizontal-menu",
"components": [
{
"productName": "onecx-workspace",
Expand Down

0 comments on commit f2b15b2

Please sign in to comment.