From 21f6ac69633a2ef3497351f285f7b08208c075e4 Mon Sep 17 00:00:00 2001 From: Armando Luja Date: Mon, 16 Dec 2024 12:48:27 -0800 Subject: [PATCH 1/3] fix: pin cypress version when running from npx --- packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts b/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts index 51f050656b9..45cde3c6510 100644 --- a/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts @@ -114,7 +114,7 @@ describe('amplify pull with uibuilder', () => { const npmStartProcess = spawn(getNpmPath(), ['start'], { cwd: reactDir, timeout: 300000 }); // Give react server time to start await new Promise((resolve) => setTimeout(resolve, 60000)); - const res = execa.sync(getNpxPath(), ['cypress', 'run'], { cwd: reactDir, encoding: 'utf8' }); + const res = execa.sync(getNpxPath(), ['cypress@13.16.0', 'run'], { cwd: reactDir, encoding: 'utf8' }); // kill the react server process spawnSync('kill', [`${npmStartProcess.pid}`], { encoding: 'utf8' }); await new Promise((resolve) => setTimeout(resolve, 1000)); From 6c956b261c2ca4e3f80c5a7e089e1b27b2d1956d Mon Sep 17 00:00:00 2001 From: Armando Luja Date: Mon, 16 Dec 2024 12:50:04 -0800 Subject: [PATCH 2/3] fix: pin install version of cypress --- packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts b/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts index 45cde3c6510..ea7e4f3fb13 100644 --- a/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts @@ -98,7 +98,7 @@ describe('amplify pull with uibuilder', () => { spawnSync( getNpmPath(), // in some runs spawnSync/npx will still use an old ver of react-scripts moving it into npm install flow - ['install', '-E', '@types/react', 'cypress', '@aws-amplify/ui-react', 'aws-amplify', 'react-scripts@5'], + ['install', '-E', '@types/react', 'cypress@13.16.0', '@aws-amplify/ui-react', 'aws-amplify', 'react-scripts@5'], { cwd: reactDir }, ); From 8d3964881dc0176c94084bd2fde74f36c5ff5f56 Mon Sep 17 00:00:00 2001 From: Armando Luja Date: Mon, 16 Dec 2024 15:53:23 -0800 Subject: [PATCH 3/3] chore: downgrade to 13.15.0 --- packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts b/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts index ea7e4f3fb13..f849f1cea83 100644 --- a/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts +++ b/packages/amplify-e2e-tests/src/__tests__/uibuilder.test.ts @@ -98,7 +98,7 @@ describe('amplify pull with uibuilder', () => { spawnSync( getNpmPath(), // in some runs spawnSync/npx will still use an old ver of react-scripts moving it into npm install flow - ['install', '-E', '@types/react', 'cypress@13.16.0', '@aws-amplify/ui-react', 'aws-amplify', 'react-scripts@5'], + ['install', '-E', '@types/react', 'cypress@13.15.0', '@aws-amplify/ui-react', 'aws-amplify', 'react-scripts@5'], { cwd: reactDir }, ); @@ -114,7 +114,7 @@ describe('amplify pull with uibuilder', () => { const npmStartProcess = spawn(getNpmPath(), ['start'], { cwd: reactDir, timeout: 300000 }); // Give react server time to start await new Promise((resolve) => setTimeout(resolve, 60000)); - const res = execa.sync(getNpxPath(), ['cypress@13.16.0', 'run'], { cwd: reactDir, encoding: 'utf8' }); + const res = execa.sync(getNpxPath(), ['cypress@13.15.0', 'run'], { cwd: reactDir, encoding: 'utf8' }); // kill the react server process spawnSync('kill', [`${npmStartProcess.pid}`], { encoding: 'utf8' }); await new Promise((resolve) => setTimeout(resolve, 1000));