Skip to content

Commit

Permalink
fix(api): fix grammatical issues and improve consistency (#1598)
Browse files Browse the repository at this point in the history
* fix: fix grammatical issues

Change "error" to "errors" to be grammatically correct and consistent with other styles like it("gets ...") or it("deletes ...") or it("creates ...")

* fix: fix grammatical issues

Change "error" to "errors" to be grammatically correct and consistent with other styles like it("gets ...") or it("deletes ...") or it("creates ...")

* fix: fix grammatical issues

Change "error" to "errors" to be grammatically correct and consistent with other styles like it("gets ...") or it("deletes ...") or it("creates ...")

* fix: fix grammatical issues

For example change "error" to "errors" to be grammatically correct and consistent with other styles like it("gets ...") or it("deletes ...") or it("creates ...")

* fix: fix grammatical issues
  • Loading branch information
amirmaroufian authored Dec 4, 2024
1 parent 7f3aa7e commit 5868b7a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cypress/tests/api/api-contacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe("Contacts API", function () {
});
});

it("error when invalid contactUserId", function () {
it("errors when invalid contactUserId", function () {
cy.request({
method: "POST",
url: `${apiContacts}`,
Expand Down
2 changes: 1 addition & 1 deletion cypress/tests/api/api-notifications.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe("Notifications API", function () {
});
});

it("error when invalid field sent", function () {
it("errors when invalid field sent", function () {
cy.request({
method: "PATCH",
url: `${apiNotifications}/${ctx.notificationId}`,
Expand Down
2 changes: 1 addition & 1 deletion cypress/tests/api/api-transactions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ describe("Transactions API", function () {
});
});

it("error when invalid field sent", function () {
it("errors when an invalid field sent", function () {
cy.request({
method: "PATCH",
url: `${apiTransactions}/${ctx.transactionId}`,
Expand Down
18 changes: 9 additions & 9 deletions cypress/tests/api/api-users.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ describe("Users API", function () {
});

context("GET /users/:userId", function () {
it("get a user", function () {
it("gets a user", function () {
cy.request("GET", `${apiUsers}/${ctx.authenticatedUser!.id}`).then((response) => {
expect(response.status).to.eq(200);
expect(response.body.user).to.have.property("firstName");
});
});

it("error when invalid userId", function () {
it("errors when invalid userId", function () {
cy.request({
method: "GET",
url: `${apiUsers}/1234`,
Expand All @@ -57,7 +57,7 @@ describe("Users API", function () {
});

context("GET /users/profile/:username", function () {
it("get a user profile by username", function () {
it("gets a user profile by username", function () {
const { username, firstName, lastName, avatar } = ctx.authenticatedUser!;
cy.request("GET", `${apiUsers}/profile/${username}`).then((response) => {
expect(response.status).to.eq(200);
Expand All @@ -72,7 +72,7 @@ describe("Users API", function () {
});

context("GET /users/search", function () {
it("get users by email", function () {
it("gets users by email", function () {
const { email, firstName } = ctx.searchUser!;
cy.request({
method: "GET",
Expand All @@ -86,7 +86,7 @@ describe("Users API", function () {
});
});

it("get users by phone number", function () {
it("gets users by phone number", function () {
const { phoneNumber, firstName } = ctx.searchUser!;

cy.request({
Expand All @@ -101,7 +101,7 @@ describe("Users API", function () {
});
});

it("get users by username", function () {
it("gets users by username", function () {
const { username, firstName } = ctx.searchUser!;

cy.request({
Expand Down Expand Up @@ -154,7 +154,7 @@ describe("Users API", function () {
});
});

it("error when invalid field sent", function () {
it("errors when an invalid field sent", function () {
cy.request({
method: "POST",
url: `${apiUsers}`,
Expand All @@ -180,7 +180,7 @@ describe("Users API", function () {
});
});

it("error when invalid field sent", function () {
it("errors when an invalid field sent", function () {
cy.request({
method: "PATCH",
url: `${apiUsers}/${ctx.authenticatedUser!.id}`,
Expand All @@ -196,7 +196,7 @@ describe("Users API", function () {
});

context("POST /login", function () {
it("login as user", function () {
it("logs in as a user", function () {
cy.loginByApi(ctx.authenticatedUser!.username).then((response) => {
expect(response.status).to.eq(200);
});
Expand Down

0 comments on commit 5868b7a

Please sign in to comment.