New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cypress/core-example

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cypress/core-example - npm Package Compare versions

Comparing version 0.5.5 to 0.6.0

65

cypress/integration/example_spec.js

@@ -229,2 +229,8 @@ //

// cy.type() may additionally include key modifiers
.type('{alt}{option}') //these are equivalent
.type('{ctrl}{control}') //these are equivalent
.type('{meta}{command}{cmd}') //these are equivalent
.type('{shift}')
// **** Type Options ****

@@ -240,3 +246,4 @@ //

// (generally due to the app not properly throttling events)
.type('slow.typing@email.com', {delay: 100}).should('have.value', 'slow.typing@email.com')
.type('slow.typing@email.com', {delay: 100})
.should('have.value', 'slow.typing@email.com')

@@ -1043,14 +1050,17 @@ .get('.action-disabled')

context('Fixtures', function(){
context('Files', function(){
beforeEach(function(){
cy.visit('https://example.cypress.io/commands/fixtures')
cy.visit('https://example.cypress.io/commands/files')
})
// **** Fixtures ****
// **** Files ****
//
// Instead of writing a response inline you can
// connect a response with a fixture file
// located in _fixtures folder.
// Use files to represent data
// or read / write files in your project
it('cy.fixture() - load a fixture', function(){
// Instead of writing a response inline you can
// connect a response with a fixture file
// located in fixtures folder.
cy.server()

@@ -1098,2 +1108,43 @@

it('cy.readFile() - read a files contents', function(){
// You can read a file and returns its contents
// The filePath is relative to your project's root.
cy
// https://on.cypress.io/api/readfile
.readFile('app/commands/actions.html')
.then(function (html) {
expect(html).to.include('<!DOCTYPE html>')
})
})
it('cy.writeFile() - write to a file', function(){
// You can write to a file with the specified contents
// If the path to the file does not exist, the file
// and it's path will be created.
// If the file already exists, it will be over-written.
cy
// Use a response from a request to automatically
// generate a fixture file for use later
.request('https://jsonplaceholder.typicode.com/users').then(function(response){
// https://on.cypress.io/api/writefile
cy.writeFile('cypress/fixtures/users.json', response.body)
})
.fixture('users').then(function(users){
expect(users[0].name).to.exist
})
cy
// JavaScript arrays and objects are stringified and formatted into text.
.writeFile('cypress/fixtures/profile.json', { id: 8739, name: 'Jane', email: 'jane@example.com'})
.fixture('profile').then(function(profile){
expect(profile.name).to.eq('Jane')
})
})
})

@@ -1100,0 +1151,0 @@

4

package.json
{
"name": "@cypress/core-example",
"version": "0.5.5",
"version": "0.6.0",
"description": "Interal Cypress repo for managing https://example.cypress.io",

@@ -18,3 +18,3 @@ "main": "index.js",

"dependencies": {
"cypress-example-kitchensink": "0.4.2",
"cypress-example-kitchensink": "0.5.0",
"glob": "^7.0.3"

@@ -21,0 +21,0 @@ },

@@ -39,2 +39,5 @@ ## Cypress Example [![Circle CI](https://circleci.com/gh/cypress-io/cypress-core-example.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress-core-example) [![Travis CI Build Status](https://travis-ci.org/cypress-io/cypress-core-example.svg?branch=master)](https://travis-ci.org/cypress-io/cypress-core-example)

#### 0.6.0
- new cy commands
#### 0.5.5

@@ -41,0 +44,0 @@ - do not postinstall

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