-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from FalkorDB/tests
test implementation
- Loading branch information
Showing
17 changed files
with
692 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Playwright Tests | ||
|
||
on: | ||
push: | ||
branches: master | ||
pull_request: | ||
branches: master | ||
|
||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ./ui | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Set up environment and run tests | ||
run: | | ||
npm run build | ||
npm start & | ||
npx playwright test --reporter=dot,list | ||
# Step 6: Upload Playwright report | ||
- name: Upload Playwright report | ||
uses: actions/upload-artifact@v4 | ||
if: ${{ always() }} | ||
with: | ||
name: playwright-report | ||
path: ui/playwright-report/ | ||
retention-days: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { defineConfig, devices } from '@playwright/test'; | ||
|
||
/** | ||
* Read environment variables from file. | ||
* https://github.com/motdotla/dotenv | ||
*/ | ||
// import dotenv from 'dotenv'; | ||
// import path from 'path'; | ||
// dotenv.config({ path: path.resolve(__dirname, '.env') }); | ||
|
||
/** | ||
* See https://playwright.dev/docs/test-configuration. | ||
*/ | ||
export default defineConfig({ | ||
testDir: './tests/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 ? 2 : 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://127.0.0.1:3000', | ||
|
||
/* 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'] }, | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import urls from '../config/urls.json'; | ||
|
||
export const headerItems: { navItem: string; expectedRes: string }[] = [ | ||
{ navItem: "Home", expectedRes: urls.falkorDBUrl }, | ||
{ navItem: "Github", expectedRes: urls.benchmarkGithubUrl }, | ||
{ navItem: "Discord", expectedRes: urls.falkordbDiscordUrl }, | ||
{ navItem: "Sign up", expectedRes: urls.signUpUrl }, | ||
{ navItem: "Start Free", expectedRes: urls.startFreeUrl }, | ||
]; | ||
|
||
export const footerItems: { item: string; expectedRes: string }[] = [ | ||
{ item: "DATASET USED", expectedRes: urls.DatasetUrl }, | ||
{ item: "README", expectedRes: urls.ReadmeUrl }, | ||
{ item: "FAQ", expectedRes: urls.FAQUrl }, | ||
{ item: "RUN THE BENCHMARK", expectedRes: urls.runBenchmarkWithYourDataUrl }, | ||
]; | ||
|
||
export const sideBarItems: { item: string; expectedRes: boolean }[] = [ | ||
{ item: "MacBook", expectedRes: true }, | ||
{ item: "1000 m/s", expectedRes: true }, | ||
{ item: "40", expectedRes: true }, | ||
{ item: "Neo4j", expectedRes: false }, | ||
]; | ||
|
||
export const hoverItems: { item: string; expectedRes: boolean }[] = [ | ||
{ item: "MacBook", expectedRes: true }, | ||
{ item: "Linux", expectedRes: true }, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"baseUrl": "http://localhost:3000/", | ||
"falkorDBUrl": "https://www.falkordb.com/", | ||
"benchmarkGithubUrl": "https://github.com/FalkorDB/benchmark", | ||
"falkordbDiscordUrl": "https://discord.com/invite/99y2Ubh6tg", | ||
"signUpUrl": "https://app.falkordb.cloud/signup", | ||
"startFreeUrl": "https://www.falkordb.com/try-free/", | ||
"DatasetUrl": "https://github.com/FalkorDB/benchmark/blob/master/readme.md#data", | ||
"ReadmeUrl": "https://github.com/FalkorDB/benchmark/blob/master/readme.md", | ||
"FAQUrl": "https://github.com/FalkorDB/benchmark/blob/master/readme.md#faq", | ||
"runBenchmarkWithYourDataUrl": "https://github.com/FalkorDB/benchmark/blob/master/readme.md#installation-steps" | ||
} |
Oops, something went wrong.