Socket
Socket
Sign inDemoInstall

cypress-example-kitchensink

Package Overview
Dependencies
Maintainers
2
Versions
82
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 0.3.0 to 0.4.0

47

cypress/integration/example_spec.js

@@ -90,4 +90,26 @@ //

// https://on.cypress.io/api/contains
cy.get('.query-list').contains('bananas').should('have.class', 'third')
cy
.get('.query-list')
.contains('bananas').should('have.class', 'third')
// we can even pass a regexp to `cy.contains()`
.get('.query-list')
.contains(/^b\w+/).should('have.class', 'third')
// `cy.contains()` will return the first matched element
.get('.query-list')
.contains('apples').should('have.class', 'first')
// passing a selector to contains will return the parent
// selector containing the text
.get('#querying')
.contains('ul', 'oranges').should('have.class', 'query-list')
// `cy.contains()` will favor input[type='submit'],
// button, a, and label over deeper elements inside them
// this will not return the <span> inside the button,
// but the <button> itself
.get('.query-button')
.contains('Save Form').should('have.class', 'btn')
})

@@ -232,3 +254,3 @@

// cy.type() may include special character sequences
.type('{leftarrow}{leftarrow}{del}{del}{selectall}{backspace}')
.type('{leftarrow}{rightarrow}{uparrow}{downarrow}{del}{selectall}{backspace}')

@@ -814,2 +836,8 @@ // **** Type Options ****

it("cy.screenshot() - take a screenshot", function(){
// https://on.cypress.io/api/screenshot
cy.screenshot("my-image")
})
it('cy.wrap() - wrap an object', function(){

@@ -834,5 +862,16 @@

//
// Some commands are just used to manipulate
// Some commands are just used to manipulate elements,
// properties or invoke functions on the current subject
it('cy.each() - iterate over an array of elements', function(){
// https://on.cypress.io/api/each
cy
.get('.connectors-each-ul>li')
.each(function($el, index, $list){
console.log($el, index, $list)
})
})
it('cy.its() - get properties on the current subject', function(){

@@ -842,3 +881,3 @@

cy
.get('.connectors-ul>li')
.get('.connectors-its-ul>li')
// calls the 'length' property returning that value

@@ -845,0 +884,0 @@ .its('length')

2

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

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -74,2 +74,5 @@ # 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) [![Travis CI](https://travis-ci.org/cypress-io/cypress-example-kitchensink.svg?branch=master)](https://travis-ci.org/cypress-io/cypress-example-kitchensink) [![Codeship Status for cypress-io/cypress-example-kitchensink](https://codeship.com/projects/8d6a20c0-b70e-0133-41c6-56e5cd60fbd0/status?branch=master)](https://codeship.com/projects/134609)

#### 0.4.0
- added cy.screenshot example
#### 0.3.0

@@ -76,0 +79,0 @@ - added cy.exec() command examples

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

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