Created
October 29, 2018 12:25
-
-
Save Samueldhardy/463dbcccbb1fcbff2293a7fc30988a41 to your computer and use it in GitHub Desktop.
cypress/test/test.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('query: GetFoobar()', () => { | |
const GetFoobar = (foo, bar) => `{ | |
foo(foo: ${foo}, bar: ${bar}) { | |
id | |
foobar { | |
foo | |
bar | |
} | |
} | |
}`; | |
const foo = 'foo'; | |
const bar = 'bar'; | |
let responseData; | |
before(() => { | |
cy.postGQL(authToken, GetFoobar(foo, bar)).then( | |
res => (responseData = res.body.data), | |
); | |
}); | |
it('returns foobar', () => { | |
assert.isObject(responseData.foobar); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment