|
|
@ -36,11 +36,12 @@ async function withFixtures(options, testSuite) { |
|
|
|
} = options; |
|
|
|
} = options; |
|
|
|
const fixtureServer = new FixtureServer(); |
|
|
|
const fixtureServer = new FixtureServer(); |
|
|
|
const ganacheServer = new Ganache(); |
|
|
|
const ganacheServer = new Ganache(); |
|
|
|
|
|
|
|
const https = await mockttp.generateCACertificate(); |
|
|
|
|
|
|
|
const mockServer = mockttp.getLocal({ https }); |
|
|
|
let secondaryGanacheServer; |
|
|
|
let secondaryGanacheServer; |
|
|
|
let dappServer; |
|
|
|
let dappServer; |
|
|
|
let segmentServer; |
|
|
|
let segmentServer; |
|
|
|
let segmentStub; |
|
|
|
let segmentStub; |
|
|
|
let mockServer; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let webDriver; |
|
|
|
let webDriver; |
|
|
|
let failed = false; |
|
|
|
let failed = false; |
|
|
@ -91,9 +92,7 @@ async function withFixtures(options, testSuite) { |
|
|
|
}); |
|
|
|
}); |
|
|
|
await segmentServer.start(9090); |
|
|
|
await segmentServer.start(9090); |
|
|
|
} |
|
|
|
} |
|
|
|
const https = await mockttp.generateCACertificate(); |
|
|
|
await setupMocking(mockServer, testSpecificMock); |
|
|
|
mockServer = mockttp.getLocal({ https }); |
|
|
|
|
|
|
|
setupMocking(mockServer, testSpecificMock); |
|
|
|
|
|
|
|
await mockServer.start(8000); |
|
|
|
await mockServer.start(8000); |
|
|
|
if ( |
|
|
|
if ( |
|
|
|
process.env.SELENIUM_BROWSER === 'chrome' && |
|
|
|
process.env.SELENIUM_BROWSER === 'chrome' && |
|
|
@ -157,12 +156,10 @@ async function withFixtures(options, testSuite) { |
|
|
|
if (segmentServer) { |
|
|
|
if (segmentServer) { |
|
|
|
await segmentServer.stop(); |
|
|
|
await segmentServer.stop(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (mockServer) { |
|
|
|
|
|
|
|
await mockServer.stop(); |
|
|
|
await mockServer.stop(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @param {*} driver - selinium driver |
|
|
|
* @param {*} driver - selinium driver |
|
|
|