Skip to content

Commit

Permalink
style: pre-commit eslint automatic linter fixes.
Browse files Browse the repository at this point in the history
Result of the pre-commit eslint fixer linting all files.

Signed-off-by: Julian Psotta <julianpsotta@gmail.com>
  • Loading branch information
MichaelsJP authored and TheGreatRefrigerator committed Dec 9, 2022
1 parent 456db08 commit b6626ab
Show file tree
Hide file tree
Showing 4 changed files with 2,307 additions and 2,307 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/2-advanced-examples/navigation.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ context('Navigation', () => {
expect(typeof contentWindow === 'object').to.be.true
},
})
})
})
})
28 changes: 14 additions & 14 deletions cypress/e2e/2-advanced-examples/network_requests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ context('Network Requests', () => {

it('cy.request() - verify response using BDD syntax', () => {
cy.request('https://jsonplaceholder.cypress.io/comments')
.then((response) => {
.then((response) => {
// https://on.cypress.io/assertions
expect(response).property('status').to.equal(200)
expect(response).property('body').to.have.property('length').and.be.oneOf([500, 501])
expect(response).to.include.keys('headers', 'duration')
})
expect(response).property('status').to.equal(200)
expect(response).property('body').to.have.property('length').and.be.oneOf([500, 501])
expect(response).to.include.keys('headers', 'duration')
})
})

it('cy.request() with query parameters', () => {
Expand All @@ -40,14 +40,14 @@ context('Network Requests', () => {
id: 3,
},
})
.its('body')
.should('be.an', 'array')
.and('have.length', 1)
.its('0') // yields first element of the array
.should('contain', {
postId: 1,
id: 3,
})
.its('body')
.should('be.an', 'array')
.and('have.length', 1)
.its('0') // yields first element of the array
.should('contain', {
postId: 1,
id: 3,
})
})

it('cy.request() - pass result to the second request', () => {
Expand Down Expand Up @@ -103,7 +103,7 @@ context('Network Requests', () => {
title: 'Cypress Test Runner',
body: 'Fast, easy and reliable testing for anything that runs in a browser.',
})
.its('body').as('post') // save the new post from the response
.its('body').as('post') // save the new post from the response
})
.then(function () {
// When this callback runs, both "cy.request" API commands have finished
Expand Down
18 changes: 9 additions & 9 deletions cypress/e2e/2-advanced-examples/utilities.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ context('Utilities', () => {
// https://github.com/nolanlawson/blob-util#imgSrcToDataURL
// get the dataUrl string for the javascript-logo
return Cypress.Blob.imgSrcToDataURL('https://example.cypress.io/assets/img/javascript-logo.png', undefined, 'anonymous')
.then((dataUrl) => {
.then((dataUrl) => {
// create an <img> element and set its src to the dataUrl
let img = Cypress.$('<img />', { src: dataUrl })
let img = Cypress.$('<img />', { src: dataUrl })

// need to explicitly return cy here since we are initially returning
// the Cypress.Blob.imgSrcToDataURL promise to our test
// append the image
$div.append(img)
// need to explicitly return cy here since we are initially returning
// the Cypress.Blob.imgSrcToDataURL promise to our test
// append the image
$div.append(img)

cy.get('.utility-blob img').click()
.should('have.attr', 'src', dataUrl)
})
cy.get('.utility-blob img').click()
.should('have.attr', 'src', dataUrl)
})
})
})

Expand Down
Loading

0 comments on commit b6626ab

Please sign in to comment.