Skip to content

Instantly share code, notes, and snippets.

💪
Crushing It

Alec Brunelle aleccool213

💪
Crushing It
Block or report user

Report or block aleccool213

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View circleci_cypress_parallel_builds_example.yml
cypress-my-app:
working_directory: '~/Development/myapp'
parallelism: 3
steps:
- run:
name: 'Run cypress tests'
command: |
cypress run --record -- --parallel --group $CIRCLE_JOB --ci-build-id $CIRCLE_WORKFLOW_ID
View custom_take_snapshot_cypress_command.ts
/**
* Takes a snapshot of the application at the moment this method is called.
*
* When running in headless mode, it takes a snapshot with Percy, which is
* useful for testing purposes when integrated with our CI process.
*
* When running in headed mode, it takes a Cypress screenshot instead,
* which is more useful for allowing a developer to see a preview.
*
* @param description A string that describes the snapshot.
View searching_duck_duck_go.ts
import { Given } from 'cypress-cucumber-preprocessor/steps';
Given('I am on DuckDuckGos website', () => {
cy.visit('https://duckduckgo.com');
});
When('the search phrase "panda" is entered', () => {
...
});
View searching_duck_duck_go.feature
Feature: Searching on DuckDuckGo
As a web surfer, I want to search DuckDuckGo, so that I can learn new things.
Background:
Given I am on DuckDuckGos website
Scenario: Simple DuckDuckGo search
When the search phrase "panda" is entered
Then results for "panda" are shown
View seed_data_cypress_example.ts
declare global {
namespace Cypress {
interface Chainable<Subject> {
createFooBar: () => Chainable<string>;
}
}
}
/**
* Creates a foo and returns a bar.
@aleccool213
aleccool213 / first_cypress_test.js
Created Dec 12, 2019
First Cypress Test on the Personal Blog
View first_cypress_test.js
describe("The Home Page", () => {
it("successfully loads", () => {
cy.visit("/");
});
it("can visit a blog post link from the home page", () => {
cy.visit("/");
cy.get("#post-page-link").click();
@aleccool213
aleccool213 / createResolver.ts
Last active Nov 21, 2019
A helper for apollo-local-state to create mutations much easier
View createResolver.ts
import { IFieldResolver } from 'graphql-tools';
import { DocumentNode } from 'graphql';
import { ResolverContext } from '.';
interface InputVariablesShape<TInput> {
input: TInput;
}
/**
View data.json
{
"nodes": [
{
"id": "n0",
"label": "A node",
"x": 0,
"y": 0,
"size": 3
},
{
@aleccool213
aleccool213 / data.json
Created Jan 11, 2018
eg for use with sigma in a codepen
View data.json
{
"nodes": [
{
"id": "n0",
"label": "A node",
"x": 0,
"y": 0,
"size": 3
},
{
View keybase.md

Keybase proof

I hereby claim:

  • I am aleccool213 on github.
  • I am aleccool21 (https://keybase.io/aleccool21) on keybase.
  • I have a public key whose fingerprint is CC4C 06E6 ACC3 42C1 BF87 6B87 C4FD 4BBC BB20 0FA5

To claim this, I am signing this object:

You can’t perform that action at this time.