Skip to content

Commit 4f9deea

Browse files
Merge pull request #455 from LambdaTest/stage
Stage
2 parents d48efd7 + a829b67 commit 4f9deea

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lambdatest/smartui-cli",
3-
"version": "4.1.50",
3+
"version": "4.1.51",
44
"description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
55
"files": [
66
"dist/**/*"

src/lib/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ export function verifyFigmaWebConfig(ctx: Context) {
107107
if (c.screenshot_names && c.screenshot_names.length > 0 && c.figma_ids && c.figma_ids.length != c.screenshot_names.length) {
108108
throw new Error("Mismatch in Figma Ids and Screenshot Names in figma config");
109109
}
110+
if(c.screenshot_viewports && c.screenshot_viewports.length > 0 && c.figma_ids && c.figma_ids.length != c.screenshot_viewports.length) {
111+
throw new Error("Mismatch in Figma Ids and Screenshot Viewports in figma config");
112+
}
110113
if (isValidArray(c.screenshot_names)) {
111114
for (const name of c.screenshot_names) {
112115
screenshots.push(name);

src/lib/schemaValidation.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,18 @@ const FigmaWebConfigSchema: JSONSchemaType<Object> = {
739739
"type": "string"
740740
},
741741
uniqueItems: false
742+
},
743+
"screenshot_viewports": {
744+
"type": "array",
745+
"items": {
746+
"type": "array",
747+
"items": {
748+
"type": "integer",
749+
"minimum": 1
750+
},
751+
"minItems": 1,
752+
"maxItems": 2
753+
}
742754
}
743755
},
744756
"required": ["figma_file_token", "figma_ids"]

0 commit comments

Comments
 (0)