Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cypress-example-kitchensink

Package Overview
Dependencies
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-example-kitchensink - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

renovate.json

9

cypress/integration/examples/assertions.spec.js

@@ -36,3 +36,4 @@ /// <reference types="Cypress" />

// return an array of texts from all of the p's
let texts = $p.map((i, el) => // https://on.cypress.io/$
// @ts-ignore TS6133 unused variable
const texts = $p.map((i, el) => // https://on.cypress.io/$
Cypress.$(el).text())

@@ -42,9 +43,9 @@

// and .get() convert this to simple array
texts = texts.get()
const paragraphs = texts.get()
// array should have length of 3
expect(texts).to.have.length(3)
expect(paragraphs).to.have.length(3)
// set this specific subject
expect(texts).to.deep.eq([
expect(paragraphs).to.deep.eq([
'Some text from first p',

@@ -51,0 +52,0 @@ 'More text from second p',

@@ -21,2 +21,3 @@ /// <reference types="Cypress" />

// log the subject to the console
// @ts-ignore TS7017
// eslint-disable-next-line no-console

@@ -31,2 +32,3 @@ console[method]('The subject is', subject)

// @ts-ignore TS2339
// eslint-disable-next-line no-unused-vars

@@ -91,6 +93,2 @@ cy.get('button').console('info').then(($button) => {

force404: false,
// eslint-disable-next-line no-unused-vars
whitelist (xhr) {
// handle custom logic for whitelisting
},
})

@@ -97,0 +95,0 @@ })

@@ -57,5 +57,20 @@ /// <reference types="Cypress" />

it('cy.screenshot() - take a screenshot', () => {
// https://on.cypress.io/screenshot
cy.screenshot('my-image')
context('Cypress.Screenshot', function () {
it('cy.screenshot() - take a screenshot', () => {
// https://on.cypress.io/screenshot
cy.screenshot('my-image')
})
it('Cypress.Screenshot.defaults() - change default config of screenshots', function () {
Cypress.Screenshot.defaults({
blackout: ['.foo'],
capture: 'viewport',
clip: { x: 0, y: 0, width: 200, height: 200 },
scale: false,
disableTimersAndAnimations: true,
screenshotOnRunFailure: true,
beforeScreenshot () { },
afterScreenshot () { },
})
})
})

@@ -62,0 +77,0 @@

@@ -49,5 +49,7 @@ /// <reference types="Cypress" />

// contentWindow is the remote page's window object
expect(typeof contentWindow === 'object').to.be.true
},
onLoad (contentWindow) {
// contentWindow is the remote page's window object
expect(typeof contentWindow === 'object').to.be.true
},

@@ -54,0 +56,0 @@ })

@@ -24,3 +24,11 @@ /// <reference types="Cypress" />

let obj = {
foo () {},
/**
* prints both arguments to the console
* @param a {string}
* @param b {string}
*/
foo (a, b) {
// eslint-disable-next-line no-console
console.log('a', a, 'b', b)
},
}

@@ -27,0 +35,0 @@

@@ -49,5 +49,24 @@ /// <reference types="Cypress" />

// https://on.cypress.io/minimatch
Cypress.minimatch('/users/1/comments', '/users/*/comments', {
let matching = Cypress.minimatch('/users/1/comments', '/users/*/comments', {
matchBase: true,
})
expect(matching, 'matching wildcard').to.be.true
matching = Cypress.minimatch("/users/1/comments/2", "/users/*/comments", {
matchBase: true
})
expect(matching, 'comments').to.be.false
// ** matches against all downstream path segments
matching = Cypress.minimatch("/foo/bar/baz/123/quux?a=b&c=2", "/foo/**", {
matchBase: true
})
expect(matching, 'comments').to.be.true
// whereas * matches only the next path segment
matching = Cypress.minimatch("/foo/bar/baz/123/quux?a=b&c=2", "/foo/*", {
matchBase: false
})
expect(matching, 'comments').to.be.false
})

@@ -59,3 +78,4 @@

// eslint-disable-next-line no-unused-vars
let time = Cypress.moment().utc('2014-04-25T19:38:53.196Z').format('h:mm A')
const time = Cypress.moment().utc('2014-04-25T19:38:53.196Z').format('h:mm A')
expect(time).to.be.a('string')

@@ -71,4 +91,8 @@ cy.get('.utility-moment').contains('3:38 PM')

/**
* @return Bluebird<string>
*/
function waitOneSecond () {
// return a promise that resolves after 1 second
// @ts-ignore TS2351 (new Cypress.Promise)
// eslint-disable-next-line no-unused-vars

@@ -89,2 +113,3 @@ return new Cypress.Promise((resolve, reject) => {

// is awaited until it resolves
// @ts-ignore TS7006
waitOneSecond().then((str) => {

@@ -91,0 +116,0 @@ expect(str).to.eq('foo')

{
"name": "cypress-example-kitchensink",
"version": "1.0.1",
"version": "1.0.2",
"description": "This is an example app used to showcase Cypress.io testing. For a full reference of our documentation, go to docs.cypress.io",

@@ -11,4 +11,5 @@ "main": "index.js",

"release": "releaser",
"types": "tsc --noEmit",
"test": "npm start & cypress run",
"pretest": "npm run lint",
"pretest": "npm run lint && npm run types",
"lint": "eslint --fix cypress/**/*.js app/assets/js/scripts.js",

@@ -38,3 +39,3 @@ "colon:names": "colon-names",

"dependencies": {
"http-server": "0.10.0",
"http-server": "0.11.1",
"npm-run-all": "^4.1.2"

@@ -45,9 +46,10 @@ },

"colon-names": "1.0.0",
"cypress": "2.1.0",
"eslint": "^4.19.1",
"cypress": "3.0.1",
"eslint": "4.19.1",
"eslint-plugin-cypress": "2.0.1",
"eslint-plugin-cypress-dev": "1.1.2",
"eslint-plugin-mocha": "4.12.0",
"stop-build": "^1.1.0"
"eslint-plugin-mocha": "5.0.0",
"stop-build": "1.1.0",
"typescript": "2.9.2"
}
}

@@ -1,2 +0,2 @@

# Kitchen Sink [![Circle CI](https://circleci.com/gh/cypress-io/cypress-example-kitchensink.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress-example-kitchensink)
# Kitchen Sink [![Circle CI](https://circleci.com/gh/cypress-io/cypress-example-kitchensink.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress-example-kitchensink) [![renovate-app badge][renovate-badge]][renovate-app]

@@ -9,2 +9,5 @@ ![kitchensink](https://cloud.githubusercontent.com/assets/1268976/14084252/e309e370-f4e7-11e5-9562-24f516563ac9.gif)

[renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg
[renovate-app]: https://renovateapp.com/
## CI status

@@ -17,3 +20,2 @@

[![Build status](https://badge.buildkite.com/d1bd1f093d97de34475da7d545c80eb2be9749eefe1c7133f0.svg)](https://buildkite.com/cypress-io/cypress-example-kitchensink) | Buildkite
[![Greenkeeper badge](https://badges.greenkeeper.io/cypress-io/cypress-example-kitchensink.svg)](https://greenkeeper.io/) | Greenkeeper.io
[![Windows build status](https://ci.appveyor.com/api/projects/status/bo4x59pha1eb18de?svg=true)](https://ci.appveyor.com/project/cypress-io/cypress-example-kitchensink) | AppVeyor

@@ -65,2 +67,8 @@ [ ![Codeship Status for cypress-io/cypress-example-kitchensink](https://app.codeship.com/projects/8d6a20c0-b70e-0133-41c6-56e5cd60fbd0/status?branch=master)](https://app.codeship.com/projects/134609) | Codeship Basic

#### 1.0.2 - *(06/28/18)*
- updated dependencies
- add Cypress.Screenshot.defaults test
- improvements to build and deploy process
- bump to node 8
#### 1.0.1 - *(05/14/18)*

@@ -67,0 +75,0 @@ - updated README to link to correct examples folder

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc