Skip to content

Commit c26965f

Browse files
committed
added Dockerfile
1 parent 15a59e3 commit c26965f

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

Dockerfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM cypress/base:14.17.0
2+
RUN mkdir /app
3+
WORKDIR /app
4+
COPY . /app
5+
RUN npm install
6+
RUN $(npm bin)/cypress verify
7+
RUN ["npm", "run", "cy:run"]

cypress/integration/api/chuchnorrisapi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ beforeEach(() => {
55
cy.log('starting test')
66
})
77

8-
describe('REST API Tests for api.chuchnorris.io', () => {
8+
describe('REST API Tests for api.chucknorris.io', () => {
99
it('API Test - Validate Status Code', () => {
1010
cy.request(`${chucknorrisapi_base_url}jokes/random`).as('joke')
1111
cy.get('@joke').its('status').should('equal', 200)

cypress/integration/api/pokeapi.spec.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ describe('Rest API Test with Cypress', () => {
1313

1414
it('API Test - Validate Status Code', () => {
1515
cy.request(`${pokeapi_base_url}v2/pokemon/25`)
16-
.as('pokemon')
16+
.as('pokemon')
1717
cy.get('@pokemon')
18-
.its('status')
19-
.should('equal', 200)
18+
.its('status')
19+
.should('equal', 200)
2020
})
2121

2222
it('API Test - Validate Name Value', () => {
2323
cy.request(`${pokeapi_base_url}v2/pokemon/25`).as('pokemon')
2424
cy.get('@pokemon')
25-
.its('body')
26-
.should('include', { name: 'pikachu' })
25+
.its('body')
26+
.should('include', { name: 'pikachu' })
2727
})
2828

2929
it('API Test - Validate Negative Status Code', () => {
@@ -33,8 +33,8 @@ describe('Rest API Test with Cypress', () => {
3333
failOnStatusCode: false
3434
}).as('pokemon')
3535
cy.get('@pokemon')
36-
.its('status')
37-
.should('equal', 404)
36+
.its('status')
37+
.should('equal', 404)
3838

3939
})
4040
})

0 commit comments

Comments
 (0)