ftmocks-utils 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +2 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -198,12 +198,12 @@ async function resetAllMockStats({testMockData, testConfig, testName}) {
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
async function initiatePlaywrightRoutes (page, ftmocksConifg, testName) {
|
|
201
|
+
async function initiatePlaywrightRoutes (page, ftmocksConifg, testName, path = '**/*') {
|
|
202
202
|
const testMockData = testName ? loadMockDataFromConfig(ftmocksConifg, testName) : [];
|
|
203
203
|
resetAllMockStats({testMockData, testConfig: ftmocksConifg, testName});
|
|
204
204
|
const defaultMockData = getDefaultMockDataFromConfig(ftmocksConifg);
|
|
205
205
|
console.debug('calling initiatePlaywrightRoutes fetch');
|
|
206
|
-
await page.route(
|
|
206
|
+
await page.route(path, async (route, request) => {
|
|
207
207
|
const url = request.url();
|
|
208
208
|
const options = {
|
|
209
209
|
options: {
|