Skip to content

Commit 18cd896

Browse files
authored
fix project name e2e tests (#530)
1 parent 74015ae commit 18cd896

5 files changed

Lines changed: 8 additions & 29 deletions

File tree

apps/admin/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.2-dev
1+
4.0.2

apps/admin/deploy/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ apiVersion: v2
44
name: orch-ui-admin
55
description: Deploy Edge-Native Software Platform UI Admin pods on Kubernetes
66
type: application
7-
version: 4.0.2-dev
7+
version: 4.0.2
88
# Default appVersion will be overwritten by a the build to use the version from package.json.
99

1010
# This value is supplied only to enable local unbuilt deployment of released content.
11-
appVersion: "4.0.2-dev"
11+
appVersion: "4.0.2"
1212
annotations:
1313
api_observability_monitor: 0.0.5
1414
dependencies: []

apps/admin/src/components/organisms/DeleteProjectDialog/DeleteProjectDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const DeleteProjectDialog = ({
4545
const [deleteProjectName, setDeleteProjectName] = useState<string>("");
4646
const [deleteProject] = useDeleteProject();
4747

48-
const projectReadableName = project.spec?.description ?? project.name;
48+
const projectReadableName = project.name;
4949

5050
const onDeleteProject = () => {
5151
const projectName = project.name;

apps/admin/src/components/organisms/ProjectsTable/ProjectsTable.cy.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ describe("<ProjectsTable/>", () => {
112112

113113
describe("delete option", () => {
114114
beforeEach(() => {
115-
pom.deleteProjectPopup(2, "Project 1");
115+
pom.deleteProjectPopup(2, "project-1");
116116
});
117117
it("should show message on successful delete", () => {
118118
pom.deleteProjectPom.interceptApis([

tests/cypress/e2e/admin/org-admin-smoke.cy.ts

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ import AdminPom from "./admin.pom";
99

1010
interface ProjectTestData {
1111
description: string;
12-
updatedDescription: string;
1312
}
1413

1514
const isProjectTestData = (arg: any): arg is ProjectTestData => {
1615
if (!arg.description) return false;
17-
if (!arg.updatedDescription) return false;
1816
return true;
1917
};
2018

@@ -57,10 +55,10 @@ describe("Org Admin Smoke", () => {
5755
// we select by text so it supports both the empty and full table
5856
cy.contains("Create Project").click();
5957

60-
pom.projectsPom.projectsTablePom.createRenameProjectPom.el.projectName.type(
58+
pom.projectsPom.projectsTablePom.createProjectPom.el.projectName.type(
6159
testData.description,
6260
);
63-
pom.projectsPom.projectsTablePom.createRenameProjectPom.el.submitProject.click();
61+
pom.projectsPom.projectsTablePom.createProjectPom.el.submitProject.click();
6462

6563
// wait for the modal to close and the page to reload
6664
cy.wait("@createProject");
@@ -107,25 +105,6 @@ describe("Org Admin Smoke", () => {
107105
}
108106
});
109107

110-
it("should rename the project", () => {
111-
cy.contains("Project Name").should("be.visible");
112-
pom.projectsPom.projectsTablePom.tablePom.search(
113-
testData.description,
114-
false,
115-
);
116-
// wait for search to complete
117-
pom.projectsPom.projectsTablePom.tablePom
118-
.getRows()
119-
.should("have.length", 1);
120-
121-
pom.projectsPom.projectsTablePom.renameProjectPopup(
122-
0,
123-
testData.updatedDescription,
124-
);
125-
pom.projectsPom.projectsTablePom.createRenameProjectPom.el.submitProject.click();
126-
cy.contains(testData.updatedDescription).should("exist");
127-
});
128-
129108
it("should delete the project", () => {
130109
cy.contains("Project Name").should("be.visible");
131110
pom.projectsPom.projectsTablePom.tablePom.search(
@@ -139,7 +118,7 @@ describe("Org Admin Smoke", () => {
139118

140119
pom.projectsPom.projectsTablePom.deleteProjectPopup(
141120
0,
142-
testData.updatedDescription,
121+
testData.description,
143122
);
144123
pom.projectsPom.projectsTablePom.deleteProjectPom.modalPom.el.primaryBtn.click();
145124
cy.contains("Deletion in process").should("be.visible");

0 commit comments

Comments
 (0)