From 5a1251ee76f03b9ca3b9035dc604bbabbc724cfa Mon Sep 17 00:00:00 2001 From: Jigar Wala Date: Mon, 11 Sep 2023 21:01:02 +0530 Subject: [PATCH] combine percyCSS similar to web projects --- packages/core/src/utils.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/core/src/utils.js b/packages/core/src/utils.js index ee30d88f2..7c5ce2fad 100644 --- a/packages/core/src/utils.js +++ b/packages/core/src/utils.js @@ -48,7 +48,12 @@ export function percyAutomateRequestHandler(req, percy) { considerRegionXPaths: percy.config.snapshot.considerRegions.considerRegionXPaths }, camelCasedOptions - ]); + ], (path, prev, next) => { + switch (path.map(k => k.toString()).join('.')) { + case 'percyCSS': // concatenate percy css + return [path, [prev, next].filter(Boolean).join('\n')]; + } + }); req.body.buildInfo = percy.build; return req;