File tree Expand file tree Collapse file tree 5 files changed +1314
-4071
lines changed
testassets/InteropTestsGrpcWebWebsite/Tests Expand file tree Collapse file tree 5 files changed +1314
-4071
lines changed Original file line number Diff line number Diff line change 1
- version : ' 3'
2
1
services :
3
2
grpcweb-server :
4
3
build :
Original file line number Diff line number Diff line change 1
- version : ' 3'
2
1
services :
3
2
container-frontend :
4
3
build :
Original file line number Diff line number Diff line change 1
1
const JestPuppeteerEnvironment = require ( "jest-environment-puppeteer" ) . TestEnvironment ;
2
+
3
+ // expect-puppeteer requires jest's expect to be on the global object.
4
+ // If the global object isn't populated then there is a null reference error in expect-puppeteer.
5
+ global . expect = require ( 'expect' ) . expect ;
2
6
const expect = require ( 'expect-puppeteer' ) . expect ;
3
7
4
8
class CustomEnvironment extends JestPuppeteerEnvironment {
5
9
// Load page and get test names to run
6
10
async setup ( ) {
7
11
await super . setup ( ) ;
8
12
13
+ // Workaround puppeteer bug: https://github.com/argos-ci/jest-puppeteer/issues/586
14
+ if ( this . global . context . isIncognito === undefined ) {
15
+ this . global . context . isIncognito = ( ) => false ;
16
+ }
17
+
9
18
console . log ( 'Calling gRPC-Web client app' ) ;
10
19
11
20
var page = this . global . page ;
12
21
await page . goto ( 'http://localhost:8081' , { waitUntil : 'networkidle0' } ) ;
13
22
14
- // Wait for Blazor to finish loading
23
+ // Wait for Blazor to finish loading.
15
24
await expect ( page ) . toMatchTextContent ( 'gRPC-Web interop tests' ) ;
16
25
17
- // Get test names
26
+ // Get test names.
18
27
this . global . __GRPC_WEB_TEST_NAMES__ = await page . evaluate ( ( ) => getTestNames ( 'GrpcWeb' ) ) ;
19
28
this . global . __GRPC_WEB_TEXT_TEST_NAMES__ = await page . evaluate ( ( ) => getTestNames ( 'GrpcWebText' ) ) ;
20
29
}
You can’t perform that action at this time.
0 commit comments