Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
grpcweb-server:
build:
Expand Down
1 change: 0 additions & 1 deletion examples/Container/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
container-frontend:
build:
Expand Down
13 changes: 11 additions & 2 deletions testassets/InteropTestsGrpcWebWebsite/Tests/custom-environment.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
const JestPuppeteerEnvironment = require("jest-environment-puppeteer").TestEnvironment;

// expect-puppeteer requires jest's expect to be on the global object.
// If the global object isn't populated then there is a null reference error in expect-puppeteer.
global.expect = require('expect').expect;
const expect = require('expect-puppeteer').expect;

class CustomEnvironment extends JestPuppeteerEnvironment {
// Load page and get test names to run
async setup() {
await super.setup();

// Workaround puppeteer bug: https://github.com/argos-ci/jest-puppeteer/issues/586
if (this.global.context.isIncognito === undefined) {
this.global.context.isIncognito = () => false;
}

console.log('Calling gRPC-Web client app');

var page = this.global.page;
await page.goto('http://localhost:8081', { waitUntil: 'networkidle0' });

// Wait for Blazor to finish loading
// Wait for Blazor to finish loading.
await expect(page).toMatchTextContent('gRPC-Web interop tests');

// Get test names
// Get test names.
this.global.__GRPC_WEB_TEST_NAMES__ = await page.evaluate(() => getTestNames('GrpcWeb'));
this.global.__GRPC_WEB_TEXT_TEST_NAMES__ = await page.evaluate(() => getTestNames('GrpcWebText'));
}
Expand Down
Loading