Skip to content

Instantly share code, notes, and snippets.

View jennifer-shehane's full-sized avatar

Jennifer Shehane jennifer-shehane

View GitHub Profile
title date subtitle tags
Moving to VSCode
2018-03-22 05:20:41 -0700

I don't like change. I especially drag my feet when it comes to using a new tool for development. This is why I've been reluctant to change to VSCode from my comfy Atom IDE. Seeing the new StackOverflow developer survey results pushed me over to change finally. A majority of their users are now using Visual Studio Code.

And I'm feeling the rewards from the switch pretty quickly. It wasn't as painful as I expected, but there are a few things that needed to be sorted out to put me back into my comfy workflow. I decided to document them below.

Cypress.io, Inc.

Individual Contributor License Agreement ("Agreement"), v1.0

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Cypress.io, Inc. ("Cypress.io"). Except for the license granted herein to Cypress.io and recipients of software distributed by Cypress.io, You reserve all right, title, and interest in and to Your Contributions.

1.

Definitions. "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Cypress.io. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares,

write your blog

Setting up Bitbucket Pipelines with proper caching of NPM and Cypress

Bitbucket Pipelines & Deployments is integrated CI/CD for Bitbucket Cloud that's trivial to set up, automating your code from test to production (at least that's what the official site says). However, setting up your pipelines with right commands and right caching in order to be as fast as possible requires some time. In this article, I am going to show how it can be done.

TL;DR

If you came here just to see the configuration without explanation here it is:

Description Link 👍❤️ 👀🎉
"text content" command cypress-io/cypress#630 👍 14
cy.click() fail due to 0x0 size, even though it's not cypress-io/cypress#695 👍 47
KeystrokeDelay for cy.type() cypress-io/cypress#566 👍 16
Ability to disable JS cypress-io/cypress#1611 👍 31
Print console logs to stdout + command log cypress-io/cypress#700 cypress-io/cypress#300 👍 25 + 👍 23
Print reasons why something isn't visible cypress-io/cypress#677 cypress-io/cypress#696 👍 20
Scrollto failure cypress-io/cypress#1924 👍6
it('check validation message on invalid input', () => {
cy.visit('index.html')
cy.get('input:invalid').should('have.length', 0)
cy.get('#mail').type('f') // type something invalid into input
cy.get('button').click() // submit the form
cy.get('input:invalid').should('have.length', 1)
cy.get('#mail').then(($input) => {
expect($input[0].validationMessage).to.eq('I expect an email!')
})
})
cy.server();
cy
.route({ method: 'GET', url: '/api/users/*/attributes/checkout-shipping-details' })
.as('deleteCartReq1')
.route({ method: 'GET', url: '/api/countries' }).as('deleteCartReq2')
.route({ method: 'GET', url: '/api/currencies' }).as('deleteCartReq3')
.route({ method: 'GET', url: '/api/users/*/wishlist/saved?limit=100' }).as('deleteCartReq4')
.route({ method: 'GET', url: '/api/users/*/cart/config' }).as('deleteCartReq5')
.route({ method: 'GET', url: '/api/users/*/cart/estimate' }).as('deleteCartReq6')
cy.wait(
cy.get('timeentry_lov1',{timeout : 60000}).eq(1).select('NB-860').debug();
cy.get('timeentry_lov1').eq(1).select('NB-860-Test Automation');
cy.select('timeentry_lov1',{timeout : 7000}).eq(1).should('have.value','NB-860');
cy.find('timeentry_lov1').get('select').select('NB-860');
module.exports = function() {
Cypress.Commands.add('sqlServer', (query) => {
if(!query) {
throw new Error('Query must be set');
}
cy.task('sqlServer:execute', query).then(response => {
let result = [];
const flatten = r => Array.isArray(r) && r.length === 1 ? flatten(r[0]) : r;
@jennifer-shehane
jennifer-shehane / pr-review-3-5-0.md
Last active October 21, 2019 14:23
PR Reviews (3.5.0)