Skip to content

Commit 72487f9

Browse files
committed
Update profile test cases
1 parent ce30232 commit 72487f9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

frontend/src/components/ProfileSection/ProfileSection.test.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe("Profile section", () => {
2424
isCurrentUser={isCurrentUser}
2525
handleEditProfileOpen={handleEditProfileOpen}
2626
handleChangePasswordOpen={handleChangePasswordOpen}
27-
/>,
27+
/>
2828
);
2929
expect(screen.getByText(`${firstName} ${lastName}`)).toBeInTheDocument();
3030
});
@@ -46,7 +46,7 @@ describe("Profile section", () => {
4646
isCurrentUser={isCurrentUser}
4747
handleEditProfileOpen={handleEditProfileOpen}
4848
handleChangePasswordOpen={handleChangePasswordOpen}
49-
/>,
49+
/>
5050
);
5151
expect(screen.getByText(`@${username}`)).toBeInTheDocument();
5252
});
@@ -70,15 +70,15 @@ describe("Profiles that don't belong to the current authenticated user", () => {
7070
isCurrentUser={isCurrentUser}
7171
handleEditProfileOpen={handleEditProfileOpen}
7272
handleChangePasswordOpen={handleChangePasswordOpen}
73-
/>,
73+
/>
7474
);
7575
const editProfileButton = screen.queryByRole("button", {
7676
name: "Edit profile",
7777
});
7878
expect(editProfileButton).not.toBeInTheDocument();
7979
});
8080

81-
it("Edit password button is absent", () => {
81+
it("Change password button is absent", () => {
8282
const firstName = faker.person.firstName();
8383
const lastName = faker.person.lastName();
8484
const username = faker.internet.userName();
@@ -95,10 +95,10 @@ describe("Profiles that don't belong to the current authenticated user", () => {
9595
isCurrentUser={isCurrentUser}
9696
handleEditProfileOpen={handleEditProfileOpen}
9797
handleChangePasswordOpen={handleChangePasswordOpen}
98-
/>,
98+
/>
9999
);
100100
const editProfileButton = screen.queryByRole("button", {
101-
name: "Edit password",
101+
name: "Change password",
102102
});
103103
expect(editProfileButton).not.toBeInTheDocument();
104104
});
@@ -122,15 +122,15 @@ describe("Profiles that belong to the current authenticated user", () => {
122122
isCurrentUser={isCurrentUser}
123123
handleEditProfileOpen={handleEditProfileOpen}
124124
handleChangePasswordOpen={handleChangePasswordOpen}
125-
/>,
125+
/>
126126
);
127127
const editProfileButton = screen.queryByRole("button", {
128128
name: "Edit profile",
129129
});
130130
expect(editProfileButton).toBeInTheDocument();
131131
});
132132

133-
it("Edit password button is present", () => {
133+
it("Change password button is present", () => {
134134
const firstName = faker.person.firstName();
135135
const lastName = faker.person.lastName();
136136
const username = faker.internet.userName();
@@ -147,7 +147,7 @@ describe("Profiles that belong to the current authenticated user", () => {
147147
isCurrentUser={isCurrentUser}
148148
handleEditProfileOpen={handleEditProfileOpen}
149149
handleChangePasswordOpen={handleChangePasswordOpen}
150-
/>,
150+
/>
151151
);
152152
const editProfileButton = screen.getByRole("button", {
153153
name: "Change password",

0 commit comments

Comments
 (0)