Skip to content

Commit c6fdc33

Browse files
committed
Additional step for percy snapshot commands
1 parent 0a6481c commit c6fdc33

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/tools/percy-snapshot-utils/utils.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export async function updateFileAndStep(
77
instruction: string,
88
) {
99
content.length = 0;
10+
const nextIndex = idx + 1;
1011

1112
content.push({
1213
type: "text",
@@ -17,12 +18,16 @@ export async function updateFileAndStep(
1718
type: "text",
1819
text: `Step 1 : You need to add percy snapshot commands in some key test cases in the file ${file} use the following instructions: \n${instruction}`,
1920
});
21+
22+
content.push({
23+
type: "text",
24+
text: `Step 2 : Confirm that Percy snapshot commands have been added at all key points of visual change in the file ${file}.`,
25+
});
2026

21-
const nextIndex = idx + 1;
2227
if (nextIndex < total) {
2328
content.push({
2429
type: "text",
25-
text: `Step 2 : Call the tool updateTestFileWithInstructions with index as ${nextIndex} out of ${total}`,
30+
text: `Step 3 : Call the tool updateTestFileWithInstructions with index as ${nextIndex} out of ${total}`,
2631
});
2732
}
2833
return content;

0 commit comments

Comments
 (0)