gcharanteja commited on
Commit ·
b7b437a
1
Parent(s): 8e07ffa
pala
Browse files- .gitignore +6 -0
- package-lock.json +107 -0
- package.json +7 -2
- playwright.config.ts +79 -0
- tests/example.spec.ts +18 -0
.gitignore
CHANGED
|
@@ -1,2 +1,8 @@
|
|
| 1 |
node_modules
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
node_modules
|
| 2 |
|
| 3 |
+
# Playwright
|
| 4 |
+
/test-results/
|
| 5 |
+
/playwright-report/
|
| 6 |
+
/blob-report/
|
| 7 |
+
/playwright/.cache/
|
| 8 |
+
/playwright/.auth/
|
package-lock.json
CHANGED
|
@@ -13,12 +13,18 @@
|
|
| 13 |
"axios": "^1.16.1",
|
| 14 |
"chroma": "^0.0.1",
|
| 15 |
"chromadb": "^3.4.3",
|
|
|
|
| 16 |
"express": "^5.2.1",
|
| 17 |
"fs-extra": "^11.3.5",
|
| 18 |
"gray-matter": "^4.0.3",
|
|
|
|
| 19 |
"openai": "^6.39.0",
|
| 20 |
"path": "^0.12.7",
|
| 21 |
"readline": "^1.3.0"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
}
|
| 23 |
},
|
| 24 |
"node_modules/@hono/node-server": {
|
|
@@ -73,6 +79,32 @@
|
|
| 73 |
}
|
| 74 |
}
|
| 75 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
"node_modules/accepts": {
|
| 77 |
"version": "2.0.0",
|
| 78 |
"resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
|
|
@@ -451,6 +483,18 @@
|
|
| 451 |
"node": ">= 0.8"
|
| 452 |
}
|
| 453 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 454 |
"node_modules/dunder-proto": {
|
| 455 |
"version": "1.0.1",
|
| 456 |
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
|
@@ -779,6 +823,21 @@
|
|
| 779 |
"node": ">=14.14"
|
| 780 |
}
|
| 781 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 782 |
"node_modules/function-bind": {
|
| 783 |
"version": "1.1.2",
|
| 784 |
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
|
@@ -1125,6 +1184,15 @@
|
|
| 1125 |
"node": ">= 0.6"
|
| 1126 |
}
|
| 1127 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1128 |
"node_modules/object-assign": {
|
| 1129 |
"version": "4.1.1",
|
| 1130 |
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
|
@@ -1235,6 +1303,38 @@
|
|
| 1235 |
"node": ">=16.20.0"
|
| 1236 |
}
|
| 1237 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1238 |
"node_modules/process": {
|
| 1239 |
"version": "0.11.10",
|
| 1240 |
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
|
|
@@ -1575,6 +1675,13 @@
|
|
| 1575 |
"url": "https://opencollective.com/express"
|
| 1576 |
}
|
| 1577 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1578 |
"node_modules/universalify": {
|
| 1579 |
"version": "2.0.1",
|
| 1580 |
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
|
|
|
|
| 13 |
"axios": "^1.16.1",
|
| 14 |
"chroma": "^0.0.1",
|
| 15 |
"chromadb": "^3.4.3",
|
| 16 |
+
"dotenv": "^17.4.2",
|
| 17 |
"express": "^5.2.1",
|
| 18 |
"fs-extra": "^11.3.5",
|
| 19 |
"gray-matter": "^4.0.3",
|
| 20 |
+
"nodemailer": "^9.0.3",
|
| 21 |
"openai": "^6.39.0",
|
| 22 |
"path": "^0.12.7",
|
| 23 |
"readline": "^1.3.0"
|
| 24 |
+
},
|
| 25 |
+
"devDependencies": {
|
| 26 |
+
"@playwright/test": "^1.61.1",
|
| 27 |
+
"@types/node": "^26.1.1"
|
| 28 |
}
|
| 29 |
},
|
| 30 |
"node_modules/@hono/node-server": {
|
|
|
|
| 79 |
}
|
| 80 |
}
|
| 81 |
},
|
| 82 |
+
"node_modules/@playwright/test": {
|
| 83 |
+
"version": "1.61.1",
|
| 84 |
+
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.61.1.tgz",
|
| 85 |
+
"integrity": "sha512-8nKv6+0RJSL9FE4jYOEGXnPeM/Hg12qZpmqzZjRh3qM0Y7c3z1mrOTfFLids72RDQYVh9WpLEfR5WdpNX4fkig==",
|
| 86 |
+
"dev": true,
|
| 87 |
+
"license": "Apache-2.0",
|
| 88 |
+
"dependencies": {
|
| 89 |
+
"playwright": "1.61.1"
|
| 90 |
+
},
|
| 91 |
+
"bin": {
|
| 92 |
+
"playwright": "cli.js"
|
| 93 |
+
},
|
| 94 |
+
"engines": {
|
| 95 |
+
"node": ">=18"
|
| 96 |
+
}
|
| 97 |
+
},
|
| 98 |
+
"node_modules/@types/node": {
|
| 99 |
+
"version": "26.1.1",
|
| 100 |
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.1.tgz",
|
| 101 |
+
"integrity": "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==",
|
| 102 |
+
"dev": true,
|
| 103 |
+
"license": "MIT",
|
| 104 |
+
"dependencies": {
|
| 105 |
+
"undici-types": "~8.3.0"
|
| 106 |
+
}
|
| 107 |
+
},
|
| 108 |
"node_modules/accepts": {
|
| 109 |
"version": "2.0.0",
|
| 110 |
"resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
|
|
|
|
| 483 |
"node": ">= 0.8"
|
| 484 |
}
|
| 485 |
},
|
| 486 |
+
"node_modules/dotenv": {
|
| 487 |
+
"version": "17.4.2",
|
| 488 |
+
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz",
|
| 489 |
+
"integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==",
|
| 490 |
+
"license": "BSD-2-Clause",
|
| 491 |
+
"engines": {
|
| 492 |
+
"node": ">=12"
|
| 493 |
+
},
|
| 494 |
+
"funding": {
|
| 495 |
+
"url": "https://dotenvx.com"
|
| 496 |
+
}
|
| 497 |
+
},
|
| 498 |
"node_modules/dunder-proto": {
|
| 499 |
"version": "1.0.1",
|
| 500 |
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
|
|
|
| 823 |
"node": ">=14.14"
|
| 824 |
}
|
| 825 |
},
|
| 826 |
+
"node_modules/fsevents": {
|
| 827 |
+
"version": "2.3.2",
|
| 828 |
+
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
|
| 829 |
+
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
| 830 |
+
"dev": true,
|
| 831 |
+
"hasInstallScript": true,
|
| 832 |
+
"license": "MIT",
|
| 833 |
+
"optional": true,
|
| 834 |
+
"os": [
|
| 835 |
+
"darwin"
|
| 836 |
+
],
|
| 837 |
+
"engines": {
|
| 838 |
+
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
| 839 |
+
}
|
| 840 |
+
},
|
| 841 |
"node_modules/function-bind": {
|
| 842 |
"version": "1.1.2",
|
| 843 |
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
|
|
|
| 1184 |
"node": ">= 0.6"
|
| 1185 |
}
|
| 1186 |
},
|
| 1187 |
+
"node_modules/nodemailer": {
|
| 1188 |
+
"version": "9.0.3",
|
| 1189 |
+
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-9.0.3.tgz",
|
| 1190 |
+
"integrity": "sha512-n+YP+NKwR5zRWa60k3GiQ6Q3B4KXCoAw40dAKeCtYn020iNN74aWK2liXIC3ZEATeGql7we3tE3t8QwhY0eskw==",
|
| 1191 |
+
"license": "MIT-0",
|
| 1192 |
+
"engines": {
|
| 1193 |
+
"node": ">=6.0.0"
|
| 1194 |
+
}
|
| 1195 |
+
},
|
| 1196 |
"node_modules/object-assign": {
|
| 1197 |
"version": "4.1.1",
|
| 1198 |
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
|
|
|
| 1303 |
"node": ">=16.20.0"
|
| 1304 |
}
|
| 1305 |
},
|
| 1306 |
+
"node_modules/playwright": {
|
| 1307 |
+
"version": "1.61.1",
|
| 1308 |
+
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.61.1.tgz",
|
| 1309 |
+
"integrity": "sha512-DWnY5o3YbLWK4GovuAVwpqL+1VwGNdUGrRr++8j8PtQQzvAVZUIMjKQ90fY689sEJZJBbZVw1rXaOKSTitkzPQ==",
|
| 1310 |
+
"dev": true,
|
| 1311 |
+
"license": "Apache-2.0",
|
| 1312 |
+
"dependencies": {
|
| 1313 |
+
"playwright-core": "1.61.1"
|
| 1314 |
+
},
|
| 1315 |
+
"bin": {
|
| 1316 |
+
"playwright": "cli.js"
|
| 1317 |
+
},
|
| 1318 |
+
"engines": {
|
| 1319 |
+
"node": ">=18"
|
| 1320 |
+
},
|
| 1321 |
+
"optionalDependencies": {
|
| 1322 |
+
"fsevents": "2.3.2"
|
| 1323 |
+
}
|
| 1324 |
+
},
|
| 1325 |
+
"node_modules/playwright-core": {
|
| 1326 |
+
"version": "1.61.1",
|
| 1327 |
+
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.61.1.tgz",
|
| 1328 |
+
"integrity": "sha512-h7Qlt6m4REp25qvIdvbDtVmD4LqVXfpRxhORv9L0jzETM05p4fuPJ3dKyuSXQxDSbXnmS79HAgi9589lGSpLkg==",
|
| 1329 |
+
"dev": true,
|
| 1330 |
+
"license": "Apache-2.0",
|
| 1331 |
+
"bin": {
|
| 1332 |
+
"playwright-core": "cli.js"
|
| 1333 |
+
},
|
| 1334 |
+
"engines": {
|
| 1335 |
+
"node": ">=18"
|
| 1336 |
+
}
|
| 1337 |
+
},
|
| 1338 |
"node_modules/process": {
|
| 1339 |
"version": "0.11.10",
|
| 1340 |
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
|
|
|
|
| 1675 |
"url": "https://opencollective.com/express"
|
| 1676 |
}
|
| 1677 |
},
|
| 1678 |
+
"node_modules/undici-types": {
|
| 1679 |
+
"version": "8.3.0",
|
| 1680 |
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
|
| 1681 |
+
"integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
|
| 1682 |
+
"dev": true,
|
| 1683 |
+
"license": "MIT"
|
| 1684 |
+
},
|
| 1685 |
"node_modules/universalify": {
|
| 1686 |
"version": "2.0.1",
|
| 1687 |
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
|
package.json
CHANGED
|
@@ -4,8 +4,7 @@
|
|
| 4 |
"description": "--- title: Memory emoji: ⚡ colorFrom: indigo colorTo: purple sdk: docker pinned: false ---",
|
| 5 |
"main": "index.js",
|
| 6 |
"scripts": {
|
| 7 |
-
"start": "node server.js"
|
| 8 |
-
"test": "echo \"Error: no test specified\" && exit 1"
|
| 9 |
},
|
| 10 |
"repository": {
|
| 11 |
"type": "git",
|
|
@@ -20,11 +19,17 @@
|
|
| 20 |
"axios": "^1.16.1",
|
| 21 |
"chroma": "^0.0.1",
|
| 22 |
"chromadb": "^3.4.3",
|
|
|
|
| 23 |
"express": "^5.2.1",
|
| 24 |
"fs-extra": "^11.3.5",
|
| 25 |
"gray-matter": "^4.0.3",
|
|
|
|
| 26 |
"openai": "^6.39.0",
|
| 27 |
"path": "^0.12.7",
|
| 28 |
"readline": "^1.3.0"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
}
|
| 30 |
}
|
|
|
|
| 4 |
"description": "--- title: Memory emoji: ⚡ colorFrom: indigo colorTo: purple sdk: docker pinned: false ---",
|
| 5 |
"main": "index.js",
|
| 6 |
"scripts": {
|
| 7 |
+
"start": "node server.js"
|
|
|
|
| 8 |
},
|
| 9 |
"repository": {
|
| 10 |
"type": "git",
|
|
|
|
| 19 |
"axios": "^1.16.1",
|
| 20 |
"chroma": "^0.0.1",
|
| 21 |
"chromadb": "^3.4.3",
|
| 22 |
+
"dotenv": "^17.4.2",
|
| 23 |
"express": "^5.2.1",
|
| 24 |
"fs-extra": "^11.3.5",
|
| 25 |
"gray-matter": "^4.0.3",
|
| 26 |
+
"nodemailer": "^9.0.3",
|
| 27 |
"openai": "^6.39.0",
|
| 28 |
"path": "^0.12.7",
|
| 29 |
"readline": "^1.3.0"
|
| 30 |
+
},
|
| 31 |
+
"devDependencies": {
|
| 32 |
+
"@playwright/test": "^1.61.1",
|
| 33 |
+
"@types/node": "^26.1.1"
|
| 34 |
}
|
| 35 |
}
|
playwright.config.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { defineConfig, devices } from '@playwright/test';
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* Read environment variables from file.
|
| 5 |
+
* https://github.com/motdotla/dotenv
|
| 6 |
+
*/
|
| 7 |
+
// import dotenv from 'dotenv';
|
| 8 |
+
// import path from 'path';
|
| 9 |
+
// dotenv.config({ path: path.resolve(__dirname, '.env') });
|
| 10 |
+
|
| 11 |
+
/**
|
| 12 |
+
* See https://playwright.dev/docs/test-configuration.
|
| 13 |
+
*/
|
| 14 |
+
export default defineConfig({
|
| 15 |
+
testDir: './tests',
|
| 16 |
+
/* Run tests in files in parallel */
|
| 17 |
+
fullyParallel: true,
|
| 18 |
+
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
| 19 |
+
forbidOnly: !!process.env.CI,
|
| 20 |
+
/* Retry on CI only */
|
| 21 |
+
retries: process.env.CI ? 2 : 0,
|
| 22 |
+
/* Opt out of parallel tests on CI. */
|
| 23 |
+
workers: process.env.CI ? 1 : undefined,
|
| 24 |
+
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
| 25 |
+
reporter: 'html',
|
| 26 |
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
| 27 |
+
use: {
|
| 28 |
+
/* Base URL to use in actions like `await page.goto('')`. */
|
| 29 |
+
// baseURL: 'http://localhost:3000',
|
| 30 |
+
|
| 31 |
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
| 32 |
+
trace: 'on-first-retry',
|
| 33 |
+
},
|
| 34 |
+
|
| 35 |
+
/* Configure projects for major browsers */
|
| 36 |
+
projects: [
|
| 37 |
+
{
|
| 38 |
+
name: 'chromium',
|
| 39 |
+
use: { ...devices['Desktop Chrome'] },
|
| 40 |
+
},
|
| 41 |
+
|
| 42 |
+
{
|
| 43 |
+
name: 'firefox',
|
| 44 |
+
use: { ...devices['Desktop Firefox'] },
|
| 45 |
+
},
|
| 46 |
+
|
| 47 |
+
{
|
| 48 |
+
name: 'webkit',
|
| 49 |
+
use: { ...devices['Desktop Safari'] },
|
| 50 |
+
},
|
| 51 |
+
|
| 52 |
+
/* Test against mobile viewports. */
|
| 53 |
+
// {
|
| 54 |
+
// name: 'Mobile Chrome',
|
| 55 |
+
// use: { ...devices['Pixel 5'] },
|
| 56 |
+
// },
|
| 57 |
+
// {
|
| 58 |
+
// name: 'Mobile Safari',
|
| 59 |
+
// use: { ...devices['iPhone 12'] },
|
| 60 |
+
// },
|
| 61 |
+
|
| 62 |
+
/* Test against branded browsers. */
|
| 63 |
+
// {
|
| 64 |
+
// name: 'Microsoft Edge',
|
| 65 |
+
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
| 66 |
+
// },
|
| 67 |
+
// {
|
| 68 |
+
// name: 'Google Chrome',
|
| 69 |
+
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
| 70 |
+
// },
|
| 71 |
+
],
|
| 72 |
+
|
| 73 |
+
/* Run your local dev server before starting the tests */
|
| 74 |
+
// webServer: {
|
| 75 |
+
// command: 'npm run start',
|
| 76 |
+
// url: 'http://localhost:3000',
|
| 77 |
+
// reuseExistingServer: !process.env.CI,
|
| 78 |
+
// },
|
| 79 |
+
});
|
tests/example.spec.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { test, expect } from '@playwright/test';
|
| 2 |
+
|
| 3 |
+
test('has title', async ({ page }) => {
|
| 4 |
+
await page.goto('https://playwright.dev/');
|
| 5 |
+
|
| 6 |
+
// Expect a title "to contain" a substring.
|
| 7 |
+
await expect(page).toHaveTitle(/Playwright/);
|
| 8 |
+
});
|
| 9 |
+
|
| 10 |
+
test('get started link', async ({ page }) => {
|
| 11 |
+
await page.goto('https://playwright.dev/');
|
| 12 |
+
|
| 13 |
+
// Click the get started link.
|
| 14 |
+
await page.getByRole('link', { name: 'Get started' }).click();
|
| 15 |
+
|
| 16 |
+
// Expects page to have a heading with the name of Installation.
|
| 17 |
+
await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
|
| 18 |
+
});
|