Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update page redirection to Desired State on OSS #5277

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelogs/unreleased/4835-redirect-OSS.yml
@@ -0,0 +1,6 @@
description: "Redirect the user to the Desired State page on Environment Creation on OSS, instead of Compile Reports page."
issue-nr: 4835
change-type: patch
destination-branches: [master, iso6]
sections:
minor-improvement: "{{description}}"
6 changes: 6 additions & 0 deletions changelogs/unreleased/5269-dependabot.yml
@@ -0,0 +1,6 @@
change-type: patch
description: 'Build(deps-dev): Bump @types/react-dom from 18.2.8 to 18.2.15'
destination-branches:
- master
- iso6
sections: {}
11 changes: 10 additions & 1 deletion cypress/e2e/scenario-1-environment.cy.js
Expand Up @@ -121,7 +121,16 @@ describe("Environment", () => {

cy.get("button").contains("Submit").click();
cy.wait(1000);
// TODO : Add test to check redirection to right page.
// test to check redirection to right page. OSS it should be the Desired state page instead of the service catalog.
if (Cypress.env("edition") === "iso") {
cy.get(".pf-v5-c-title")
.contains("Service Catalog")
.should("to.be.visible");
} else {
cy.get(".pf-v5-c-title")
.contains("Desired State")
.should("to.be.visible");
}

//go back to home and check if env is visible
cy.get(".pf-v5-c-breadcrumb__item").eq(0).click();
Expand Down
7 changes: 6 additions & 1 deletion cypress/e2e/scenario-6-resources.cy.js
Expand Up @@ -228,6 +228,10 @@ describe("Scenario 6 : Resources", () => {
8,
);

// make sure the default is 100 instead of 20 like on other pages with pagination.
cy.get('[aria-label="PaginationWidget"] .pf-v5-c-menu-toggle').click();
cy.get(".pf-v5-c-menu__list-item:last-child svg").should("exist");

// Expect last log message to be "Setting deployed due to known good status"
cy.get('[aria-label="ResourceLogRow"]')
.eq(0)
Expand Down Expand Up @@ -557,7 +561,8 @@ describe("Scenario 6 : Resources", () => {
);

// make sure the default is 100 instead of 20 like on other pages with pagination.
cy.get('[aria-label="PaginationWidget"]').should("contain", "1 - 100");
cy.get('[aria-label="PaginationWidget"] .pf-v5-c-menu-toggle').click();
cy.get(".pf-v5-c-menu__list-item:last-child svg").should("exist");

// Expect last log message to be "Setting deployed due to known good status"
cy.get('[aria-label="ResourceLogRow"]')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -63,7 +63,7 @@
"@types/lodash-es": "^4.17.8",
"@types/node": "^20.8.4",
"@types/qs": "^6.9.8",
"@types/react-dom": "^18.2.8",
"@types/react-dom": "^18.2.15",
"@types/react-router-dom": "^5.3.3",
"@types/react-syntax-highlighter": "^15.5.9",
"@types/styled-components": "^5.1.26",
Expand Down
2 changes: 1 addition & 1 deletion src/Slices/CreateEnvironment/UI/CreateEnvironmentForm.tsx
Expand Up @@ -75,7 +75,7 @@ export const CreateEnvironmentForm: React.FC<Props> = ({
if (Either.isLeft(result)) {
setErrorMessage(result.value);
} else {
const target = isLsmEnabled ? "Catalog" : "CompileReports";
const target = isLsmEnabled ? "Catalog" : "DesiredState";
navigateTo(target, undefined, `?env=${result.value.data.id}`);
}
}
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Expand Up @@ -1337,7 +1337,7 @@ __metadata:
"@types/lodash-es": ^4.17.8
"@types/node": ^20.8.4
"@types/qs": ^6.9.8
"@types/react-dom": ^18.2.8
"@types/react-dom": ^18.2.15
"@types/react-router-dom": ^5.3.3
"@types/react-syntax-highlighter": ^15.5.9
"@types/styled-components": ^5.1.26
Expand Down Expand Up @@ -2800,12 +2800,12 @@ __metadata:
languageName: node
linkType: hard

"@types/react-dom@npm:^18.2.8":
version: 18.2.8
resolution: "@types/react-dom@npm:18.2.8"
"@types/react-dom@npm:^18.2.15":
version: 18.2.15
resolution: "@types/react-dom@npm:18.2.15"
dependencies:
"@types/react": "*"
checksum: d36264631028d021b73cd9e015f10b95c4959ae1ce8f7a7419f318d1f05b1d063e6afffcd2a349a6bccd64ccc9ee9d2d976e1f0437643f0e7db621fa035bca65
checksum: 8e9631600c21ff561328e38a951d1991b3b3b20f538af4c0efbd1327c883a5573a63f50e1b945c34fa51b114b30e1ca5e62317bd54f21e063d6697b4be843a03
languageName: node
linkType: hard

Expand Down