From e46ec431307cf58c69be784fa91a37bb9f3181ae Mon Sep 17 00:00:00 2001 From: Narine Date: Fri, 8 Mar 2024 20:43:33 +0000 Subject: [PATCH 01/10] test cypress --- angular-app | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 160000 angular-app diff --git a/angular-app b/angular-app new file mode 160000 index 0000000..f600ac3 --- /dev/null +++ b/angular-app @@ -0,0 +1 @@ +Subproject commit f600ac3044f4a5de6006a35b7b9ce851b4397761 diff --git a/package.json b/package.json index a1fc57d..80725e3 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "dependencies": { "@angular/animations": "^15.2.10", "@angular/cdk": "^15.2.9", - "@angular/common": "^15.2.10", + "@angular/common": "^15.2.13", "@angular/compiler": "^15.2.10", "@angular/core": "^15.2.10", "@angular/forms": "^15.2.10", From bf438213c0846a389744d6ca02b62bbfe05aaf4d Mon Sep 17 00:00:00 2001 From: Narine Date: Fri, 8 Mar 2024 21:00:36 +0000 Subject: [PATCH 02/10] c --- cypress.config.ts | 1 + package.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cypress.config.ts b/cypress.config.ts index 22755f9..d0be05f 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -9,6 +9,7 @@ export default defineConfig({ defaultCommandTimeout: 4000, retries: { runMode: 1, openMode: 1 }, scrollBehavior: 'center', + setupNodeEvents(on, config) { // implement node event listeners here }, diff --git a/package.json b/package.json index 80725e3..1e512ef 100644 --- a/package.json +++ b/package.json @@ -115,6 +115,7 @@ "ts-node": "3.2.2", "tslint": "~6.1.0", "tslint-language-service": "^0.9.9", - "typescript": "~4.9.5" + "typescript": "~4.9.5", + } } From 0ae572921f55a1f56da64d210cca9d17b921dd02 Mon Sep 17 00:00:00 2001 From: Narine Date: Fri, 8 Mar 2024 21:02:44 +0000 Subject: [PATCH 03/10] ccc --- cypress.config.ts | 1 - package.json | 1 - 2 files changed, 2 deletions(-) diff --git a/cypress.config.ts b/cypress.config.ts index d0be05f..22755f9 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -9,7 +9,6 @@ export default defineConfig({ defaultCommandTimeout: 4000, retries: { runMode: 1, openMode: 1 }, scrollBehavior: 'center', - setupNodeEvents(on, config) { // implement node event listeners here }, diff --git a/package.json b/package.json index 1e512ef..f29f25e 100644 --- a/package.json +++ b/package.json @@ -116,6 +116,5 @@ "tslint": "~6.1.0", "tslint-language-service": "^0.9.9", "typescript": "~4.9.5", - } } From a3d0e296eb99cfc1c2ec501419fd5a63ef1b8763 Mon Sep 17 00:00:00 2001 From: Narine Date: Mon, 25 Mar 2024 15:50:05 +0000 Subject: [PATCH 04/10] Add Cypress test for modal dialog --- package-lock.json | 8 ++++---- package.json | 6 +++--- qodana.yaml | 29 +++++++++++++++++++++++++++++ tsconfig.json | 3 ++- 4 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 qodana.yaml diff --git a/package-lock.json b/package-lock.json index 963a157..cf94e37 100644 --- a/package-lock.json +++ b/package-lock.json @@ -76,7 +76,7 @@ "@typescript-eslint/parser": "^5.43.0", "codelyzer": "^6.0.2", "conventional-changelog-cli": "1.3.4", - "cypress": "^13.6.6", + "cypress": "^13.7.0", "eslint": "^8.28.0", "husky": "0.13.3", "jasmine-core": "~3.6.0", @@ -12274,9 +12274,9 @@ "dev": true }, "node_modules/cypress": { - "version": "13.6.6", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.6.6.tgz", - "integrity": "sha512-S+2S9S94611hXimH9a3EAYt81QM913ZVA03pUmGDfLTFa5gyp85NJ8dJGSlEAEmyRsYkioS1TtnWtbv/Fzt11A==", + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.7.0.tgz", + "integrity": "sha512-UimjRSJJYdTlvkChcdcfywKJ6tUYuwYuk/n1uMMglrvi+ZthNhoRYcxnWgTqUtkl17fXrPAsD5XT2rcQYN1xKA==", "dev": true, "hasInstallScript": true, "dependencies": { diff --git a/package.json b/package.json index f29f25e..27c00ed 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "dependencies": { "@angular/animations": "^15.2.10", "@angular/cdk": "^15.2.9", - "@angular/common": "^15.2.13", + "@angular/common": "^15.2.10", "@angular/compiler": "^15.2.10", "@angular/core": "^15.2.10", "@angular/forms": "^15.2.10", @@ -97,7 +97,7 @@ "@typescript-eslint/parser": "^5.43.0", "codelyzer": "^6.0.2", "conventional-changelog-cli": "1.3.4", - "cypress": "^13.6.6", + "cypress": "^13.7.0", "eslint": "^8.28.0", "husky": "0.13.3", "jasmine-core": "~3.6.0", @@ -115,6 +115,6 @@ "ts-node": "3.2.2", "tslint": "~6.1.0", "tslint-language-service": "^0.9.9", - "typescript": "~4.9.5", + "typescript": "~4.9.5" } } diff --git a/qodana.yaml b/qodana.yaml new file mode 100644 index 0000000..29f8f8c --- /dev/null +++ b/qodana.yaml @@ -0,0 +1,29 @@ +#-------------------------------------------------------------------------------# +# Qodana analysis is configured by qodana.yaml file # +# https://www.jetbrains.com/help/qodana/qodana-yaml.html # +#-------------------------------------------------------------------------------# +version: "1.0" + +#Specify inspection profile for code analysis +profile: + name: qodana.starter + +#Enable inspections +#include: +# - name: + +#Disable inspections +#exclude: +# - name: +# paths: +# - + +#Execute shell command before Qodana execution (Applied in CI/CD pipeline) +#bootstrap: sh ./prepare-qodana.sh + +#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline) +#plugins: +# - id: #(plugin id can be found at https://plugins.jetbrains.com) + +#Specify Qodana linter for analysis (Applied in CI/CD pipeline) +linter: jetbrains/qodana-js:latest diff --git a/tsconfig.json b/tsconfig.json index 3a065c9..4564469 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,6 +21,7 @@ "name": "tslint-language-service" } ], - "useDefineForClassFields": false + "useDefineForClassFields": false, + "baseUrl": "./src" } } From bda100700818948d5279bfe777db07dfd5e56da5 Mon Sep 17 00:00:00 2001 From: Narine Date: Mon, 25 Mar 2024 16:00:11 +0000 Subject: [PATCH 05/10] commit task1.cy.js task2.cy.js task3.cy.js --- cypress/e2e/hwcypress/task1.cy.js | 22 ++++++++++++++++++++++ cypress/e2e/hwcypress/task2.cy.js | 13 +++++++++++++ cypress/e2e/hwcypress/task3.cy.js | 17 +++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 cypress/e2e/hwcypress/task1.cy.js create mode 100644 cypress/e2e/hwcypress/task2.cy.js create mode 100644 cypress/e2e/hwcypress/task3.cy.js diff --git a/cypress/e2e/hwcypress/task1.cy.js b/cypress/e2e/hwcypress/task1.cy.js new file mode 100644 index 0000000..513b825 --- /dev/null +++ b/cypress/e2e/hwcypress/task1.cy.js @@ -0,0 +1,22 @@ +describe("Stepper", ()=>{ + it("should work",()=>{ + const containerSelector = 'nb-stepper[orientation="horizontal"]' + cy.visit("http://localhost:4200/pages/layout/stepper") + cy.get(`${containerSelector} h3`).should("have.text","Step content #1") + + cy.get(`${containerSelector} button`).contains("prev").should("be.disabled") + cy.get(`${containerSelector} button`).contains("next").click() + cy.get(`${containerSelector} h3`).should("have.text","Step content #2") + + cy.get(`${containerSelector} button`).contains("prev").should("be.enabled") + cy.get(`${containerSelector} button`).contains("next").click() + + cy.get(`${containerSelector} h3`).should("have.text","Step content #3") + cy.get(`${containerSelector} button`).contains("prev").should("be.enabled") + cy.get(`${containerSelector} button`).contains("next").click() + + cy.get(`${containerSelector} h3`).should("have.text","Step content #4") + cy.get(`${containerSelector} button`).contains("prev").should("be.enabled") + cy.get(`${containerSelector} button`).contains("next").should("be.disabled") + }) +}) diff --git a/cypress/e2e/hwcypress/task2.cy.js b/cypress/e2e/hwcypress/task2.cy.js new file mode 100644 index 0000000..91cea39 --- /dev/null +++ b/cypress/e2e/hwcypress/task2.cy.js @@ -0,0 +1,13 @@ +describe('modal-overlays', () => { + it('Click Button and Verify Modal Dialog', () => { + const containerSelector = 'ngx-modal-overlays nb-card'; + + cy.visit('http://localhost:4200/pages/modal-overlays/dialog'); + + cy.contains('.appearance-filled.size-medium.shape-rectangle.status-basic.nb-transition', 'Enter Name').click(); + + cy.get('button[status="success"].appearance-filled.size-medium.shape-rectangle.nb-transition') + .should('exist') + .and('be.visible'); + }); +}); diff --git a/cypress/e2e/hwcypress/task3.cy.js b/cypress/e2e/hwcypress/task3.cy.js new file mode 100644 index 0000000..6d73435 --- /dev/null +++ b/cypress/e2e/hwcypress/task3.cy.js @@ -0,0 +1,17 @@ +describe('modal-overlays', () => { + it('Click Button and Verify Modal Dialog Content', () => { + cy.visit('http://localhost:4200/pages/modal-overlays/dialog'); + + cy.contains('.appearance-filled.size-medium.shape-rectangle.status-basic.nb-transition', 'Enter Name').click(); + cy.get('input[placeholder="Name"].size-medium.status-basic.shape-rectangle.nb-transition') + .should('exist'); + cy.get('nb-card-header').should('exist').and('contain', 'Enter your name'); + cy.get('button[status="success"].appearance-filled.size-medium.shape-rectangle.nb-transition') + .should('exist') + .and('contain', 'Submit'); + cy.get('button[status="danger"].appearance-filled.size-medium.shape-rectangle.nb-transition') + .should('exist') + .and('have.text', 'Cancel'); + + }); +}); From 3d813ebd276e97a08fcd565927c7bd3e83da104f Mon Sep 17 00:00:00 2001 From: Narine Date: Mon, 25 Mar 2024 16:12:14 +0000 Subject: [PATCH 06/10] tasks 1-3 --- angular-app | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular-app b/angular-app index f600ac3..bda1007 160000 --- a/angular-app +++ b/angular-app @@ -1 +1 @@ -Subproject commit f600ac3044f4a5de6006a35b7b9ce851b4397761 +Subproject commit bda100700818948d5279bfe777db07dfd5e56da5 From 7ffdda19a719cb7cf68e1c54ddea47e438b69c28 Mon Sep 17 00:00:00 2001 From: Narine Date: Mon, 25 Mar 2024 17:11:54 +0000 Subject: [PATCH 07/10] Add new Cypress test files --- cypress/e2e/hwcypress/task1.cy.js | 0 cypress/e2e/hwcypress/task2.cy.js | 11 +++++++++++ cypress/e2e/hwcypress/task3.cy.js | 16 ++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 cypress/e2e/hwcypress/task1.cy.js create mode 100644 cypress/e2e/hwcypress/task2.cy.js create mode 100644 cypress/e2e/hwcypress/task3.cy.js diff --git a/cypress/e2e/hwcypress/task1.cy.js b/cypress/e2e/hwcypress/task1.cy.js new file mode 100644 index 0000000..e69de29 diff --git a/cypress/e2e/hwcypress/task2.cy.js b/cypress/e2e/hwcypress/task2.cy.js new file mode 100644 index 0000000..29900c2 --- /dev/null +++ b/cypress/e2e/hwcypress/task2.cy.js @@ -0,0 +1,11 @@ +describe('modal-overlays', () => { + it('Click Button and Verify Modal Dialog', () => { + const containerSelector = 'ngx-modal-overlays nb-card'; + + cy.visit('http://localhost:4200/pages/modal-overlays/dialog'); + cy.contains('.appearance-filled.size-medium.shape-rectangle.status-basic.nb-transition', 'Enter Name').click(); + cy.get('button[status="success"].appearance-filled.size-medium.shape-rectangle.nb-transition') + .should('exist') + .and('be.visible'); + }); +}); diff --git a/cypress/e2e/hwcypress/task3.cy.js b/cypress/e2e/hwcypress/task3.cy.js new file mode 100644 index 0000000..46e4780 --- /dev/null +++ b/cypress/e2e/hwcypress/task3.cy.js @@ -0,0 +1,16 @@ +describe('modal-overlays', () => { + it('Click Button and Verify Modal Dialog Content', () => { + cy.visit('http://localhost:4200/pages/modal-overlays/dialog'); + cy.contains('.appearance-filled.size-medium.shape-rectangle.status-basic.nb-transition', 'Enter Name').click(); + cy.get('input[placeholder="Name"].size-medium.status-basic.shape-rectangle.nb-transition') + .should('exist'); + cy.get('nb-card-header').should('exist').and('contain', 'Enter your name'); + cy.get('button[status="success"].appearance-filled.size-medium.shape-rectangle.nb-transition') + .should('exist') + .and('contain', 'Submit'); + cy.get('button[status="danger"].appearance-filled.size-medium.shape-rectangle.nb-transition') + .should('exist') + .and('have.text', 'Cancel'); + + }); +}); From c4f82926dea2cce472d17f7e6e0c21e11f0d605b Mon Sep 17 00:00:00 2001 From: Narine Date: Mon, 25 Mar 2024 17:28:57 +0000 Subject: [PATCH 08/10] Commit tests --- cypress/e2e/hwcypress/task1.cy.js | 19 +++++++++++++++++++ cypress/e2e/hwcypress/task2.cy.js | 2 +- cypress/e2e/hwcypress/task3.cy.js | 1 - 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/hwcypress/task1.cy.js b/cypress/e2e/hwcypress/task1.cy.js index e69de29..12e0ab3 100644 --- a/cypress/e2e/hwcypress/task1.cy.js +++ b/cypress/e2e/hwcypress/task1.cy.js @@ -0,0 +1,19 @@ +describe("Stepper", ()=>{ + it("should work",()=>{ + const containerSelector = 'nb-stepper[orientation="horizontal"]' + cy.visit("http://localhost:4200/pages/layout/stepper") + cy.get(`${containerSelector} h3`).should("have.text","Step content #1") + cy.get(`${containerSelector} button`).contains("prev").should("be.disabled") + cy.get(`${containerSelector} button`).contains("next").click() + cy.get(`${containerSelector} h3`).should("have.text","Step content #2") + cy.get(`${containerSelector} button`).contains("prev").should("be.enabled") + cy.get(`${containerSelector} button`).contains("next").click() + cy.get(`${containerSelector} h3`).should("have.text","Step content #3") + cy.get(`${containerSelector} button`).contains("prev").should("be.enabled") + cy.get(`${containerSelector} button`).contains("next").click() + cy.get(`${containerSelector} h3`).should("have.text","Step content #4") + cy.get(`${containerSelector} button`).contains("prev").should("be.enabled") + cy.get(`${containerSelector} button`).contains("next").should("be.disabled") + + }) +}) diff --git a/cypress/e2e/hwcypress/task2.cy.js b/cypress/e2e/hwcypress/task2.cy.js index 29900c2..236483a 100644 --- a/cypress/e2e/hwcypress/task2.cy.js +++ b/cypress/e2e/hwcypress/task2.cy.js @@ -1,11 +1,11 @@ describe('modal-overlays', () => { it('Click Button and Verify Modal Dialog', () => { const containerSelector = 'ngx-modal-overlays nb-card'; - cy.visit('http://localhost:4200/pages/modal-overlays/dialog'); cy.contains('.appearance-filled.size-medium.shape-rectangle.status-basic.nb-transition', 'Enter Name').click(); cy.get('button[status="success"].appearance-filled.size-medium.shape-rectangle.nb-transition') .should('exist') .and('be.visible'); + }); }); diff --git a/cypress/e2e/hwcypress/task3.cy.js b/cypress/e2e/hwcypress/task3.cy.js index 46e4780..cf01a7e 100644 --- a/cypress/e2e/hwcypress/task3.cy.js +++ b/cypress/e2e/hwcypress/task3.cy.js @@ -11,6 +11,5 @@ describe('modal-overlays', () => { cy.get('button[status="danger"].appearance-filled.size-medium.shape-rectangle.nb-transition') .should('exist') .and('have.text', 'Cancel'); - }); }); From e5819ec534b62ef7cbd80baee0e188fb9f781205 Mon Sep 17 00:00:00 2001 From: Narine Date: Thu, 28 Mar 2024 17:32:29 +0000 Subject: [PATCH 09/10] Update --- cypress/e2e/hwcypress/task1.cy.js | 22 ---------------------- cypress/e2e/hwcypress/task2.cy.js | 13 ------------- cypress/e2e/hwcypress/task3.cy.js | 17 ----------------- 3 files changed, 52 deletions(-) delete mode 100644 cypress/e2e/hwcypress/task1.cy.js delete mode 100644 cypress/e2e/hwcypress/task2.cy.js delete mode 100644 cypress/e2e/hwcypress/task3.cy.js diff --git a/cypress/e2e/hwcypress/task1.cy.js b/cypress/e2e/hwcypress/task1.cy.js deleted file mode 100644 index 513b825..0000000 --- a/cypress/e2e/hwcypress/task1.cy.js +++ /dev/null @@ -1,22 +0,0 @@ -describe("Stepper", ()=>{ - it("should work",()=>{ - const containerSelector = 'nb-stepper[orientation="horizontal"]' - cy.visit("http://localhost:4200/pages/layout/stepper") - cy.get(`${containerSelector} h3`).should("have.text","Step content #1") - - cy.get(`${containerSelector} button`).contains("prev").should("be.disabled") - cy.get(`${containerSelector} button`).contains("next").click() - cy.get(`${containerSelector} h3`).should("have.text","Step content #2") - - cy.get(`${containerSelector} button`).contains("prev").should("be.enabled") - cy.get(`${containerSelector} button`).contains("next").click() - - cy.get(`${containerSelector} h3`).should("have.text","Step content #3") - cy.get(`${containerSelector} button`).contains("prev").should("be.enabled") - cy.get(`${containerSelector} button`).contains("next").click() - - cy.get(`${containerSelector} h3`).should("have.text","Step content #4") - cy.get(`${containerSelector} button`).contains("prev").should("be.enabled") - cy.get(`${containerSelector} button`).contains("next").should("be.disabled") - }) -}) diff --git a/cypress/e2e/hwcypress/task2.cy.js b/cypress/e2e/hwcypress/task2.cy.js deleted file mode 100644 index 91cea39..0000000 --- a/cypress/e2e/hwcypress/task2.cy.js +++ /dev/null @@ -1,13 +0,0 @@ -describe('modal-overlays', () => { - it('Click Button and Verify Modal Dialog', () => { - const containerSelector = 'ngx-modal-overlays nb-card'; - - cy.visit('http://localhost:4200/pages/modal-overlays/dialog'); - - cy.contains('.appearance-filled.size-medium.shape-rectangle.status-basic.nb-transition', 'Enter Name').click(); - - cy.get('button[status="success"].appearance-filled.size-medium.shape-rectangle.nb-transition') - .should('exist') - .and('be.visible'); - }); -}); diff --git a/cypress/e2e/hwcypress/task3.cy.js b/cypress/e2e/hwcypress/task3.cy.js deleted file mode 100644 index 6d73435..0000000 --- a/cypress/e2e/hwcypress/task3.cy.js +++ /dev/null @@ -1,17 +0,0 @@ -describe('modal-overlays', () => { - it('Click Button and Verify Modal Dialog Content', () => { - cy.visit('http://localhost:4200/pages/modal-overlays/dialog'); - - cy.contains('.appearance-filled.size-medium.shape-rectangle.status-basic.nb-transition', 'Enter Name').click(); - cy.get('input[placeholder="Name"].size-medium.status-basic.shape-rectangle.nb-transition') - .should('exist'); - cy.get('nb-card-header').should('exist').and('contain', 'Enter your name'); - cy.get('button[status="success"].appearance-filled.size-medium.shape-rectangle.nb-transition') - .should('exist') - .and('contain', 'Submit'); - cy.get('button[status="danger"].appearance-filled.size-medium.shape-rectangle.nb-transition') - .should('exist') - .and('have.text', 'Cancel'); - - }); -}); From 07d9916df18244b916826946e91c08ee6ace147d Mon Sep 17 00:00:00 2001 From: Narine <156703697+narinegi@users.noreply.github.com> Date: Tue, 7 May 2024 17:32:15 +0100 Subject: [PATCH 10/10] Add files via upload --- create-new-post.cy.js | 12 ++++++++++++ delete.cy.js | 10 ++++++++++ get-posts-list.cy.js | 10 ++++++++++ post-by-id.cy.js | 9 +++++++++ update-post-by-id.cy.js | 15 +++++++++++++++ 5 files changed, 56 insertions(+) create mode 100644 create-new-post.cy.js create mode 100644 delete.cy.js create mode 100644 get-posts-list.cy.js create mode 100644 post-by-id.cy.js create mode 100644 update-post-by-id.cy.js diff --git a/create-new-post.cy.js b/create-new-post.cy.js new file mode 100644 index 0000000..278949b --- /dev/null +++ b/create-new-post.cy.js @@ -0,0 +1,12 @@ +describe('Create New Post API Test API', () => { + it('should create new post', () => { + cy.api('POST', 'https://jsonplaceholder.typicode.com/posts', { + title: 'foo', + body: 'bar', + userId: 1, + }).should((response) => { + expect(response.status).to.eq(201); + expect(response.body).to.have.property('id'); + }); + }); +}); diff --git a/delete.cy.js b/delete.cy.js new file mode 100644 index 0000000..cd05772 --- /dev/null +++ b/delete.cy.js @@ -0,0 +1,10 @@ +describe('Delete Post by ID API Test API', () => { + it('should delete post by id', () => { + cy.api('DELETE', 'https://jsonplaceholder.typicode.com/posts/1') + .should((response) => { + expect(response.status).to.eq(200); + }); + }); +}); + + diff --git a/get-posts-list.cy.js b/get-posts-list.cy.js new file mode 100644 index 0000000..e68a047 --- /dev/null +++ b/get-posts-list.cy.js @@ -0,0 +1,10 @@ +describe('Get Posts List API Test API', () => { + it('should get posts list', () => { + cy.api('GET', 'https://jsonplaceholder.typicode.com/posts') + .should((response) => { + expect(response.status).to.eq(200); + expect(response.body.length).to.be.greaterThan(0); + }); + }); +}); + diff --git a/post-by-id.cy.js b/post-by-id.cy.js new file mode 100644 index 0000000..c1b0f33 --- /dev/null +++ b/post-by-id.cy.js @@ -0,0 +1,9 @@ +describe('Get Post by ID API Test API', () => { + it('should get post by id', () => { + cy.api('GET', 'https://jsonplaceholder.typicode.com/posts/1') + .should((response) => { + expect(response.status).to.eq(200); + expect(response.body).to.have.property('id', 1); + }); + }); +}); diff --git a/update-post-by-id.cy.js b/update-post-by-id.cy.js new file mode 100644 index 0000000..c94aa5c --- /dev/null +++ b/update-post-by-id.cy.js @@ -0,0 +1,15 @@ +describe('Update Post by ID API Test API', () => { + it('should update post by id', () => { + cy.api('PUT', 'https://jsonplaceholder.typicode.com/posts/1', { + id: 1, + title: 'foo', + body: 'bar', + userId: 1, + }).should((response) => { + expect(response.status).to.eq(200); + expect(response.body).to.have.property('title', 'foo'); + }); + }); +}); + +