-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added "Add repo" senario testing (#502)
* Adding start of add repository flow * Adding data-cy instead of css selectors * Saving progress * Adding fixture data * Cleaning the test
- Loading branch information
Showing
14 changed files
with
317 additions
and
5 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
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,53 @@ | ||
describe("Adding repository flow", () => { | ||
const addChartNameInput = "[data-cy='add-chart-name']"; | ||
const addChartUrlInput = "[data-cy='add-chart-url']"; | ||
const addChartRepositoryButton = "[data-cy='add-chart-repository-button']"; | ||
|
||
it("Adding new chart repository", () => { | ||
cy.intercept("GET", "http://localhost:5173/status", { | ||
fixture: "status.json", | ||
}).as("status"); | ||
|
||
cy.intercept("GET", "http://localhost:5173/api/helm/releases", { | ||
fixture: "releases.json", | ||
}).as("releases"); | ||
|
||
cy.visit( | ||
"http://localhost:5173/#/minikube/installed?filteredNamespace=default" | ||
); | ||
|
||
cy.get("[data-cy='navigation-link']").contains("Repository").click(); | ||
cy.get("[data-cy='install-repository-button']").click(); | ||
|
||
cy.get(addChartNameInput).type("Komodorio"); | ||
cy.get(addChartUrlInput).type("https://helm-charts.komodor.io"); | ||
|
||
cy.intercept("GET", "http://localhost:5173/api/helm/repositories", { | ||
fixture: "repositories.json", | ||
}).as("repositories"); | ||
|
||
cy.get(addChartRepositoryButton).click(); | ||
|
||
cy.contains("https://helm-charts.komodor.io"); | ||
|
||
cy.get("[data-cy='chart-viewer-install-button']") | ||
.eq(0) | ||
.click({ force: true }) | ||
.contains("Install") | ||
.click(); | ||
|
||
cy.intercept("POST", "http://localhost:5173/api/helm/releases/default", { | ||
fixture: "defaultReleases.json", | ||
}).as("defaultReleases"); | ||
|
||
cy.intercept( | ||
"GET", | ||
"http://localhost:5173/api/helm/releases/default/helm-dashboard/history", | ||
{ fixture: "history.json" } | ||
).as("history"); | ||
|
||
cy.contains("Confirm").click(); | ||
|
||
cy.wait(["@defaultReleases", "@history"]); | ||
}); | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
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,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "hello@cypress.io", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
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,13 @@ | ||
[ | ||
{ | ||
"revision": 1, | ||
"updated": "2024-01-17T22:39:07.2371554+02:00", | ||
"status": "deployed", | ||
"chart": "helm-dashboard-0.1.10", | ||
"app_version": "1.3.3", | ||
"description": "Install complete", | ||
"chart_name": "helm-dashboard", | ||
"chart_ver": "0.1.10", | ||
"has_tests": true | ||
} | ||
] |
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 @@ | ||
[] |
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,6 @@ | ||
[ | ||
{ | ||
"name": "Komodorio", | ||
"url": "https://helm-charts.komodor.io" | ||
} | ||
] |
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,7 @@ | ||
{ | ||
"CurVer": "0.0.0", | ||
"LatestVer": "v1.3.3", | ||
"Analytics": false, | ||
"CacheHitRatio": 0, | ||
"ClusterMode": false | ||
} |
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,20 @@ | ||
// *********************************************************** | ||
// This example support/e2e.ts is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
import "./commands"; | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
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
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