Skip to content

Commit 006e1e4

Browse files
fix: bump extension tester version
1 parent 5d28889 commit 006e1e4

File tree

4 files changed

+187
-175
lines changed

4 files changed

+187
-175
lines changed

.github/workflows/pr_checks.yaml

+10-88
Original file line numberDiff line numberDiff line change
@@ -567,33 +567,8 @@ jobs:
567567
if: steps.storage-cache.outputs.cache-hit != 'true'
568568
run: |
569569
cd extensions/vscode
570-
571-
# Print the extest version to check compatibility
572-
echo "Extest version:"
573-
npx extest --version || echo "Could not determine extest version"
574-
575-
# Check package.json for VSCode and chromedriver versions
576-
echo "Using VSCode/chromedriver version from package.json scripts:"
577-
grep "CODE_VERSION" package.json
578-
579-
# Run the download
580570
npm run e2e:ci:download
581571
582-
# Check what was downloaded
583-
echo "Downloaded VSCode version:"
584-
if [ -f "e2e/storage/VSCode-linux-x64/code" ]; then
585-
e2e/storage/VSCode-linux-x64/code --version
586-
else
587-
echo "VSCode binary not found"
588-
ls -la e2e/storage
589-
fi
590-
591-
echo "Downloaded chromedriver directory contents:"
592-
ls -la e2e/storage/chromedriver-linux64/ || echo "chromedriver-linux64 directory not found"
593-
594-
echo "Looking for chromedriver executable:"
595-
find e2e/storage -name "chromedriver*" -type f
596-
597572
- name: Upload e2e dependencies
598573
uses: actions/upload-artifact@v4
599574
with:
@@ -661,63 +636,10 @@ jobs:
661636
cd packages/config-yaml
662637
npm run build
663638
664-
- name: Fix VSCode binary permissions and verify environment
639+
- name: Fix VSCode binary permissions
665640
run: |
666-
cd extensions/vscode
667-
668-
echo "VSCode storage directory structure:"
669-
find e2e/storage -type d | sort
670-
671-
echo "Chromedriver files:"
672-
find e2e/storage -name "chromedriver*" -type f
673-
674-
# Fix permissions for VSCode
675-
if [ -f "e2e/storage/VSCode-linux-x64/code" ]; then
676-
chmod +x e2e/storage/VSCode-linux-x64/code
677-
echo "Fixed VSCode permissions"
678-
else
679-
echo "ERROR: VSCode binary not found at expected path"
680-
find e2e/storage -name "code" -type f
681-
fi
682-
683-
# Fix permissions for chromedriver and create symlink if needed
684-
CHROMEDRIVER_PATH=$(find e2e/storage -name "chromedriver" -type f | head -1)
685-
if [ -n "$CHROMEDRIVER_PATH" ]; then
686-
chmod +x "$CHROMEDRIVER_PATH"
687-
echo "Fixed chromedriver permissions at $CHROMEDRIVER_PATH"
688-
689-
# Create the symlink if it's not at the expected path
690-
if [ "$CHROMEDRIVER_PATH" != "e2e/storage/chromedriver" ]; then
691-
ln -sf "$(pwd)/$CHROMEDRIVER_PATH" "$(pwd)/e2e/storage/chromedriver"
692-
echo "Created symlink from $(pwd)/e2e/storage/chromedriver to $(pwd)/$CHROMEDRIVER_PATH"
693-
fi
694-
else
695-
echo "ERROR: No chromedriver found, looking for alternative chrome files:"
696-
find e2e/storage -name "*chrome*" -type f
697-
698-
# Try to find chromedriver in subdirectories
699-
CHROMEDRIVER_DIR=$(find e2e/storage -name "chromedriver*" -type d | head -1)
700-
if [ -n "$CHROMEDRIVER_DIR" ]; then
701-
CHROMEDRIVER_IN_DIR=$(find "$CHROMEDRIVER_DIR" -name "chromedriver" -type f | head -1)
702-
if [ -n "$CHROMEDRIVER_IN_DIR" ]; then
703-
chmod +x "$CHROMEDRIVER_IN_DIR"
704-
ln -sf "$(pwd)/$CHROMEDRIVER_IN_DIR" "$(pwd)/e2e/storage/chromedriver"
705-
echo "Created symlink from $(pwd)/e2e/storage/chromedriver to $(pwd)/$CHROMEDRIVER_IN_DIR"
706-
fi
707-
fi
708-
fi
709-
710-
# Create the directory structure if needed
711-
mkdir -p e2e/storage
712-
713-
# Verify the setup
714-
echo "Final check after setup:"
715-
if [ -f "e2e/storage/chromedriver" ]; then
716-
echo "Chromedriver is at the expected location"
717-
ls -la e2e/storage/chromedriver
718-
else
719-
echo "ERROR: Still could not find or create chromedriver at the expected location"
720-
fi
641+
chmod +x extensions/vscode/e2e/storage/VSCode-linux-x64/code
642+
chmod +x extensions/vscode/e2e/storage/chromedriver-linux64/chromedriver
721643
722644
- name: Set up SSH
723645
env:
@@ -748,13 +670,6 @@ jobs:
748670
cd extensions/vscode
749671
rm -rf e2e/.test-extensions/continue*
750672
751-
- name: Upload e2e test screenshots
752-
if: failure()
753-
uses: actions/upload-artifact@v4
754-
with:
755-
name: e2e-failure-screenshots
756-
path: extensions/vscode/e2e/storage/screenshots
757-
758673
- name: Sanitize test file name
759674
id: sanitize_filename
760675
if: always()
@@ -763,6 +678,13 @@ jobs:
763678
SANITIZED_FILENAME="${FILENAME//\//-}" # Replace / with - using bash parameter expansion
764679
echo "sanitized_test_file=${SANITIZED_FILENAME}" >> $GITHUB_OUTPUT
765680
681+
- name: Upload e2e test screenshots
682+
if: failure()
683+
uses: actions/upload-artifact@v4
684+
with:
685+
name: e2e-failure-screenshots-${{ steps.sanitize_filename.outputs.sanitized_test_file || 'unknown' }}-${{ matrix.command == 'e2e:ci:run-yaml' && 'yaml' || 'json' }}
686+
path: extensions/vscode/e2e/storage/screenshots
687+
766688
- name: Find e2e log file
767689
if: always()
768690
run: |

extensions/vscode/e2e/README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
### Setup
1+
# E2E Tests
2+
3+
## Setup
24

35
When running e2e tests for the first time
46

57
```bash
68
npm run e2e:all
79
```
810

9-
### Run
11+
## Run
1012

1113
Depending on what code you update, you can use a faster loop to test your changes:
1214

1315
- If you update the e2e test code and/or config.yaml/json, you can run `npm run e2e:quick`
1416
- If you update the extension code, you can run `npm run e2e:recompile`
1517
- If you update the gui code, you can run `npm run e2e:rebuild-gui`
1618

17-
### Writing tests
19+
## Writing tests
1820

1921
All e2e tests are separated (by folder) into
2022

0 commit comments

Comments
 (0)