Skip to content

Commit eb6848d

Browse files
committed
E2E test: Add simple test for apollo-client-devtools
1 parent 0ecd298 commit eb6848d

File tree

5 files changed

+84
-4
lines changed

5 files changed

+84
-4
lines changed

__e2e__/app.spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,5 +320,12 @@ describe('Application launch', () => {
320320
formDataWarning.message.indexOf("Detected you're enabled Network Inspect") > 0
321321
).toBeTruthy();
322322
});
323+
324+
it('should show apollo devtools panel', async () => {
325+
const { client } = app;
326+
expect(
327+
(await client.execute(() => window.__APOLLO_DEVTOOLS_SHOULD_DISPLAY_PANEL__)).value
328+
).toBeTruthy();
329+
});
323330
});
324331
});

__e2e__/fixture/apollo.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Create an Apollo Client to test the bridge messages sent
3+
* wouldn't break the debugger proxy.
4+
*/
5+
6+
/* eslint-disable */
7+
import ApolloClient from 'apollo-boost';
8+
9+
new ApolloClient({
10+
uri: 'https://fakerql.com/graphql',
11+
});

__e2e__/fixture/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import runReduxTest from './redux';
33
import runMobXTest from './mobx';
44
import runRemoteDevTest from './remotedev';
55
import runXHRTest from './xhr-test';
6+
import './apollo';
67

78
runReduxTest();
89
runMobXTest();

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"author": "Jhen <[email protected]>",
2929
"license": "MIT",
3030
"devDependencies": {
31+
"apollo-boost": "^0.1.27",
3132
"babel-core": "^6.26.0",
3233
"babel-eslint": "^8.2.2",
3334
"babel-loader": "^7.1.4",

yarn.lock

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,22 @@ anymatch@^2.0.0:
501501
micromatch "^3.1.4"
502502
normalize-path "^2.1.1"
503503

504-
apollo-cache-inmemory@^1.1.5:
504+
apollo-boost@^0.1.27:
505+
version "0.1.27"
506+
resolved "https://registry.yarnpkg.com/apollo-boost/-/apollo-boost-0.1.27.tgz#77cc796359503a330d5b31780043430afed47899"
507+
integrity sha512-z6h4SKVR9H17sm6+aGsjhw1fPK6dmuNQbAue5YwCOrMUCQLHkP3gXvCnBXsOCF3RyWkYVygu/gjrLJtvoq14XA==
508+
dependencies:
509+
apollo-cache "^1.1.25"
510+
apollo-cache-inmemory "^1.4.2"
511+
apollo-client "^2.4.12"
512+
apollo-link "^1.0.6"
513+
apollo-link-error "^1.0.3"
514+
apollo-link-http "^1.3.1"
515+
apollo-link-state "^0.4.0"
516+
graphql-tag "^2.4.2"
517+
tslib "^1.9.3"
518+
519+
apollo-cache-inmemory@^1.1.5, apollo-cache-inmemory@^1.4.2:
505520
version "1.4.2"
506521
resolved "https://registry.yarnpkg.com/apollo-cache-inmemory/-/apollo-cache-inmemory-1.4.2.tgz#c91aeb4adff45cdc7872d603cbff055fa9cd5021"
507522
integrity sha512-fDVmj5j1e3W+inyuSwjIcMgbQ4edcFgmiKTBMFAEKAq0jg33X7FrbDX8JT2t5Vuf75Mva50JDlt5wXdu7C6WuA==
@@ -546,7 +561,7 @@ [email protected]:
546561
react-dom "^16.0.0"
547562
uuid "^3.0.1"
548563

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

593+
apollo-link-http-common@^0.2.10:
594+
version "0.2.10"
595+
resolved "https://registry.yarnpkg.com/apollo-link-http-common/-/apollo-link-http-common-0.2.10.tgz#b5bbf502ff40a81cc00281ba3b8543b7ad866dfe"
596+
integrity sha512-KY9nhpAurw3z48OIYV0sCZFXrzWp/wjECsveK+Q9GUhhSe1kEbbUjFfmi+qigg+iELgdp5V8ioRJhinl1vPojw==
597+
dependencies:
598+
apollo-link "^1.2.8"
599+
578600
apollo-link-http-common@^0.2.8:
579601
version "0.2.8"
580602
resolved "https://registry.yarnpkg.com/apollo-link-http-common/-/apollo-link-http-common-0.2.8.tgz#c6deedfc2739db8b11013c3c2d2ccd657152941f"
581603
integrity sha512-gGmXZN8mr7e9zjopzKQfZ7IKnh8H12NxBDzvp9nXI3U82aCVb72p+plgoYLcpMY8w6krvoYjgicFmf8LO20TCQ==
582604
dependencies:
583605
apollo-link "^1.2.6"
584606

607+
apollo-link-http@^1.3.1:
608+
version "1.5.11"
609+
resolved "https://registry.yarnpkg.com/apollo-link-http/-/apollo-link-http-1.5.11.tgz#1f72a377d03e874a08bc9eadb1ce7ecb166f1e56"
610+
integrity sha512-wDG+I9UmpfaZRPIvTYBgkvqiCgmz6yWgvuzW/S24Q4r4Xrfe6sLpg2FmarhtdP+hdN+IXTLbFNCZ+Trgfpifow==
611+
dependencies:
612+
apollo-link "^1.2.8"
613+
apollo-link-http-common "^0.2.10"
614+
615+
apollo-link-state@^0.4.0:
616+
version "0.4.2"
617+
resolved "https://registry.yarnpkg.com/apollo-link-state/-/apollo-link-state-0.4.2.tgz#ac00e9be9b0ca89eae0be6ba31fe904b80bbe2e8"
618+
integrity sha512-xMPcAfuiPVYXaLwC6oJFIZrKgV3GmdO31Ag2eufRoXpvT0AfJZjdaPB4450Nu9TslHRePN9A3quxNueILlQxlw==
619+
dependencies:
620+
apollo-utilities "^1.0.8"
621+
graphql-anywhere "^4.1.0-alpha.0"
622+
585623
apollo-link@^1.0.0, apollo-link@^1.0.7, apollo-link@^1.2.1, apollo-link@^1.2.6:
586624
version "1.2.6"
587625
resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.6.tgz#d9b5676d79c01eb4e424b95c7171697f6ad2b8da"
@@ -590,7 +628,14 @@ apollo-link@^1.0.0, apollo-link@^1.0.7, apollo-link@^1.2.1, apollo-link@^1.2.6:
590628
apollo-utilities "^1.0.0"
591629
zen-observable-ts "^0.8.13"
592630

593-
[email protected], apollo-utilities@^1.0.0, apollo-utilities@^1.0.1, apollo-utilities@^1.0.4, apollo-utilities@^1.1.2:
631+
apollo-link@^1.0.6, apollo-link@^1.2.8:
632+
version "1.2.8"
633+
resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.8.tgz#0f252adefd5047ac1a9f35ba9439d216587dcd84"
634+
integrity sha512-lfzGRxhK9RmiH3HPFi7TIEBhhDY9M5a2ZDnllcfy5QDk7cCQHQ1WQArcw1FK0g1B+mV4Kl72DSrlvZHZJEolrA==
635+
dependencies:
636+
zen-observable-ts "^0.8.15"
637+
638+
[email protected], 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:
594639
version "1.1.2"
595640
resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.1.2.tgz#aa5eca9d1f1eb721c381a22e0dde03559d856db3"
596641
integrity sha512-EjDx8vToK+zkWIxc76ZQY/irRX52puNg04xf/w8R0kVTDAgHuVfnFVC01O5vE25kFnIaa5em0pFI0p9b6YMkhQ==
@@ -4717,6 +4762,14 @@ graphiql@^0.11.11:
47174762
codemirror-graphql "^0.6.11"
47184763
markdown-it "^8.4.0"
47194764

4765+
graphql-anywhere@^4.1.0-alpha.0:
4766+
version "4.1.27"
4767+
resolved "https://registry.yarnpkg.com/graphql-anywhere/-/graphql-anywhere-4.1.27.tgz#7d013b4c51039ea6c46839a53abe924f8fffd4f3"
4768+
integrity sha512-ErASfs9siEMrmroHU0V4heh6cIdA8K/SoYpahJFgEM6YDAwUZuycTAKIrMaK8XJI37sHZWcujF/ySuYnIkP5vw==
4769+
dependencies:
4770+
apollo-utilities "^1.1.2"
4771+
tslib "^1.9.3"
4772+
47204773
47214774
version "2.0.1"
47224775
resolved "https://registry.yarnpkg.com/graphql-config/-/graphql-config-2.0.1.tgz#d34a9bdf1d7360af7b01db9b20260a342ddc7390"
@@ -4795,7 +4848,7 @@ graphql-syntax-highlighter-react@^0.3.0:
47954848
graphql "^0.7.0"
47964849
prop-types "^15.6.0"
47974850

4798-
graphql-tag@^2.6.1:
4851+
graphql-tag@^2.4.2, graphql-tag@^2.6.1:
47994852
version "2.10.1"
48004853
resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.1.tgz#10aa41f1cd8fae5373eaf11f1f67260a3cad5e02"
48014854
integrity sha512-jApXqWBzNXQ8jYa/HLkZJaVw9jgwNqZkywa2zfFn16Iv1Zb7ELNHkJaXHR7Quvd5SIGsy6Ny7SUKATgnu05uEg==
@@ -11251,6 +11304,13 @@ zen-observable-ts@^0.8.13:
1125111304
dependencies:
1125211305
zen-observable "^0.8.0"
1125311306

11307+
zen-observable-ts@^0.8.15:
11308+
version "0.8.15"
11309+
resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.15.tgz#6cf7df6aa619076e4af2f707ccf8a6290d26699b"
11310+
integrity sha512-sXKPWiw6JszNEkRv5dQ+lQCttyjHM2Iks74QU5NP8mMPS/NrzTlHDr780gf/wOBqmHkPO6NCLMlsa+fAQ8VE8w==
11311+
dependencies:
11312+
zen-observable "^0.8.0"
11313+
1125411314
zen-observable@^0.8.0:
1125511315
version "0.8.13"
1125611316
resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.13.tgz#a9f1b9dbdfd2d60a08761ceac6a861427d44ae2e"

0 commit comments

Comments
 (0)