-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: in summary drawers use dropdown to select config format (#3445)
As a continuation of #3414 this brings the dropdown to select the preferred config format to all the other summary drawers. ![image](https://github.com/user-attachments/assets/7fb7f9a1-40a8-42a5-bea4-e83e306ecff6) ![Screenshot 2025-01-22 at 10 47 11](https://github.com/user-attachments/assets/f15b1472-a3fa-49aa-940f-b4bab4fe67de) Part of #3283 --------- Signed-off-by: schogges <[email protected]>
- Loading branch information
Showing
33 changed files
with
1,413 additions
and
850 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
packages/kuma-gui/features/hostname-generators/HostnameGeneratorSummary.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Feature: HostnameGenerator summary | ||
|
||
Background: | ||
Given the CSS selectors | ||
| Alias | Selector | | ||
| summary | [data-testid='summary'] | | ||
| select-preference | $summary [data-testid='select-input'] | | ||
| structured-view | $summary [data-testid='structured-view'] | | ||
|
||
Scenario: Switching to YAML format and back | ||
Given the URL "/hostnamegenerators" responds with | ||
""" | ||
body: | ||
items: | ||
- name: <HostnameGenerator> | ||
""" | ||
When I visit the "/hostname-generators/<HostnameGenerator>" URL | ||
Then the "$select-preference" element exists | ||
And the "$structured-view" element exists | ||
When I click the "$select-preference" element | ||
When I click the "[data-testid='select-item-yaml'] button" element | ||
Then the URL contains "format=yaml" | ||
And the "[data-testid='k-code-block']" element exists | ||
And the "$structured-view" element doesn't exists | ||
When I click the "$select-preference" element | ||
When I click the "[data-testid='select-item-structured'] button" element | ||
Then the URL contains "format=structured" | ||
And the "$structured-view" element exists | ||
|
||
Examples: | ||
| HostnameGenerator | | ||
| local-mesh-external-service | |
40 changes: 40 additions & 0 deletions
40
packages/kuma-gui/features/mesh/builtin-gateways/BuiltinGatewaySummary.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Feature: BuiltinGateway summary | ||
|
||
Background: | ||
Given the CSS selectors | ||
| Alias | Selector | | ||
| summary | [data-testid='summary'] | | ||
| select-preference | $summary [data-testid='select-input'] | | ||
| structured-view | $summary [data-testid='structured-view'] | | ||
And the environment | ||
""" | ||
KUMA_MESHGATEWAY_COUNT: 1 | ||
""" | ||
And the URL "/meshes/default/meshgateways" responds with | ||
""" | ||
body: | ||
items: | ||
- name: gateway-1 | ||
labels: | ||
kuma.io/origin: zone | ||
kuma.io/zone: zone-1 | ||
kuma.io/display-name: gateway-1 | ||
""" | ||
|
||
Scenario: Switching to YAML format and back | ||
When I visit the "<URL>" URL | ||
Then the "$select-preference" element exists | ||
And the "$structured-view" element exists | ||
When I click the "$select-preference" element | ||
When I click the "[data-testid='select-item-yaml'] button" element | ||
Then the URL contains "format=yaml" | ||
And the "[data-testid='k-code-block']" element exists | ||
And the "$structured-view" element doesn't exists | ||
When I click the "$select-preference" element | ||
When I click the "[data-testid='select-item-structured'] button" element | ||
Then the URL contains "format=structured" | ||
And the "$structured-view" element exists | ||
|
||
Examples: | ||
| URL | | ||
| /meshes/default/gateways/builtin/gateway-1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...kuma-gui/features/mesh/services/mesh-external-services/MeshExternalServiceSummary.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Feature: MeshExternalService summary | ||
|
||
Background: | ||
Given the CSS selectors | ||
| Alias | Selector | | ||
| summary | [data-testid='summary'] | | ||
| select-preference | $summary [data-testid='select-input'] | | ||
| structured-view | $summary [data-testid='structured-view'] | | ||
And the environment | ||
""" | ||
KUMA_SERVICE_COUNT: 1 | ||
""" | ||
|
||
Rule: In a namespaced environment | ||
|
||
Background: | ||
Given the environment | ||
""" | ||
KUMA_ENVIRONMENT: kubernetes | ||
""" | ||
And the URL "/meshes/default/meshexternalservices" responds with | ||
""" | ||
body: | ||
items: | ||
- name: monitor-proxy-0.kuma-demo | ||
labels: | ||
kuma.io/display-name: monitor-proxy-0 | ||
k8s.kuma.io/namespace: kuma-demo | ||
""" | ||
|
||
Scenario Outline: Switching to YAML format and back | ||
When I visit the "<URL>" URL | ||
Then the "$select-preference" element exists | ||
And the "$structured-view" element exists | ||
When I click the "$select-preference" element | ||
When I click the "[data-testid='select-item-yaml'] button" element | ||
Then the URL contains "format=yaml" | ||
And the "[data-testid='k-code-block']" element exists | ||
And the "$structured-view" element doesn't exists | ||
When I click the "$select-preference" element | ||
When I click the "[data-testid='select-item-structured'] button" element | ||
Then the URL contains "format=structured" | ||
And the "$structured-view" element exists | ||
|
||
Examples: | ||
| URL | | ||
| /meshes/default/services/mesh-external-services/monitor-proxy-0.kuma-demo | |
47 changes: 47 additions & 0 deletions
47
...a-gui/features/mesh/services/mesh-multi-zone-services/MeshMultiZoneServiceSummary.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Feature: MeshMultiZoneService summary | ||
|
||
Background: | ||
Given the CSS selectors | ||
| Alias | Selector | | ||
| summary | [data-testid='summary'] | | ||
| select-preference | $summary [data-testid='select-input'] | | ||
| structured-view | $summary [data-testid='structured-view'] | | ||
And the environment | ||
""" | ||
KUMA_SERVICE_COUNT: 1 | ||
""" | ||
|
||
Rule: In a namespaced environment | ||
|
||
Background: | ||
Given the environment | ||
""" | ||
KUMA_ENVIRONMENT: kubernetes | ||
""" | ||
And the URL "/meshes/default/meshmultizoneservices" responds with | ||
""" | ||
body: | ||
items: | ||
- name: monitor-proxy-0.kuma-demo | ||
labels: | ||
kuma.io/display-name: monitor-proxy-0 | ||
k8s.kuma.io/namespace: kuma-demo | ||
""" | ||
|
||
Scenario Outline: Switching to YAML format and back | ||
When I visit the "<URL>" URL | ||
Then the "$select-preference" element exists | ||
And the "$structured-view" element exists | ||
When I click the "$select-preference" element | ||
When I click the "[data-testid='select-item-yaml'] button" element | ||
Then the URL contains "format=yaml" | ||
And the "[data-testid='k-code-block']" element exists | ||
And the "$structured-view" element doesn't exists | ||
When I click the "$select-preference" element | ||
When I click the "[data-testid='select-item-structured'] button" element | ||
Then the URL contains "format=structured" | ||
And the "$structured-view" element exists | ||
|
||
Examples: | ||
| URL | | ||
| /meshes/default/services/mesh-multi-zone-services/monitor-proxy-0.kuma-demo | |
47 changes: 47 additions & 0 deletions
47
packages/kuma-gui/features/mesh/services/mesh-services/MeshServiceSummary.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Feature: MeshService summary | ||
|
||
Background: | ||
Given the CSS selectors | ||
| Alias | Selector | | ||
| summary | [data-testid='summary'] | | ||
| select-preference | $summary [data-testid='select-input'] | | ||
| structured-view | $summary [data-testid='structured-view'] | | ||
And the environment | ||
""" | ||
KUMA_SERVICE_COUNT: 1 | ||
""" | ||
|
||
Rule: In a namespaced environment | ||
|
||
Background: | ||
Given the environment | ||
""" | ||
KUMA_ENVIRONMENT: kubernetes | ||
""" | ||
And the URL "/meshes/default/meshservices" responds with | ||
""" | ||
body: | ||
items: | ||
- name: monitor-proxy-0.kuma-demo | ||
labels: | ||
kuma.io/display-name: monitor-proxy-0 | ||
k8s.kuma.io/namespace: kuma-demo | ||
""" | ||
|
||
Scenario Outline: Switching to YAML format and back | ||
When I visit the "<URL>" URL | ||
Then the "$select-preference" element exists | ||
And the "$structured-view" element exists | ||
When I click the "$select-preference" element | ||
When I click the "[data-testid='select-item-yaml'] button" element | ||
Then the URL contains "format=yaml" | ||
And the "[data-testid='k-code-block']" element exists | ||
And the "$structured-view" element doesn't exists | ||
When I click the "$select-preference" element | ||
When I click the "[data-testid='select-item-structured'] button" element | ||
Then the URL contains "format=structured" | ||
And the "$structured-view" element exists | ||
|
||
Examples: | ||
| URL | | ||
| /meshes/default/services/mesh-services/monitor-proxy-0.kuma-demo | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.