Skip to content

Add e2e tests #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Jun 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
65458ea
feat: add multiple tab support
ytkimirti May 20, 2025
ab3be4c
feat: add search history
ytkimirti May 20, 2025
ee65c53
feat: add keyboard support to the search
ytkimirti May 21, 2025
669505b
chore: unused import
ytkimirti May 21, 2025
076d253
chore: remove unusued hook
ytkimirti May 22, 2025
2921747
chore: rename the custom scroll component argument
ytkimirti May 22, 2025
92f561e
chore: update playground for easier debugging
ytkimirti May 26, 2025
f00dcf6
feat: add hideTabs option and fix styles
ytkimirti May 26, 2025
db7492e
feat: add a credentials form to playground
ytkimirti May 29, 2025
792425f
fix: use cloudflare version of redis to avoid direct process access
ytkimirti Jun 3, 2025
f9fbfc0
Merge branch 'master' into DX-1485
ytkimirti Jun 11, 2025
a6e1620
feat: add persistance support
ytkimirti Jun 11, 2025
8f7b999
fix: prevent useEffect from working when tab is not active
ytkimirti Jun 12, 2025
49fd950
fix: automatically rescan until a result shows up
ytkimirti Jun 12, 2025
a8dd13c
fix: only fetch when the tab is active
ytkimirti Jun 13, 2025
6fc3865
fix: skeleton and empty styles
ytkimirti Jun 13, 2025
c037dc3
fix: refactor tabs and improve next tab selection logic when current …
ytkimirti Jun 13, 2025
f9995f5
feat: add useOverflow utility hook
ytkimirti Jun 18, 2025
3faf449
fix: make the tooltip use portals
ytkimirti Jun 18, 2025
4a8fac7
fix: search recomendations overflowing
ytkimirti Jun 18, 2025
44f54dc
feat: show tooltip only when tabs is overflowing
ytkimirti Jun 18, 2025
f7efb5c
fix: adding new key sometimes throwing error
ytkimirti Jun 18, 2025
5bc9a90
fix: not being able to click anywhere after closing delete key modal
ytkimirti Jun 18, 2025
d30c551
feat: add "copy key" to dropdown menu
ytkimirti Jun 18, 2025
2d7875d
feat: make the "delete key" item red
ytkimirti Jun 18, 2025
3ae114f
fix: add zustand migration
ytkimirti Jun 19, 2025
e3df70c
feat: add e2e tests
ytkimirti Jun 24, 2025
479641f
Merge branch 'master' into DX-1946-e2e
ytkimirti Jun 26, 2025
8afd6f6
test: improve key delete tests
ytkimirti Jun 27, 2025
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
30 changes: 30 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
env:
UPSTASH_REDIS_REST_URL: ${{ secrets.UPSTASH_REDIS_REST_URL }}
UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }}
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,10 @@ next-env.d.ts

.turbo
dist

# Playwright
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"zustand": "5.0.0"
},
"devDependencies": {
"postcss-prefix-selector": "^2.1.0",
"@playwright/test": "^1.53.1",
"@types/node": "^22.8.4",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
Expand All @@ -63,9 +63,11 @@
"autoprefixer": "^10.4.14",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"dotenv": "^16.5.0",
"eslint": "9.10.0",
"eslint-plugin-unicorn": "55.0.0",
"postcss": "^8.4.31",
"postcss-prefix-selector": "^2.1.0",
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.5",
"react": "^18.3.1",
Expand All @@ -82,4 +84,4 @@
"react": "^18.2.0 || ^19",
"react-dom": "^18.2.0 || ^19"
}
}
}
71 changes: 71 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import path from "path"
import { defineConfig, devices } from "@playwright/test"
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
import dotenv from "dotenv"

dotenv.config({ path: path.resolve(__dirname, ".env") })
process.env.PLAYWRIGHT = "true"

/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: "html",
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: "http://localhost:5173",

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: "on-first-retry",
},

/* Configure projects for major browsers */
projects: [
{ name: "chromium", use: { ...devices["Desktop Chrome"] } },

{ name: "firefox", use: { ...devices["Desktop Firefox"] } },

{ name: "webkit", use: { ...devices["Desktop Safari"] } },

/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },

/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
],

/* Run your local dev server before starting the tests */
webServer: {
command: "pnpm run dev",
url: "http://localhost:5173",
reuseExistingServer: !process.env.CI,
},
})
Loading