Skip to content

Commit

Permalink
E2E test: Add simple test for apollo-client-devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Feb 2, 2019
1 parent 0ecd298 commit eb6848d
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 4 deletions.
7 changes: 7 additions & 0 deletions __e2e__/app.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,5 +320,12 @@ describe('Application launch', () => {
formDataWarning.message.indexOf("Detected you're enabled Network Inspect") > 0
).toBeTruthy();
});

it('should show apollo devtools panel', async () => {
const { client } = app;
expect(
(await client.execute(() => window.__APOLLO_DEVTOOLS_SHOULD_DISPLAY_PANEL__)).value
).toBeTruthy();
});
});
});
11 changes: 11 additions & 0 deletions __e2e__/fixture/apollo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Create an Apollo Client to test the bridge messages sent
* wouldn't break the debugger proxy.
*/

/* eslint-disable */
import ApolloClient from 'apollo-boost';

new ApolloClient({
uri: 'https://fakerql.com/graphql',
});
1 change: 1 addition & 0 deletions __e2e__/fixture/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import runReduxTest from './redux';
import runMobXTest from './mobx';
import runRemoteDevTest from './remotedev';
import runXHRTest from './xhr-test';
import './apollo';

runReduxTest();
runMobXTest();
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"author": "Jhen <developer@jhen.me>",
"license": "MIT",
"devDependencies": {
"apollo-boost": "^0.1.27",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.2",
"babel-loader": "^7.1.4",
Expand Down
68 changes: 64 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,22 @@ anymatch@^2.0.0:
micromatch "^3.1.4"
normalize-path "^2.1.1"

apollo-cache-inmemory@^1.1.5:
apollo-boost@^0.1.27:
version "0.1.27"
resolved "https://registry.yarnpkg.com/apollo-boost/-/apollo-boost-0.1.27.tgz#77cc796359503a330d5b31780043430afed47899"
integrity sha512-z6h4SKVR9H17sm6+aGsjhw1fPK6dmuNQbAue5YwCOrMUCQLHkP3gXvCnBXsOCF3RyWkYVygu/gjrLJtvoq14XA==
dependencies:
apollo-cache "^1.1.25"
apollo-cache-inmemory "^1.4.2"
apollo-client "^2.4.12"
apollo-link "^1.0.6"
apollo-link-error "^1.0.3"
apollo-link-http "^1.3.1"
apollo-link-state "^0.4.0"
graphql-tag "^2.4.2"
tslib "^1.9.3"

apollo-cache-inmemory@^1.1.5, apollo-cache-inmemory@^1.4.2:
version "1.4.2"
resolved "https://registry.yarnpkg.com/apollo-cache-inmemory/-/apollo-cache-inmemory-1.4.2.tgz#c91aeb4adff45cdc7872d603cbff055fa9cd5021"
integrity sha512-fDVmj5j1e3W+inyuSwjIcMgbQ4edcFgmiKTBMFAEKAq0jg33X7FrbDX8JT2t5Vuf75Mva50JDlt5wXdu7C6WuA==
Expand Down Expand Up @@ -546,7 +561,7 @@ apollo-client-devtools@2.1.7-alpha.2:
react-dom "^16.0.0"
uuid "^3.0.1"

apollo-client@^2.2.0:
apollo-client@^2.2.0, apollo-client@^2.4.12:
version "2.4.12"
resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-2.4.12.tgz#9fa15f502d04f8cc788a9fbb825163b437681504"
integrity sha512-E5ClFSB9btJLYibLKwLDSCg+w9tI+25eZgXOM+DClawu7of4d/xhuV/xvpuZpsMP3qwrp0QPacBnfG4tUJs3/w==
Expand Down Expand Up @@ -575,13 +590,36 @@ apollo-link-error@^1.0.3:
apollo-link "^1.2.6"
apollo-link-http-common "^0.2.8"

apollo-link-http-common@^0.2.10:
version "0.2.10"
resolved "https://registry.yarnpkg.com/apollo-link-http-common/-/apollo-link-http-common-0.2.10.tgz#b5bbf502ff40a81cc00281ba3b8543b7ad866dfe"
integrity sha512-KY9nhpAurw3z48OIYV0sCZFXrzWp/wjECsveK+Q9GUhhSe1kEbbUjFfmi+qigg+iELgdp5V8ioRJhinl1vPojw==
dependencies:
apollo-link "^1.2.8"

apollo-link-http-common@^0.2.8:
version "0.2.8"
resolved "https://registry.yarnpkg.com/apollo-link-http-common/-/apollo-link-http-common-0.2.8.tgz#c6deedfc2739db8b11013c3c2d2ccd657152941f"
integrity sha512-gGmXZN8mr7e9zjopzKQfZ7IKnh8H12NxBDzvp9nXI3U82aCVb72p+plgoYLcpMY8w6krvoYjgicFmf8LO20TCQ==
dependencies:
apollo-link "^1.2.6"

apollo-link-http@^1.3.1:
version "1.5.11"
resolved "https://registry.yarnpkg.com/apollo-link-http/-/apollo-link-http-1.5.11.tgz#1f72a377d03e874a08bc9eadb1ce7ecb166f1e56"
integrity sha512-wDG+I9UmpfaZRPIvTYBgkvqiCgmz6yWgvuzW/S24Q4r4Xrfe6sLpg2FmarhtdP+hdN+IXTLbFNCZ+Trgfpifow==
dependencies:
apollo-link "^1.2.8"
apollo-link-http-common "^0.2.10"

apollo-link-state@^0.4.0:
version "0.4.2"
resolved "https://registry.yarnpkg.com/apollo-link-state/-/apollo-link-state-0.4.2.tgz#ac00e9be9b0ca89eae0be6ba31fe904b80bbe2e8"
integrity sha512-xMPcAfuiPVYXaLwC6oJFIZrKgV3GmdO31Ag2eufRoXpvT0AfJZjdaPB4450Nu9TslHRePN9A3quxNueILlQxlw==
dependencies:
apollo-utilities "^1.0.8"
graphql-anywhere "^4.1.0-alpha.0"

apollo-link@^1.0.0, apollo-link@^1.0.7, apollo-link@^1.2.1, apollo-link@^1.2.6:
version "1.2.6"
resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.6.tgz#d9b5676d79c01eb4e424b95c7171697f6ad2b8da"
Expand All @@ -590,7 +628,14 @@ apollo-link@^1.0.0, apollo-link@^1.0.7, apollo-link@^1.2.1, apollo-link@^1.2.6:
apollo-utilities "^1.0.0"
zen-observable-ts "^0.8.13"

apollo-utilities@1.1.2, apollo-utilities@^1.0.0, apollo-utilities@^1.0.1, apollo-utilities@^1.0.4, apollo-utilities@^1.1.2:
apollo-link@^1.0.6, apollo-link@^1.2.8:
version "1.2.8"
resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.8.tgz#0f252adefd5047ac1a9f35ba9439d216587dcd84"
integrity sha512-lfzGRxhK9RmiH3HPFi7TIEBhhDY9M5a2ZDnllcfy5QDk7cCQHQ1WQArcw1FK0g1B+mV4Kl72DSrlvZHZJEolrA==
dependencies:
zen-observable-ts "^0.8.15"

apollo-utilities@1.1.2, apollo-utilities@^1.0.0, apollo-utilities@^1.0.1, apollo-utilities@^1.0.4, apollo-utilities@^1.0.8, apollo-utilities@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.1.2.tgz#aa5eca9d1f1eb721c381a22e0dde03559d856db3"
integrity sha512-EjDx8vToK+zkWIxc76ZQY/irRX52puNg04xf/w8R0kVTDAgHuVfnFVC01O5vE25kFnIaa5em0pFI0p9b6YMkhQ==
Expand Down Expand Up @@ -4717,6 +4762,14 @@ graphiql@^0.11.11:
codemirror-graphql "^0.6.11"
markdown-it "^8.4.0"

graphql-anywhere@^4.1.0-alpha.0:
version "4.1.27"
resolved "https://registry.yarnpkg.com/graphql-anywhere/-/graphql-anywhere-4.1.27.tgz#7d013b4c51039ea6c46839a53abe924f8fffd4f3"
integrity sha512-ErASfs9siEMrmroHU0V4heh6cIdA8K/SoYpahJFgEM6YDAwUZuycTAKIrMaK8XJI37sHZWcujF/ySuYnIkP5vw==
dependencies:
apollo-utilities "^1.1.2"
tslib "^1.9.3"

graphql-config@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/graphql-config/-/graphql-config-2.0.1.tgz#d34a9bdf1d7360af7b01db9b20260a342ddc7390"
Expand Down Expand Up @@ -4795,7 +4848,7 @@ graphql-syntax-highlighter-react@^0.3.0:
graphql "^0.7.0"
prop-types "^15.6.0"

graphql-tag@^2.6.1:
graphql-tag@^2.4.2, graphql-tag@^2.6.1:
version "2.10.1"
resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.1.tgz#10aa41f1cd8fae5373eaf11f1f67260a3cad5e02"
integrity sha512-jApXqWBzNXQ8jYa/HLkZJaVw9jgwNqZkywa2zfFn16Iv1Zb7ELNHkJaXHR7Quvd5SIGsy6Ny7SUKATgnu05uEg==
Expand Down Expand Up @@ -11251,6 +11304,13 @@ zen-observable-ts@^0.8.13:
dependencies:
zen-observable "^0.8.0"

zen-observable-ts@^0.8.15:
version "0.8.15"
resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.15.tgz#6cf7df6aa619076e4af2f707ccf8a6290d26699b"
integrity sha512-sXKPWiw6JszNEkRv5dQ+lQCttyjHM2Iks74QU5NP8mMPS/NrzTlHDr780gf/wOBqmHkPO6NCLMlsa+fAQ8VE8w==
dependencies:
zen-observable "^0.8.0"

zen-observable@^0.8.0:
version "0.8.13"
resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.13.tgz#a9f1b9dbdfd2d60a08761ceac6a861427d44ae2e"
Expand Down

0 comments on commit eb6848d

Please sign in to comment.