Skip to content

Instantly share code, notes, and snippets.

Avatar

Samuel David Hardy Samueldhardy

View GitHub Profile
View config-cypress-example.yml
integration_tests:
<<: *defaults
docker:
## docker image file for cypress
- image: cypress/base:8
environment:
## this enables colors in the output
TERM: xterm
steps:
- attach_workspace:
View cypress-test-example.js
describe('query: GetFoobar()', () => {
const GetFoobar = (foo, bar) => `{
foo(foo: ${foo}, bar: ${bar}) {
id
foobar {
foo
bar
}
}
}`;
View cypress-commands-index-example.js
// --------------------------------------
// Log in and return auth token.
// --------------------------------------
Cypress.Commands.add('login', () => {
const apiLoginRoot = Cypress.env('API_LOGIN_ROOT');
const body = {
email,
password,
};
View cypress-plugins-index-example.js
module.exports = (on, config) => {
config.baseUrl = process.env.API_ROOT;
config.env.API_LOGIN_ROOT = process.env.API_LOGIN_ROOT;
config.env.GQL_SERVER_ROOT = process.env.GQL_SERVER_ROOT;
return config;
};
You can’t perform that action at this time.