Skip to content
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

Qa/initialize automation #21

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ac13d11
Merge pull request #2 from khaosans/feature/editor
khaosans Sep 27, 2024
c9ab50b
Feature/unit test (#3)
khaosans Sep 27, 2024
f0b9f1f
unit test (#4)
khaosans Sep 28, 2024
b5fcfe6
working test (#6)
khaosans Sep 28, 2024
028faf5
Feature/add component tests (#7)
khaosans Sep 29, 2024
b07c47e
kebabo (#10)
khaosans Sep 29, 2024
19fe817
Task/client mock (#12)
khaosans Sep 29, 2024
6e1d924
Feature/dropdown (#15)
khaosans Oct 3, 2024
5951806
Feature/endpoint (#16)
khaosans Oct 3, 2024
783a524
feat: Add toast, Jest setup, quick search, global types, support page…
khaosans Oct 3, 2024
08c26a2
Feature/agents (#17)
khaosans Oct 3, 2024
3d91da7
Feature/update styles (#18)
khaosans Oct 3, 2024
1c6c260
Task/fix (#19)
khaosans Oct 3, 2024
65c770c
add back login
khaosans Oct 3, 2024
17e90a5
move to components out dir
khaosans Oct 3, 2024
f30a587
add tests
khaosans Oct 3, 2024
6eaf51f
chore: Refactor project structure and add new features
khaosans Oct 3, 2024
dadbe23
add e2e
khaosans Oct 3, 2024
bce15da
update
khaosans Oct 3, 2024
8eb02a5
Merge branch 'main' into qa/initialize-automation
khaosans Oct 3, 2024
56afdbd
fix
khaosans Oct 3, 2024
cf3f1a4
update
khaosans Oct 3, 2024
32ca809
update our e2e
khaosans Oct 3, 2024
3af16a6
fix
khaosans Oct 3, 2024
02d5363
fix
khaosans Oct 3, 2024
19033c9
fix
khaosans Oct 3, 2024
412db55
rm file
khaosans Oct 3, 2024
86f54f2
use npm
khaosans Oct 3, 2024
470ff57
fix playwrite
khaosans Oct 3, 2024
2f25d2d
fix playwrite
khaosans Oct 3, 2024
f8a6b38
playwrite
khaosans Oct 4, 2024
bbcf34b
Update Playwright workflow to trigger on deployment status
khaosans Oct 4, 2024
65f6104
Update Playwright workflow to trigger on deployment status
khaosans Oct 4, 2024
f9deef2
Update Playwright workflow to trigger on deployment status
khaosans Oct 4, 2024
dad37ac
Update Playwright workflow to trigger on deployment status
khaosans Oct 4, 2024
5968cb8
Update Playwright workflow to trigger on deployment status
khaosans Oct 4, 2024
3ef4ded
Update Playwright workflow to trigger on deployment status
khaosans Oct 4, 2024
fbd86ab
Update Playwright workflow to trigger on deployment status
khaosans Oct 4, 2024
200a3c1
Update Playwright workflow to trigger on deployment status
khaosans Oct 4, 2024
900c079
Update Playwright workflow to trigger on deployment status
khaosans Oct 4, 2024
7342f60
Update Playwright workflow to trigger on deployment status
khaosans Oct 4, 2024
1a13aeb
Update Playwright workflow to trigger on deployment status
khaosans Oct 4, 2024
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
11 changes: 7 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "next/core-web-vitals",
// Remove invalid options
// "useEslintrc": false,
// "extensions": [".ts", ".tsx"]
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"root": true
}
20 changes: 20 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Playwright Tests

on:
deployment_status: # Trigger on deployment status changes

jobs:
run-e2es: # Job name for end-to-end tests
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' # Run only if deployment is successful
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install dependencies
run: npm ci && npx playwright install --with-deps # Install dependencies and Playwright browsers
- name: Set BASE_URL
run: echo "BASE_URL=${{ github.event.deployment_status.environment_url }}" >> $GITHUB_ENV # Set BASE_URL from deployment status
- name: Run tests
run: npx playwright test # Execute Playwright tests
env:
VERCEL_AUTOMATION_BYPASS_SECRET: ${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}
30 changes: 3 additions & 27 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,11 @@
name: Unit Tests

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]

branches: [main]
jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Install dependencies
run: pnpm install

- name: Run tests
run: pnpm test

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- run: echo "No unit tests configured yet"
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
/.next/
/out/

.env*

# production
/build

Expand All @@ -35,3 +37,10 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts
.aider*
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/

package-lock.json
2 changes: 1 addition & 1 deletion __tests__/Notification.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Notification from '../components/Notification';

describe('Notification Component', () => {
it('renders the notification message', () => {
render(<Notification message="Test notification" />);
render(<Notification message="Test notification" type={'success'} />);
expect(screen.getByText(/test notification/i)).toBeInTheDocument();
});
});
Loading