Skip to content

Commit

Permalink
- migrate some overview control-plane card tests to mesh page
Browse files Browse the repository at this point in the history
  - remove the "no canary" test from overview, it's irrelevant
- add a missing @sleep-app to an overview test
  • Loading branch information
jshaughn committed May 15, 2024
1 parent 94b6cec commit 6ce0d07
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 41 deletions.
7 changes: 7 additions & 0 deletions frontend/cypress/integration/common/mesh_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,14 @@ Then('user sees control plane side panel', () => {
.should('be.visible')
.within(div => {
cy.contains('istiod');
cy.contains('Control plane').should('be.visible');
cy.contains('Outbound policy').should('be.visible');
cy.get('div[data-test="memory-chart"]').should('exist');
cy.get('div[data-test="cpu-chart"]').should('exist');
cy.get('[data-test="label-TLS"]').contains('N/A');
cy.get('[data-test="lockerCA"]').should('exist');
});
cy.get('[data-test="lockerCA"]').trigger('mouseenter').get('[role="tooltip"]').contains('Valid From');
});

Then('user sees data plane side panel', () => {
Expand Down
26 changes: 0 additions & 26 deletions frontend/cypress/integration/common/overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,6 @@ Then(
}
);

Then('user sees the memory chart', () => {
cy.get('div[data-test="memory-chart"]').should('exist');
});

Then('user sees the cpu chart', () => {
cy.get('div[data-test="cpu-chart"]').should('exist');
});

Then('there should be a {string} application indicator in the namespace', function (healthStatus: string) {
cy.get(`[data-test=${this.targetNamespace}-EXPAND] [data-test=overview-app-health]`)
.find('span')
Expand Down Expand Up @@ -246,24 +238,6 @@ Then('the toggle on the right side of the {string} namespace card exists', (ns:
cy.get(`div[data-test^="${ns}"]`).should('exist');
});

Then('the user sees the certificates information', () => {
cy.get('[data-test="lockerCA"]').trigger('mouseenter').get('[role="tooltip"]').contains('Valid From');
});

// We will suppose that the min TLS Version was not set
// So we verify the default
Then('the minimum TLS version', () => {
cy.get('[data-test="label-TLS"]').contains('N/A');
});

Then('the user sees no information related to canary upgrades', () => {
cy.get('[data-test="canary-upgrade"]').should('not.exist');
});

Then('the user sees information related to canary upgrades', () => {
cy.get('[data-test="canary-upgrade"]').should('exist');
});

Then('user sees the {string} cluster badge in the Kiali header', (name: string) => {
cy.get('[data-test="cluster-icon"]').contains(name).should('be.visible');
});
Expand Down
17 changes: 2 additions & 15 deletions frontend/cypress/integration/featureFiles/overview.feature
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Feature: Kiali Overview page
When user selects "Last 10m" time range
And user selects "Outbound" traffic direction
Then user sees the "alpha" namespace with "outbound" traffic "10m"

@error-rates-app
@bookinfo-app
Scenario: The healthy status of a logical mesh application is reported in the overview of a namespace
Expand All @@ -80,7 +80,7 @@ Feature: Kiali Overview page
Then there should be a "healthy" application indicator in the namespace
And the "healthy" application indicator should list the application

@error-rates-app
@sleep-app
Scenario: The idle status of a logical mesh application is reported in the overview of a namespace
Given an idle application in the cluster
When I fetch the overview of the cluster
Expand All @@ -102,21 +102,11 @@ Feature: Kiali Overview page
Then there should be a "degraded" application indicator in the namespace
And the "degraded" application indicator should list the application

@error-rates-app
Scenario: The canary upgrade information is not present when there is no canary configured
Then the user sees no information related to canary upgrades

@error-rates-app
Scenario: The Istio panel should be visible in the control panel
Then user sees the "istio-system" namespace card
And user does not see any cluster badge in the "istio-system" namespace card
And user sees the "Control plane" label in the "istio-system" namespace card
And user sees the "Outbound policy" label in the "istio-system" namespace card
Then the toggle on the right side of the "istio-system" namespace card exists

Scenario: The control plane metrics should be present
Then user sees the memory chart
And user sees the cpu chart

@multi-cluster
Scenario: The badge for local cluster should be visible
Expand All @@ -128,8 +118,6 @@ Feature: Kiali Overview page
And user sees the "istio-system" namespace card in cluster "west"
And user sees the "Control plane" label in both "istio-system" namespace cards
And user sees the "Remote Cluster" label in the "west" "istio-system" namespace card
And user sees the "Outbound policy" label in the "east" "istio-system" namespace card
And user does not see the "Outbound policy" label in the "west" "istio-system" namespace card
And the toggle on the right side of both "istio-system" namespace cards exists
And Istio config should not be available for the "west" "istio-system"
And health should be different for "east" and "west" "istio-system"
Expand Down Expand Up @@ -168,7 +156,6 @@ Feature: Kiali Overview page
Then user sees a "LIST" "bookinfo" namespace
And the "Cluster" column "appears"
And cluster badges for "east" and "west" cluster are visible in the LIST view
And Control Plane metrics should be visible for cluster "east"

#this scenario refers to a bug (https://github.com/kiali/kiali/issues/6504) which is not resolved at the time of writing the scenario
# this scenario refers to a bug (https://github.com/kiali/kiali/issues/6504)
Expand Down

0 comments on commit 6ce0d07

Please sign in to comment.