Skip to content

Instantly share code, notes, and snippets.

View jennifer-shehane's full-sized avatar

Jennifer Shehane jennifer-shehane

View GitHub Profile

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:

write your blog

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,

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.

!function() {
function t(t) {
t = t || {},
t.marginTop = t.marginTop || t.margin || 0,
t.marginBottom = t.marginBottom || t.margin || 0;
var e = r(o)
, n = r("#stalker")
, l = e.scrollTop()
, a = e.height()
, s = Math.max(0, i(this[0]) - t.marginTop)
! function() {
function t(t) {
t = t || {}, t.marginTop = t.marginTop || t.margin || 0, t.marginBottom = t.marginBottom || t.margin || 0;
var e = r(o),
n = r("#stalker"),
l = e.scrollTop(),
a = e.height(),
s = Math.max(0, i(this[0]) - t.marginTop),
h = t.marginTop + this.outerHeight() + t.marginBottom,
c = l;
## Tests to make sure we're calling auth0 correctly
context "popup display on login", ->
it "displays github popup", ->
cy.visit("/#/login", {
onLoad: (win) ->
@loginWithPopup = cy.stub(win.Auth0.prototype, "loginWithPopup")
})
cy.contains("Log In with GitHub").click()
.then ->
@jennifer-shehane
jennifer-shehane / normal-cy-open.log
Created February 1, 2018 20:39
Normal cypress open log
DEBUG=cypress:* ./node_modules/.bin/cypress open
cypress:cli cli starts with arguments ["/Users/jennifer/.nvm/versions/node/v6.5.0/bin/node","/Users/jennifer/Dev/Projects/cypress-example-kitchensink/node_modules/.bin/cypress","open"] +0ms
cypress:cli program parsing arguments +3ms
cypress:cli opening Cypress +1ms
cypress:cli parsed cli options {} +236ms
cypress:cli opening from options {"project":"/Users/jennifer/Dev/Projects/cypress-example-kitchensink"} +0ms
cypress:cli command line arguments ["--project","/Users/jennifer/Dev/Projects/cypress-example-kitchensink"] +0ms
cypress:cli verifying Cypress app +0ms
cypress:cli path to info.json file /Users/jennifer/Dev/Projects/cypress-example-kitchensink/node_modules/cypress/dist/info.json +0ms
cypress:cli { version: '1.4.1', verifiedVersion: '1.4.1' } +4ms

0.19.2 (----date---)

Notes:

Overview:

  • You can now run your tests in the Electron browser and will see it as an option in the browser dropdown. The Electron browser is a version of Chrome that ships with Electron. It's the browser used when running Cypress headlessly, so it may be useful for debugging issues that only occur during headless runs. Addresses #452

Features:

Bugfixes:

Login

Login not authenticated

Login error

Logging in