cypress-example-kitchensink
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -104,3 +104,3 @@ // initialize highlight.js for JavaScript code highlighting | ||
// begin: Handle our route logic ------------- | ||
var root = 'http://jsonplaceholder.typicode.com'; | ||
var root = 'https://jsonplaceholder.typicode.com'; | ||
@@ -107,0 +107,0 @@ function getComment(e){ |
@@ -11,3 +11,2 @@ // | ||
// **** Test Structure **** | ||
@@ -22,5 +21,2 @@ // | ||
beforeEach(function(){ | ||
// **** Resetting State Before Each Test **** | ||
@@ -36,3 +32,2 @@ // | ||
// before each test. | ||
}) | ||
@@ -45,3 +40,2 @@ | ||
// **** Making Assertions **** | ||
@@ -61,3 +55,2 @@ // | ||
// subject chainer value | ||
}) | ||
@@ -85,7 +78,5 @@ | ||
cy.get('#querying .well>button:first').should('contain', 'Button') | ||
// ↲ | ||
// we can CSS selectors just like jQuery | ||
}) | ||
@@ -119,3 +110,2 @@ | ||
.contains('Save Form').should('have.class', 'btn') | ||
}) | ||
@@ -130,5 +120,3 @@ | ||
.get('input:last').should('have.attr', 'placeholder', 'Password') | ||
}) | ||
}) | ||
@@ -146,5 +134,3 @@ | ||
}) | ||
}) | ||
}) | ||
@@ -167,3 +153,2 @@ | ||
cy.get('.traversal-breadcrumb').children('.active').should('contain', 'Data') | ||
}) | ||
@@ -175,3 +160,2 @@ | ||
cy.get('.traversal-badge').closest('ul').should('have.class', 'list-group') | ||
}) | ||
@@ -183,3 +167,2 @@ | ||
cy.get('.traversal-list>li').eq(1).should('contain', 'siamese') | ||
}) | ||
@@ -191,3 +174,2 @@ | ||
cy.get('.traversal-nav>li').filter('.active').should('contain', 'About') | ||
}) | ||
@@ -205,3 +187,2 @@ | ||
cy.get('.traversal-table td').first().should('contain', '1') | ||
}) | ||
@@ -213,3 +194,2 @@ | ||
cy.get('.traversal-buttons .btn').last().should('contain', 'Submit') | ||
}) | ||
@@ -221,3 +201,2 @@ | ||
cy.get('.traversal-ul').contains('apples').next().should('contain', 'oranges') | ||
}) | ||
@@ -229,3 +208,2 @@ | ||
cy.get('.traversal-disabled .btn').not('[disabled]').should('not.contain', 'Disabled') | ||
}) | ||
@@ -237,3 +215,2 @@ | ||
cy.get('.traversal-cite').parents().should('match', 'blockquote') | ||
}) | ||
@@ -245,6 +222,3 @@ | ||
cy.get('.traversal-pills .active').siblings().should('have.length', 2) | ||
}) | ||
}) | ||
@@ -292,3 +266,2 @@ | ||
.should('have.value', 'disabled error checking') | ||
}) | ||
@@ -303,3 +276,2 @@ | ||
.prev().should('have.attr', 'style', 'color: orange;') | ||
}) | ||
@@ -314,3 +286,2 @@ | ||
.prev().should('have.attr', 'style', 'color: red;') | ||
}) | ||
@@ -327,3 +298,2 @@ | ||
.should('have.value', '') | ||
}) | ||
@@ -339,3 +309,2 @@ | ||
.next().should('contain', 'Your form has been submitted!') | ||
}) | ||
@@ -397,3 +366,2 @@ | ||
cy.get('.action-opacity>.btn').click({force: true}) | ||
}) | ||
@@ -410,3 +378,2 @@ | ||
.get('.action-input-hidden').should('be.visible') | ||
}) | ||
@@ -441,3 +408,2 @@ | ||
// **** Check Options **** | ||
@@ -454,3 +420,2 @@ // | ||
.get('.action-radios [type="radio"]').check('radio3', {force: true}).should('be.checked') | ||
}) | ||
@@ -499,3 +464,2 @@ | ||
.uncheck({force: true}).should('not.be.checked') | ||
}) | ||
@@ -518,6 +482,3 @@ | ||
cy.get('.action-select-multiple').select(['fr-apples', 'fr-oranges', 'fr-bananas']) | ||
}) | ||
}) | ||
@@ -539,3 +500,2 @@ | ||
cy.window().should('have.property', 'top') | ||
}) | ||
@@ -547,3 +507,2 @@ | ||
cy.document().should('have.property', 'charset').and('eq', 'UTF-8') | ||
}) | ||
@@ -555,3 +514,2 @@ | ||
cy.title().should('include', 'Kitchen Sink') | ||
}) | ||
@@ -631,5 +589,3 @@ }) | ||
// in between tests (the default is set in cypress.json) | ||
}) | ||
}) | ||
@@ -651,3 +607,2 @@ | ||
cy.hash().should('be.empty') | ||
}) | ||
@@ -669,3 +624,2 @@ | ||
}) | ||
}) | ||
@@ -677,5 +631,3 @@ | ||
cy.url().should('eq', 'http://localhost:8080/commands/location') | ||
}) | ||
}) | ||
@@ -704,3 +656,2 @@ | ||
cy.go('forward') | ||
@@ -713,3 +664,2 @@ cy.location().its('pathname').should('include', 'navigation') | ||
// equivalent to clicking forward | ||
@@ -722,3 +672,2 @@ cy.go(1) | ||
it('cy.reload() - reload the page', function(){ | ||
// https://on.cypress.io/api/reload | ||
@@ -729,3 +678,2 @@ cy.reload() | ||
cy.reload(true) | ||
}) | ||
@@ -735,5 +683,4 @@ | ||
// Visit any url | ||
// Visit any sub-domain of your current domain | ||
// https://on.cypress.io/api/visit | ||
cy.visit('http://www.warnerbros.com/archive/spacejam/movie/jam.htm') | ||
@@ -751,3 +698,2 @@ // Pass options to the visit | ||
}) | ||
}) | ||
@@ -769,3 +715,2 @@ | ||
.find('tbody tr:last').should('have.class', 'success') | ||
}) | ||
@@ -781,3 +726,2 @@ | ||
.and('include', 'cypress.io') | ||
}) | ||
@@ -819,7 +763,4 @@ | ||
}) | ||
}) | ||
}) | ||
}) | ||
@@ -846,3 +787,2 @@ | ||
.contains("Charles").click() | ||
}) | ||
@@ -878,3 +818,2 @@ }) | ||
.focused().should('have.id', 'description') | ||
}) | ||
@@ -895,3 +834,2 @@ | ||
.and('include', 'bar') | ||
}) | ||
@@ -944,3 +882,2 @@ | ||
.should('be.visible') | ||
}) | ||
@@ -958,3 +895,2 @@ | ||
}) | ||
}) | ||
@@ -971,5 +907,3 @@ | ||
}) | ||
}) | ||
}) | ||
@@ -1007,5 +941,3 @@ | ||
.and('contain', 'Changed') | ||
}) | ||
}) | ||
@@ -1035,5 +967,3 @@ | ||
.wait(1000) | ||
}) | ||
// | ||
@@ -1043,3 +973,2 @@ // Waiting for a specific resource to resolve | ||
// | ||
}) | ||
@@ -1089,3 +1018,2 @@ | ||
// to route will override the defaults though. | ||
}) | ||
@@ -1097,3 +1025,3 @@ | ||
cy | ||
.request('http://jsonplaceholder.typicode.com/comments').then(function(response){ | ||
.request('https://jsonplaceholder.typicode.com/comments').then(function(response){ | ||
expect(response.status).to.eq(200) | ||
@@ -1128,3 +1056,2 @@ expect(response.body).to.have.length(500) | ||
// **** POST comment route **** | ||
@@ -1148,3 +1075,2 @@ // | ||
// **** Stubbed PUT comment route **** | ||
@@ -1171,5 +1097,3 @@ // | ||
.get('.network-put-comment').should('contain', message) | ||
}) | ||
}) | ||
@@ -1229,3 +1153,2 @@ | ||
.and('include', 'Using fixtures to represent data') | ||
}) | ||
@@ -1293,5 +1216,3 @@ | ||
}) | ||
}) | ||
}) | ||
@@ -1342,3 +1263,2 @@ | ||
expect(cookies[0]).to.have.property('path') | ||
}) | ||
@@ -1396,3 +1316,2 @@ }) | ||
.getCookies().should('be.empty') | ||
}) | ||
@@ -1418,3 +1337,3 @@ | ||
// https://on.cypress.io/api/cypress-underscore | ||
.request('http://jsonplaceholder.typicode.com/users').then(function(response){ | ||
.request('https://jsonplaceholder.typicode.com/users').then(function(response){ | ||
var _ = Cypress._ | ||
@@ -1425,3 +1344,2 @@ var ids = _.chain(response.body).pluck('id').first(3).value() | ||
}) | ||
}) | ||
@@ -1439,3 +1357,2 @@ | ||
.should('have.class', 'active') | ||
}) | ||
@@ -1453,3 +1370,2 @@ | ||
.should('have.class', 'badge') | ||
}) | ||
@@ -1476,3 +1392,2 @@ | ||
}) | ||
}) | ||
@@ -1507,3 +1422,2 @@ | ||
}) | ||
}) | ||
@@ -1537,7 +1451,5 @@ | ||
// *** get a single configuration option ** | ||
expect(Cypress.config('pageLoadTimeout')).to.eq(30000) | ||
// *** set a single configuration option ** | ||
@@ -1552,5 +1464,3 @@ // | ||
Cypress.config('pageLoadTimeout', 30000) | ||
}) | ||
}) | ||
@@ -1588,3 +1498,2 @@ | ||
expect(Cypress.env()).to.have.property('api_server', 'http://localhost:8888/api/v2/') | ||
}) | ||
@@ -1615,3 +1524,2 @@ }) | ||
cy.setCookie('fakeCookie', '123ABC') | ||
}) | ||
@@ -1628,3 +1536,2 @@ | ||
Cypress.Cookies.preserveOnce('lastCookie') | ||
}) | ||
@@ -1639,5 +1546,3 @@ | ||
}) | ||
}) | ||
}) | ||
@@ -1664,5 +1569,3 @@ | ||
expect(Cypress.Dom.isHidden(visibleP)).to.be.false | ||
}) | ||
}) | ||
@@ -1683,3 +1586,2 @@ | ||
it('Cypress.Server.defaults() - change default config of server', function(){ | ||
Cypress.Server.defaults({ | ||
@@ -1692,7 +1594,4 @@ delay: 0, | ||
}) | ||
}) | ||
}) | ||
}) | ||
}) |
{ | ||
"name": "cypress-example-kitchensink", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "This is an example app used to showcase Cypress.io testing. For a full reference of our documentation, go to docs.cypress.io", | ||
@@ -9,3 +9,4 @@ "main": "index.js", | ||
"dev": "npm start -- -o", | ||
"release": "rm -f ./cypress.json && releaser" | ||
"release": "rm -f ./cypress.json && releaser", | ||
"test": "npm start & cypress run" | ||
}, | ||
@@ -12,0 +13,0 @@ "repository": { |
@@ -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.1 | ||
- remove spacejam visit, use https | ||
#### 0.4.0 | ||
@@ -76,0 +79,0 @@ - added cy.screenshot example |
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
112
2236022