Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
dc4d325
feat: initial e2e setup with first test implemented
refael-m Apr 6, 2026
9f6e21c
feat: initial e2e setup with first test implemented
refael-m Apr 6, 2026
ab1d15a
feat: initial e2e setup with first test implemented
refael-m Apr 6, 2026
8f201f1
feat: initial e2e setup with first test implemented
refael-m Apr 7, 2026
d9524de
feat: initial e2e setup with first test implemented
refael-m Apr 13, 2026
d58c7f9
feat: initial e2e setup with first test implemented
refael-m Apr 13, 2026
ba40d4e
feat: initial e2e setup with first test implemented
refael-m Apr 13, 2026
9939109
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
f0f8424
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
57048e6
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
71c6753
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
5e63702
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
99a7119
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
e75cf1e
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
4d77d1b
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
b6918d6
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
f069811
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
41b64d4
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
0ef114a
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
fe8d417
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
243e110
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
59bb1e2
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
d7ef659
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
a613432
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
ccc4bdc
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
6b703af
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
e3ea23a
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
e1086da
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
e3d22c3
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
479a200
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
8b20d77
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
42cadb8
feat: initial e2e setup with first test implemented
refael-m Apr 14, 2026
2efba2c
test: update workflow node version
refael-m Apr 15, 2026
6e86490
test: update workflow node version
refael-m Apr 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: 📊 E2E Tests

on:
workflow_dispatch:

jobs:
e2e:
name: E2E
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "24"

- name: Install and compile extension
run: |
npm ci
npm run compile

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.24.0
Comment on lines +20 to +28
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider switching order and use pnpm in install and compile


- name: Install E2E dependencies
run: pnpm install
working-directory: test/e2e

- name: Run E2E tests
uses: GabrielBB/xvfb-action@v1
with:
run: pnpm test:e2e
working-directory: test/e2e
env:
E2E_CLOUD: ${{ secrets.E2E_CLOUD }}
E2E_API_KEY: ${{ secrets.E2E_API_KEY }}
E2E_API_SECRET: ${{ secrets.E2E_API_SECRET }}
CI: true

- name: Generate Allure report
if: always()
run: pnpm exec allure generate allure-results -o allure-report --clean
working-directory: test/e2e

- name: Upload Allure report
if: always()
uses: actions/upload-artifact@v4
with:
name: allure-report-${{ github.run_number }}
path: test/e2e/allure-report
retention-days: 30
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,11 @@ CLAUDE.md
*.temp
temp/


# Test reports
test/e2e/allure-results/
test/e2e/allure-report/
test/e2e/.wdio-vscode-service/
test/e2e/.env
test/e2e/videos/
test/e2e/_results_/
82 changes: 82 additions & 0 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# E2E Tests

End-to-end tests for the Cloudinary VS Code extension using [WebdriverIO](https://webdriver.io/) and [wdio-vscode-service](https://github.com/webdriverio-community/wdio-vscode-service).

## Setup

```bash
cd test/e2e
pnpm install
```

## Environment variables

End-to-end runs require Cloudinary credentials in `process.env`. The `onPrepare` hook in `wdio.conf.ts` reads `E2E_CLOUD`, `E2E_API_KEY`, and `E2E_API_SECRET`, then writes `~/.cloudinary/environments.json` in the shape the extension expects (cloud name as the top-level key, with `apiKey` and `apiSecret`).

| Variable | Description |
|----------|-------------|
| `E2E_CLOUD` | Cloudinary cloud name |
| `E2E_API_KEY` | API key |
| `E2E_API_SECRET` | API secret |

**Local:** add a `test/e2e/.env` file (gitignored) such as:

## Running Tests

```bash
pnpm test:e2e
```

This will:
1. Download a VS Code binary (if not already cached in `.wdio-vscode-service/`)
2. Launch VS Code with the extension loaded
3. Run all specs in `specs/`

## Viewing Reports

After a test run, generate and open the Allure report:

```bash
pnpm test:report
```

## Project Structure

```
test/e2e/
├── wdio.conf.ts # WebdriverIO configuration
├── tsconfig.json # TypeScript config for e2e tests
├── package.json # Dependencies (separate from root)
├── specs/ # Test spec files
├── src/
│ └── utils/ # Page object utilities
```

## Writing Tests

Tests use [Mocha](https://mochajs.org/) as the test framework and the `wdio-vscode-service` page objects to interact with VS Code.

```ts
import { activityBarUtils } from '../src/utils/ActivityBarUtils.js'
import { sideBarViewUtils } from '../src/utils/SideBarViewUtils.js'

it('should open the Cloudinary view', async () => {
await activityBarUtils.openView('Cloudinary')
await sideBarViewUtils.validateSideBarViewTitle('CLOUDINARY')
await sideBarViewUtils.validateContentItemsExist(['cats', 'dogs'])
})
```

### Allure Reporting

Steps are reported via `allureReporter.addStep()` inside utility methods. WebDriver-level steps (findElement, etc.) are disabled in the config to keep reports clean.

## Configuration

Key settings in `wdio.conf.ts`:

| Setting | Value | Description |
|---------|-------|-------------|
| `browserVersion` | `'stable'` | VS Code version to test against |
| `logLevel` | `'warn'` | Suppresses verbose WebDriver logs |
| `extensionPath` | `../../` | Points to the root extension directory |
Binary file added test/e2e/assets/sample_png.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions test/e2e/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "e2e",
"type": "module",
"devDependencies": {
"@types/node": "^25.5.2",
"@wdio/allure-reporter": "^9.27.0",
"@wdio/cli": "^9.27.0",
"@wdio/globals": "^9.27.0",
"@wdio/local-runner": "^9.27.0",
"@wdio/mocha-framework": "^9.27.0",
"@wdio/spec-reporter": "^9.27.0",
"allure-commandline": "^2.38.1",
"cloudinary": "^2.9.0",
"expect-webdriverio": "^5.6.5",
"wdio-video-reporter": "^6.2.0",
"wdio-vscode-service": "^6.1.4"
},
"scripts": {
"test:e2e": "wdio run ./wdio.conf.ts",
"test:report": "allure generate allure-results -o allure-report --clean && allure open allure-report"
}
}
Loading
Loading