diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 000000000..5ba8f2fff --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,32 @@ +name: Playwright Tests +on: + workflow_dispatch: + +defaults: + run: + working-directory: playwright + # 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 ci + - name: Install Playwright Browsers + run: npx playwright install --with-deps chromium + - name: Run Playwright tests + run: npx playwright test + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/.refact/integrations.d/mcp_playwright.yaml b/.refact/integrations.d/mcp_playwright.yaml new file mode 100644 index 000000000..d488b0065 --- /dev/null +++ b/.refact/integrations.d/mcp_playwright.yaml @@ -0,0 +1,8 @@ +command: npx -y @playwright/mcp@latest --headless +env: {} +available: + on_your_laptop: true + when_isolated: true +confirmation: + ask_user: [] + deny: [] diff --git a/playwright/.gitignore b/playwright/.gitignore new file mode 100644 index 000000000..967a36798 --- /dev/null +++ b/playwright/.gitignore @@ -0,0 +1,8 @@ + +# Playwright +node_modules/ +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ +.auth/ \ No newline at end of file diff --git a/playwright/README.md b/playwright/README.md new file mode 100644 index 000000000..5121c2c84 --- /dev/null +++ b/playwright/README.md @@ -0,0 +1,171 @@ +# Playwright Testing for Refact + +This directory contains end-to-end tests for the Refact project using Playwright. Playwright provides reliable end-to-end testing for modern web applications. + +## Prerequisites + +- Node.js (v14 or newer) +- npm +- A Refact API key (for certain tests) + +## Setup + +1. Install dependencies: + +```bash +npm install +``` + +This will automatically install Playwright with Chromium dependencies via the postinstall script. + +2. Create a `.env` file in the playwright directory with the following content: + +``` +REFACT_API_KEY=your_api_key_here +``` + +## Running Tests + +### Development Mode (with UI) + +To run tests with the Playwright UI, which provides a visual interface for debugging tests: + +```bash +npm start +``` + +This launches the Playwright UI, allowing you to: + +- See test execution in real-time +- Inspect DOM elements +- Debug tests step by step +- View test traces +- Re-run specific tests + +#### Tip + +Press the `toogle output` button or press `` ^` `` to see the out put from the lsp web servers stdout and stderr. + +### Headless Mode + +To run tests in headless mode (without browser UI), which is faster and suitable for CI/CD: + +First add your api key to `refact/playwright/.env` + +``` +REFACT_API_KEY=your_api_key_here +``` + +Then run + +```bash +npm run test +``` + +For more specific test runs, you can use the underlying Playwright command with options: + +```bash +# Run a specific test file +npx playwright test tests/example.spec.ts + +# Run tests with a specific tag +npx playwright test --grep "@smoke" + +# Run tests in a specific project +npx playwright test --project=chromium + +# Run tests with a specific reporter +npx playwright test --reporter=line +``` + +## Test Configuration + +The Playwright configuration is defined in `playwright.config.ts` and includes: + +- Test directory: `./tests` +- Browser configuration: Currently set up for Chromium +- Parallel execution settings +- Web server setup for the Refact GUI and backend + +## Creating Tests + +Tests are written in TypeScript using the Playwright test framework. Example: + +```typescript +import { test, expect } from "@playwright/test"; + +test("example test", async ({ page }) => { + await page.goto("http://localhost:5173"); + await expect(page.getByText("Welcome to Refact")).toBeVisible(); +}); +``` + +### Best Practices + +1. Place test files in the `tests` directory +2. Use descriptive test names +3. Group related tests in the same file +4. Use page objects for complex pages +5. Leverage Playwright's built-in assertions + +## Viewing Test Reports + +After test execution, HTML reports are generated and can be viewed by: + +```bash +npx playwright show-report +``` + +This will open the HTML report in your default browser, showing: + +- Test results summary +- Test execution time +- Error details for failed tests +- Screenshots and videos (if configured) +- Traces for debugging + +## Debugging Tips + +1. **Use UI Mode for Interactive Debugging**: + + ```bash + npm run start + ``` + +2. **Generate and Analyze Traces**: + + ```bash + npx playwright test --trace on + ``` + +3. **Use Debug Mode**: + + ```bash + npx playwright test --debug + ``` + +4. **Record Video of Test Execution**: + Add to config: + ```typescript + use: { + video: 'on-first-retry', + } + ``` + +## CI/CD Integration + +For continuous integration, set the environment variable `CI=true` to enable: + +- Retry failed tests +- Reduced parallelism +- Fail if `.only` is present in tests + +Example: + +```bash +CI=true npm run test +``` + +## Advanced Configuration + +See the [Playwright documentation](https://playwright.dev/docs/test-configuration) for more advanced configuration options. diff --git a/playwright/eslint.config.mjs b/playwright/eslint.config.mjs new file mode 100644 index 000000000..d3553b0a7 --- /dev/null +++ b/playwright/eslint.config.mjs @@ -0,0 +1,30 @@ +import { defineConfig } from "eslint/config"; +// import globals from "globals"; +// import js from "@eslint/js"; +// import tseslint from "typescript-eslint"; +import playwright from "eslint-plugin-playwright"; + +export default defineConfig([ + // start of: eslint init defaults + // { files: ["**/*.{js,mjs,cjs,ts}"] }, + // { + // files: ["**/*.{js,mjs,cjs,ts}"], + // languageOptions: { globals: { ...globals.browser, ...globals.node } }, + // }, + // { + // files: ["**/*.{js,mjs,cjs,ts}"], + // plugins: { js }, + // extends: ["js/recommended"], + // }, + // tseslint.configs.recommended, + + { + ...playwright.configs["flat/recommended"], + files: ["tests/**"], + rules: { + ...playwright.configs["flat/recommended"].rules, + // Customize Playwright rules + // ... + }, + }, +]); diff --git a/playwright/fixtures/FakeIde.ts b/playwright/fixtures/FakeIde.ts new file mode 100644 index 000000000..3d877c05f --- /dev/null +++ b/playwright/fixtures/FakeIde.ts @@ -0,0 +1,196 @@ +import { Page } from "@playwright/test"; +import { + setSelectedSnippet, + setCurrentProjectInfo, + setFileInfo, + setInputValue, + updateConfig, + fim, + ideToolCallResponse, + ideAttachFileToChat, + newChatAction, + type Snippet, + type CurrentProjectInfo, + type InputActionPayload, + type Config, + type FimDebugData, + type ToolCallResponsePayload, + type FileInfo, + type InitialState, +} from "refact-chat-js/dist/events"; + +declare global { + interface Window { + logMessage: typeof window.postMessage; + __INITIAL_STATE__?: Partial> & { + config: Partial; + }; + postIntellijMessage?: (message: Record) => void; + acquireVsCodeApi?(): { + postMessage: (message: Record) => void; + }; + RefactChat: { + render: (root: Element, config: Partial) => void; + }; + + originalPostMessage?: typeof window.postMessage; + } +} + +type EventsToIde = + | ReturnType + | ReturnType + | ReturnType + | ReturnType + | ReturnType + | ReturnType + | ReturnType + | ReturnType + | ReturnType + | ReturnType; + +export class FakeIde { + messages: Parameters[] = []; + + constructor(public readonly page: Page) { + this.clearMessages = this.clearMessages.bind(this); + this.logMessage = this.logMessage.bind(this); + } + + public static async initialize( + page: Page, + host: "vscode" | "jetbrains" | "ide" = "vscode" + ) { + // TODO: initial state + page.addInitScript((ide) => { + window.__INITIAL_STATE__ = { + config: { + host: ide, + lspPort: 8001, // TODO: make this a variable + themeProps: { accentColor: "gray", appearance: "dark" }, + }, + }; + window.onload = () => { + const root = document.querySelector("#refact-chat"); + console.log(window.RefactChat); + window.RefactChat.render(root, window.__INITIAL_STATE__.config); + }; + }, host); + + const fakeIde = new FakeIde(page); + + await fakeIde.mockMessageBus(host); + + // await page.goto("http://localhost:3000/"); + return fakeIde; + } + + private logMessage(...args: Parameters) { + this.messages.push(args); + } + + private async mockMessageBus( + host: "vscode" | "jetbrains" | "ide" = "vscode" + ) { + await this.page.exposeFunction("logMessage", this.logMessage); + + if (host === "vscode") { + return await this.page.addInitScript(() => { + window.acquireVsCodeApi = () => ({ + postMessage: window.logMessage, + }); + }); + } + + if (host === "jetbrains") { + return await this.page.addInitScript(() => { + window.postIntellijMessage = window.logMessage; + }); + } + + return await this.page.addInitScript(() => { + window.originalPostMessage = window.postMessage; + + window.postMessage = (...args: Parameters) => { + window.logMessage(...args); + window.originalPostMessage(...args); + }; + }); + } + + async dispatch(event: EventsToIde) { + // return this.page.locator("window").dispatchEvent("message", message); + return this.page.evaluate( + (message) => { + // window.postMessage(message, "*"); + window.originalPostMessage(message); + }, + [event, this.page.url()] + ); + } + + async clearMessages() { + this.messages = []; + return this; + } + + async addFileInfo(fileInfo: FileInfo) { + const action = setFileInfo(fileInfo); + await this.dispatch(action); + return this; + } + + async setSelectedSnippet(selectedSnippet: Snippet) { + const action = setSelectedSnippet(selectedSnippet); + await this.dispatch(action); + return this; + } + + async setCurrentProjectInfo(currentProjectInfo: CurrentProjectInfo) { + const action = setCurrentProjectInfo(currentProjectInfo); + await this.dispatch(action); + return this; + } + + async setInputValue(inputValue: InputActionPayload) { + const action = setInputValue(inputValue); + await this.dispatch(action); + return this; + } + + async updateConfig(config: Partial) { + const action = updateConfig(config); + await this.dispatch(action); + return this; + } + + async sendFimData(data: FimDebugData) { + const action = fim.receive(data); + await this.dispatch(action); + return this; + } + + async sendFimError(error: string) { + const action = fim.error(error); + await this.dispatch(action); + return this; + } + + async sendToolCallResponse(res: ToolCallResponsePayload) { + const action = ideToolCallResponse(res); + await this.dispatch(action); + return this; + } + + async sendAttachFileToChat(fileName: string) { + const action = ideAttachFileToChat(fileName); + await this.dispatch(action); + return this; + } + + async newChat() { + const action = newChatAction(); + await this.dispatch(action); + return this; + } +} diff --git a/playwright/fixtures/LoginPage.ts b/playwright/fixtures/LoginPage.ts new file mode 100644 index 000000000..b26a89601 --- /dev/null +++ b/playwright/fixtures/LoginPage.ts @@ -0,0 +1,106 @@ +import { expect, type Page } from "@playwright/test"; + +const apiKey = process.env.REFACT_API_KEY ?? "test-api-key"; + +// Create a mock response that matches GoodPollingResponse type + +function parseOrElse(str: string, fallback: T): T { + try { + const data = JSON.parse(str); + return data as T; + } catch { + return fallback; + } +} +const StubResponse = { + retcode: "OK", + account: "test@example.com", + inference_url: "https://inference.smallcloud.ai/", + inference: "PRO", + metering_balance: 1000, + questionnaire: true, // TODO: this disables the survey + refact_agent_max_request_num: 100, + refact_agent_request_available: null, + secret_key: apiKey, + tooltip_message: "Welcome to Refact!", + login_message: "You are now logged in", + "longthink-filters": [], + "longthink-functions-today": {}, + "longthink-functions-today-v2": {}, +}; +export class LoginPage { + constructor(public readonly page: Page) {} + + async doLogin(url?: string, openSurvey = false, screenshots = false) { + // Set up route interception before navigating; + await this.mockUserRequest(openSurvey); + // TODO: hard coded for now + await this.page.goto(url || "http://localhost:3000/"); + + await expect( + this.page.getByRole("heading", { name: "Login to Refact.ai" }) + ).toBeVisible({ timeout: 10000 }); + + await this.page.waitForSelector('button:has-text("Continue with Google")'); + + if (screenshots) expect(this.page).toHaveScreenshot(); + + await this.page.context().on("page", async (newPage) => { + const url = new URL(newPage.url()); + expect(url.hostname).toEqual("accounts.google.com"); + expect(url.pathname).toEqual("/v3/signin/identifier"); + await newPage.close(); + }); + + await this.page.click('button:has-text("Continue with Google")'); + + await this.page.waitForLoadState("networkidle"); + + if (screenshots) expect(this.page).toHaveScreenshot(); + + await expect(this.page).toHaveURL("http://localhost:3000/"); + // wait for route to have been Called + await expect( + this.page.getByRole("heading", { name: "Login to Refact.ai" }) + ).not.toBeVisible({ timeout: 10000 }); + + if (screenshots) + expect(this.page).toHaveScreenshot({ maxDiffPixelRatio: 0.1 }); + } + + async doLogout() { + await this.page.goto("/"); + await this.page.getByRole("button", { name: "menu" }).click(); + await this.page.getByRole("menuitem", { name: "Logout" }).click(); + } + + async mockUserRequest(openSurvey = false) { + const mockResponse = { + ...StubResponse, + questionnaire: !openSurvey, + }; + await this.page + .context() + .route( + "https://www.smallcloud.ai/v1/streamlined-login-recall-ticket", + async (route) => { + // Return our mock response + await route.fulfill({ + status: 200, + contentType: "application/json", + body: JSON.stringify(mockResponse), + }); + } + ); + + await this.page + .context() + .route("https://www.smallcloud.ai/v1/login", async (route) => { + await route.fulfill({ + status: 200, + contentType: "application/json", + body: JSON.stringify(mockResponse), + }); + }); + } +} diff --git a/playwright/fixtures/Navigation.ts b/playwright/fixtures/Navigation.ts new file mode 100644 index 000000000..acd9e5386 --- /dev/null +++ b/playwright/fixtures/Navigation.ts @@ -0,0 +1,17 @@ +import { Page } from "@playwright/test"; + +export class Navigation { + constructor(public readonly page: Page) {} + + get homeButton() { + return this.page.getByText("HomeHome"); + } + + homeUrl() { + this.page.goto("/"); + } + + get menuButton() { + return this.page.getByRole("button", { name: "menu" }); + } +} diff --git a/playwright/fixtures/Survey.ts b/playwright/fixtures/Survey.ts new file mode 100644 index 000000000..184b8cae8 --- /dev/null +++ b/playwright/fixtures/Survey.ts @@ -0,0 +1,9 @@ +// TODO: handle the survey if it shows up. + +import { Page } from "@playwright/test"; + +class Survey { + constructor(public readonly page: Page) {} + + dismissSurvey() {} +} diff --git a/playwright/fixtures/TourPage.ts b/playwright/fixtures/TourPage.ts new file mode 100644 index 000000000..27a82c00e --- /dev/null +++ b/playwright/fixtures/TourPage.ts @@ -0,0 +1,61 @@ +import { expect, type Page } from "@playwright/test"; + +export class TourPage { + constructor(public readonly page: Page) {} + + async step1() { + await expect(this.page.getByText("Welcome to Refact.ai!")).toBeVisible(); + } + async step2() { + await this.page.getByRole("button", { name: "Get Started" }).click(); + await expect( + this.page.getByText("Agent can accomplish tasks") + ).toBeVisible(); + } + + async step3() { + await this.page.getByText("next").click(); + await expect( + this.page.getByText("Integrations", { exact: true }) + ).toBeVisible(); + } + + async step4() { + await this.page.getByText("next").click(); + await expect(this.page.getByText("Chat modes / models")).toBeVisible(); + } + + async step5() { + await this.page.getByText("next").click(); + await expect( + this.page.getByText("Difference in Quick / Explore") + ).toBeVisible(); + } + + async step6() { + await this.page.getByText("next").click(); + await expect(this.page.getByText("Code completion")).toBeVisible(); + } + + async step7() { + await this.page.getByText("next").click(); + await expect( + this.page.getByText("Your Refact product tour is finished!") + ).toBeVisible(); + } + + async step8() { + await this.page.getByRole("button", { name: "Ready to use" }).click(); + } + + async doTour() { + await this.step1(); + await this.step2(); + await this.step3(); + await this.step4(); + await this.step5(); + await this.step6(); + await this.step7(); + await this.step8(); + } +} diff --git a/playwright/fixtures/index.ts b/playwright/fixtures/index.ts new file mode 100644 index 000000000..21ae9fb9e --- /dev/null +++ b/playwright/fixtures/index.ts @@ -0,0 +1,86 @@ +import { test as baseTest } from "@playwright/test"; +import { LoginPage } from "./LoginPage"; +import { TourPage } from "./TourPage"; +import { Navigation } from "./Navigation"; +import { FakeIde } from "./FakeIde"; + +export * from "@playwright/test"; +export const test = baseTest.extend< + { + navigation: Navigation; + fakeIde: FakeIde; + auth: LoginPage; + }, + { workerStorageState: string } +>({ + // // Use the same storage state for all tests in this worker. + // storageState: ({ workerStorageState }, use) => use(workerStorageState), + + // // Authenticate once per worker with a worker-scoped fixture. + // workerStorageState: [ + // async ({ browser }, use) => { + // // Use parallelIndex as a unique identifier for each worker. + // const id = test.info().parallelIndex; + // const fileName = path.resolve( + // test.info().project.outputDir, + // ".auth", + // `${id}.json` + // ); + + // if (fs.existsSync(fileName)) { + // // Reuse existing authentication state if any. + // await use(fileName); + // return; + // } + + // // Important: make sure we authenticate in a clean environment by unsetting storage state. + // const page = await browser.newPage({ + // storageState: undefined, + // }); + + // const fakeIde = await FakeIde.initialize(page); + // const loginPage = new LoginPage(page); + // await loginPage.doLogin(undefined, false, false); + // const tourPage = new TourPage(page); + // await tourPage.doTour(); + // await page.context().storageState({ path: fileName }); + // await page.close(); + // await use(fileName); + // }, + // { scope: "worker" }, + // ], + + navigation: async ({ page }, use) => { + const navigation = new Navigation(page); + await use(navigation); + }, + + fakeIde: async ({ page }, use) => { + const fakeIde = await FakeIde.initialize(page); + await use(fakeIde); + }, + + auth: async ({ page }, use) => { + const auth = new LoginPage(page); + await use(auth); + }, +}); + +test.use({ + storageState: { + cookies: [], + origins: [ + { + origin: "http://localhost:3000/", + localStorage: [ + { + name: "persist:root", + value: JSON.stringify({ + tour: JSON.stringify({ type: "finished", step: 1 }), + }), + }, + ], + }, + ], + }, +}); diff --git a/playwright/package-lock.json b/playwright/package-lock.json new file mode 100644 index 000000000..6842a5e41 --- /dev/null +++ b/playwright/package-lock.json @@ -0,0 +1,1615 @@ +{ + "name": "playwright", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "playwright", + "version": "1.0.0", + "hasInstallScript": true, + "license": "ISC", + "devDependencies": { + "@eslint/js": "^9.23.0", + "@playwright/test": "^1.51.1", + "@types/node": "^22.13.14", + "dotenv": "^16.4.7", + "eslint": "^9.23.0", + "eslint-plugin-playwright": "^2.2.0", + "globals": "^16.0.0", + "typescript-eslint": "^8.28.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.5.1.tgz", + "integrity": "sha512-soEIOALTfTK6EjmKMMoLugwaP0rzkad90iIWd1hMO9ARkSAyjfMfkRRhLvD5qH7vvM0Cg72pieUfR6yh6XxC4w==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz", + "integrity": "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==", + "dev": true, + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.0.tgz", + "integrity": "sha512-yJLLmLexii32mGrhW29qvU3QBVTu0GUmEf/J4XsBtVhp4JkIUFN/BjWqTF63yRvGApIDpZm5fa97LtYtINmfeQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", + "integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "9.23.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.23.0.tgz", + "integrity": "sha512-35MJ8vCPU0ZMxo7zfev2pypqTwWTofFZO6m4KAtdoFhRpLJUpHTZZ+KB3C7Hb1d7bULYwO4lJXGCi5Se+8OMbw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.7.tgz", + "integrity": "sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==", + "dev": true, + "dependencies": { + "@eslint/core": "^0.12.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", + "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "dev": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@playwright/test": { + "version": "1.51.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.51.1.tgz", + "integrity": "sha512-nM+kEaTSAoVlXmMPH10017vn3FSiFqr/bh4fKg9vmAdMfd9SDqRZNvPSiAHADc/itWak+qPvMPZQOPwCBW7k7Q==", + "dev": true, + "dependencies": { + "playwright": "1.51.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "22.13.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.14.tgz", + "integrity": "sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==", + "dev": true, + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.28.0.tgz", + "integrity": "sha512-lvFK3TCGAHsItNdWZ/1FkvpzCxTHUVuFrdnOGLMa0GGCFIbCgQWVk3CzCGdA7kM3qGVc+dfW9tr0Z/sHnGDFyg==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.28.0", + "@typescript-eslint/type-utils": "8.28.0", + "@typescript-eslint/utils": "8.28.0", + "@typescript-eslint/visitor-keys": "8.28.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.28.0.tgz", + "integrity": "sha512-LPcw1yHD3ToaDEoljFEfQ9j2xShY367h7FZ1sq5NJT9I3yj4LHer1Xd1yRSOdYy9BpsrxU7R+eoDokChYM53lQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "8.28.0", + "@typescript-eslint/types": "8.28.0", + "@typescript-eslint/typescript-estree": "8.28.0", + "@typescript-eslint/visitor-keys": "8.28.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.28.0.tgz", + "integrity": "sha512-u2oITX3BJwzWCapoZ/pXw6BCOl8rJP4Ij/3wPoGvY8XwvXflOzd1kLrDUUUAIEdJSFh+ASwdTHqtan9xSg8buw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.28.0", + "@typescript-eslint/visitor-keys": "8.28.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.28.0.tgz", + "integrity": "sha512-oRoXu2v0Rsy/VoOGhtWrOKDiIehvI+YNrDk5Oqj40Mwm0Yt01FC/Q7nFqg088d3yAsR1ZcZFVfPCTTFCe/KPwg==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "8.28.0", + "@typescript-eslint/utils": "8.28.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.28.0.tgz", + "integrity": "sha512-bn4WS1bkKEjx7HqiwG2JNB3YJdC1q6Ue7GyGlwPHyt0TnVq6TtD/hiOdTZt71sq0s7UzqBFXD8t8o2e63tXgwA==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.28.0.tgz", + "integrity": "sha512-H74nHEeBGeklctAVUvmDkxB1mk+PAZ9FiOMPFncdqeRBXxk1lWSYraHw8V12b7aa6Sg9HOBNbGdSHobBPuQSuA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.28.0", + "@typescript-eslint/visitor-keys": "8.28.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.28.0.tgz", + "integrity": "sha512-OELa9hbTYciYITqgurT1u/SzpQVtDLmQMFzy/N8pQE+tefOyCWT79jHsav294aTqV1q1u+VzqDGbuujvRYaeSQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.28.0", + "@typescript-eslint/types": "8.28.0", + "@typescript-eslint/typescript-estree": "8.28.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.28.0.tgz", + "integrity": "sha512-hbn8SZ8w4u2pRwgQ1GlUrPKE+t2XvcCW5tTRF7j6SMYIuYG37XuzIW44JCZPa36evi0Oy2SnM664BlIaAuQcvg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.28.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.23.0.tgz", + "integrity": "sha512-jV7AbNoFPAY1EkFYpLq5bslU9NLNO8xnEeQXwErNibVryjk67wHVmddTBilc5srIttJDBrB0eMHKZBFbSIABCw==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.2", + "@eslint/config-helpers": "^0.2.0", + "@eslint/core": "^0.12.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.23.0", + "@eslint/plugin-kit": "^0.2.7", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.3.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-playwright": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-2.2.0.tgz", + "integrity": "sha512-qSQpAw7RcSzE3zPp8FMGkthaCWovHZ/BsXtpmnGax9vQLIovlh1bsZHEa2+j2lv9DWhnyeLM/qZmp7ffQZfQvg==", + "dev": true, + "workspaces": [ + "examples" + ], + "dependencies": { + "globals": "^13.23.0" + }, + "engines": { + "node": ">=16.6.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/eslint-plugin-playwright/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-scope": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", + "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "dev": true, + "dependencies": { + "acorn": "^8.14.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.0.0.tgz", + "integrity": "sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/playwright": { + "version": "1.51.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.51.1.tgz", + "integrity": "sha512-kkx+MB2KQRkyxjYPc3a0wLZZoDczmppyGJIvQ43l+aZihkaVvmu/21kiyaHeHjiFxjxNNFnUncKmcGIyOojsaw==", + "dev": true, + "dependencies": { + "playwright-core": "1.51.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.51.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.51.1.tgz", + "integrity": "sha512-/crRMj8+j/Nq5s8QcvegseuyeZPxpQCZb6HNk3Sos3BlZyAknRjoyJPFWkpNn8v0+P3WiwqFF8P+zQo4eqiNuw==", + "dev": true, + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", + "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.28.0.tgz", + "integrity": "sha512-jfZtxJoHm59bvoCMYCe2BM0/baMswRhMmYhy+w6VfcyHrjxZ0OJe0tGasydCpIpA+A/WIJhTyZfb3EtwNC/kHQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.28.0", + "@typescript-eslint/parser": "8.28.0", + "@typescript-eslint/utils": "8.28.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "dev": true + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/playwright/package.json b/playwright/package.json new file mode 100644 index 000000000..034793301 --- /dev/null +++ b/playwright/package.json @@ -0,0 +1,28 @@ +{ + "name": "playwright", + "private": true, + "version": "1.0.0", + "main": "index.js", + "type": "module", + "scripts": { + "postinstall": "playwright install --with-deps chromium", + "test": "npx playwright test", + "test:update": "npx playwright test --update-snapshots", + "start": "npm run test -- --ui", + "lint": "eslint --max-warnings 0 --ext .js,.ts ." + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "devDependencies": { + "@eslint/js": "^9.23.0", + "@playwright/test": "^1.51.1", + "@types/node": "^22.13.14", + "dotenv": "^16.4.7", + "eslint": "^9.23.0", + "eslint-plugin-playwright": "^2.2.0", + "globals": "^16.0.0", + "typescript-eslint": "^8.28.0" + } +} diff --git a/playwright/playwright.config.ts b/playwright/playwright.config.ts new file mode 100644 index 000000000..5ff5bf33e --- /dev/null +++ b/playwright/playwright.config.ts @@ -0,0 +1,99 @@ +import { defineConfig, devices } from "@playwright/test"; +import path from "path"; +/** + * Read environment variables from file. + * https://github.com/motdotla/dotenv + */ +import dotenv from "dotenv"; +dotenv.config({ path: ".env" }); + +/** + * 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:3000", + + /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ + // trace: "on-first-retry", + trace: "on", + + video: "on", + }, + + /* Configure projects for major browsers */ + projects: [ + { + name: "web", + use: { + ...devices["Desktop Chrome"], + }, + }, + + { + name: "vscode", + use: { + ...devices["Desktop Chrome"], + viewport: { width: 369, height: 1023 }, + }, + }, + /* 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: 'npm run start', + // url: 'http://127.0.0.1:3000', + // reuseExistingServer: !process.env.CI, + // }, + + webServer: [ + { + cwd: ".", + command: "node server.js", + port: 3000, + reuseExistingServer: !process.env.CI, + stdout: "pipe", + stderr: "pipe", + }, + { + cwd: "../refact-agent/engine", + command: `cargo build && target/debug/refact-lsp --address-url Refact --http-port 8001 --logs-stderr --ast --vecdb -k ${process.env.REFACT_API_KEY} --experimental -w ../../`, + port: 8001, + reuseExistingServer: !process.env.CI, + stdout: "pipe", + stderr: "pipe", + }, + ], +}); diff --git a/playwright/server.js b/playwright/server.js new file mode 100644 index 000000000..36c8d46ef --- /dev/null +++ b/playwright/server.js @@ -0,0 +1,52 @@ +import http from "node:http"; +import path from "node:path"; +import fs from "node:fs"; + +const server = http.createServer((req, res) => { + if (req.url === "/") { + res.writeHead(200, { "Content-Type": "text/html" }); + res.end(index); + } + if (req.url === "/refact-chat.js") { + fs.readFile( + path.join("..", "refact-agent", "gui", "dist", "chat", "index.umd.cjs"), + (err, data) => { + if (err) throw err; + res.writeHead(200, { "Content-Type": "application/javascript" }); + res.end(data); + } + ); + } + if (req.url === "/refact-chat.css") { + fs.readFile( + path.join("..", "refact-agent", "gui", "dist", "chat", "style.css"), + (err, data) => { + if (err) throw err; + res.writeHead(200, { "Content-Type": "text/css" }); + res.end(data); + } + ); + } +}); + +server.listen(3000, () => {}); + +const index = ` + + + + + + + + Refact.ai Chat + + +
+ + + +`; diff --git a/playwright/tests-examples/demo-todo-app.spec.ts b/playwright/tests-examples/demo-todo-app.spec.ts new file mode 100644 index 000000000..3fee59082 --- /dev/null +++ b/playwright/tests-examples/demo-todo-app.spec.ts @@ -0,0 +1,489 @@ +import { test, expect, type Page } from "@playwright/test"; + +test.beforeEach(async ({ page }) => { + await page.goto("https://demo.playwright.dev/todomvc"); +}); + +const TODO_ITEMS = [ + "buy some cheese", + "feed the cat", + "book a doctors appointment", +] as const; + +test.describe("New Todo", () => { + test("should allow me to add todo items", async ({ page }) => { + // create a new todo locator + const newTodo = page.getByPlaceholder("What needs to be done?"); + + // Create 1st todo. + await newTodo.fill(TODO_ITEMS[0]); + await newTodo.press("Enter"); + + // Make sure the list only has one todo item. + await expect(page.getByTestId("todo-title")).toHaveText([TODO_ITEMS[0]]); + + // Create 2nd todo. + await newTodo.fill(TODO_ITEMS[1]); + await newTodo.press("Enter"); + + // Make sure the list now has two todo items. + await expect(page.getByTestId("todo-title")).toHaveText([ + TODO_ITEMS[0], + TODO_ITEMS[1], + ]); + + await checkNumberOfTodosInLocalStorage(page, 2); + }); + + test("should clear text input field when an item is added", async ({ + page, + }) => { + // create a new todo locator + const newTodo = page.getByPlaceholder("What needs to be done?"); + + // Create one todo item. + await newTodo.fill(TODO_ITEMS[0]); + await newTodo.press("Enter"); + + // Check that input is empty. + await expect(newTodo).toBeEmpty(); + await checkNumberOfTodosInLocalStorage(page, 1); + }); + + test("should append new items to the bottom of the list", async ({ + page, + }) => { + // Create 3 items. + await createDefaultTodos(page); + + // create a todo count locator + const todoCount = page.getByTestId("todo-count"); + + // Check test using different methods. + await expect(page.getByText("3 items left")).toBeVisible(); + await expect(todoCount).toHaveText("3 items left"); + await expect(todoCount).toContainText("3"); + await expect(todoCount).toHaveText(/3/); + + // Check all items in one call. + await expect(page.getByTestId("todo-title")).toHaveText(TODO_ITEMS); + await checkNumberOfTodosInLocalStorage(page, 3); + }); +}); + +test.describe("Mark all as completed", () => { + test.beforeEach(async ({ page }) => { + await createDefaultTodos(page); + await checkNumberOfTodosInLocalStorage(page, 3); + }); + + test.afterEach(async ({ page }) => { + await checkNumberOfTodosInLocalStorage(page, 3); + }); + + test("should allow me to mark all items as completed", async ({ page }) => { + // Complete all todos. + await page.getByLabel("Mark all as complete").check(); + + // Ensure all todos have 'completed' class. + await expect(page.getByTestId("todo-item")).toHaveClass([ + "completed", + "completed", + "completed", + ]); + await checkNumberOfCompletedTodosInLocalStorage(page, 3); + }); + + test("should allow me to clear the complete state of all items", async ({ + page, + }) => { + const toggleAll = page.getByLabel("Mark all as complete"); + // Check and then immediately uncheck. + await toggleAll.check(); + await toggleAll.uncheck(); + + // Should be no completed classes. + await expect(page.getByTestId("todo-item")).toHaveClass(["", "", ""]); + }); + + test("complete all checkbox should update state when items are completed / cleared", async ({ + page, + }) => { + const toggleAll = page.getByLabel("Mark all as complete"); + await toggleAll.check(); + await expect(toggleAll).toBeChecked(); + await checkNumberOfCompletedTodosInLocalStorage(page, 3); + + // Uncheck first todo. + const firstTodo = page.getByTestId("todo-item").nth(0); + await firstTodo.getByRole("checkbox").uncheck(); + + // Reuse toggleAll locator and make sure its not checked. + await expect(toggleAll).not.toBeChecked(); + + await firstTodo.getByRole("checkbox").check(); + await checkNumberOfCompletedTodosInLocalStorage(page, 3); + + // Assert the toggle all is checked again. + await expect(toggleAll).toBeChecked(); + }); +}); + +test.describe("Item", () => { + test("should allow me to mark items as complete", async ({ page }) => { + // create a new todo locator + const newTodo = page.getByPlaceholder("What needs to be done?"); + + // Create two items. + for (const item of TODO_ITEMS.slice(0, 2)) { + await newTodo.fill(item); + await newTodo.press("Enter"); + } + + // Check first item. + const firstTodo = page.getByTestId("todo-item").nth(0); + await firstTodo.getByRole("checkbox").check(); + await expect(firstTodo).toHaveClass("completed"); + + // Check second item. + const secondTodo = page.getByTestId("todo-item").nth(1); + await expect(secondTodo).not.toHaveClass("completed"); + await secondTodo.getByRole("checkbox").check(); + + // Assert completed class. + await expect(firstTodo).toHaveClass("completed"); + await expect(secondTodo).toHaveClass("completed"); + }); + + test("should allow me to un-mark items as complete", async ({ page }) => { + // create a new todo locator + const newTodo = page.getByPlaceholder("What needs to be done?"); + + // Create two items. + for (const item of TODO_ITEMS.slice(0, 2)) { + await newTodo.fill(item); + await newTodo.press("Enter"); + } + + const firstTodo = page.getByTestId("todo-item").nth(0); + const secondTodo = page.getByTestId("todo-item").nth(1); + const firstTodoCheckbox = firstTodo.getByRole("checkbox"); + + await firstTodoCheckbox.check(); + await expect(firstTodo).toHaveClass("completed"); + await expect(secondTodo).not.toHaveClass("completed"); + await checkNumberOfCompletedTodosInLocalStorage(page, 1); + + await firstTodoCheckbox.uncheck(); + await expect(firstTodo).not.toHaveClass("completed"); + await expect(secondTodo).not.toHaveClass("completed"); + await checkNumberOfCompletedTodosInLocalStorage(page, 0); + }); + + test("should allow me to edit an item", async ({ page }) => { + await createDefaultTodos(page); + + const todoItems = page.getByTestId("todo-item"); + const secondTodo = todoItems.nth(1); + await secondTodo.dblclick(); + await expect(secondTodo.getByRole("textbox", { name: "Edit" })).toHaveValue( + TODO_ITEMS[1] + ); + await secondTodo + .getByRole("textbox", { name: "Edit" }) + .fill("buy some sausages"); + await secondTodo.getByRole("textbox", { name: "Edit" }).press("Enter"); + + // Explicitly assert the new text value. + await expect(todoItems).toHaveText([ + TODO_ITEMS[0], + "buy some sausages", + TODO_ITEMS[2], + ]); + await checkTodosInLocalStorage(page, "buy some sausages"); + }); +}); + +test.describe("Editing", () => { + test.beforeEach(async ({ page }) => { + await createDefaultTodos(page); + await checkNumberOfTodosInLocalStorage(page, 3); + }); + + test("should hide other controls when editing", async ({ page }) => { + const todoItem = page.getByTestId("todo-item").nth(1); + await todoItem.dblclick(); + await expect(todoItem.getByRole("checkbox")).not.toBeVisible(); + await expect( + todoItem.locator("label", { + hasText: TODO_ITEMS[1], + }) + ).not.toBeVisible(); + await checkNumberOfTodosInLocalStorage(page, 3); + }); + + test("should save edits on blur", async ({ page }) => { + const todoItems = page.getByTestId("todo-item"); + await todoItems.nth(1).dblclick(); + await todoItems + .nth(1) + .getByRole("textbox", { name: "Edit" }) + .fill("buy some sausages"); + await todoItems + .nth(1) + .getByRole("textbox", { name: "Edit" }) + .dispatchEvent("blur"); + + await expect(todoItems).toHaveText([ + TODO_ITEMS[0], + "buy some sausages", + TODO_ITEMS[2], + ]); + await checkTodosInLocalStorage(page, "buy some sausages"); + }); + + test("should trim entered text", async ({ page }) => { + const todoItems = page.getByTestId("todo-item"); + await todoItems.nth(1).dblclick(); + await todoItems + .nth(1) + .getByRole("textbox", { name: "Edit" }) + .fill(" buy some sausages "); + await todoItems + .nth(1) + .getByRole("textbox", { name: "Edit" }) + .press("Enter"); + + await expect(todoItems).toHaveText([ + TODO_ITEMS[0], + "buy some sausages", + TODO_ITEMS[2], + ]); + await checkTodosInLocalStorage(page, "buy some sausages"); + }); + + test("should remove the item if an empty text string was entered", async ({ + page, + }) => { + const todoItems = page.getByTestId("todo-item"); + await todoItems.nth(1).dblclick(); + await todoItems.nth(1).getByRole("textbox", { name: "Edit" }).fill(""); + await todoItems + .nth(1) + .getByRole("textbox", { name: "Edit" }) + .press("Enter"); + + await expect(todoItems).toHaveText([TODO_ITEMS[0], TODO_ITEMS[2]]); + }); + + test("should cancel edits on escape", async ({ page }) => { + const todoItems = page.getByTestId("todo-item"); + await todoItems.nth(1).dblclick(); + await todoItems + .nth(1) + .getByRole("textbox", { name: "Edit" }) + .fill("buy some sausages"); + await todoItems + .nth(1) + .getByRole("textbox", { name: "Edit" }) + .press("Escape"); + await expect(todoItems).toHaveText(TODO_ITEMS); + }); +}); + +test.describe("Counter", () => { + test("should display the current number of todo items", async ({ page }) => { + // create a new todo locator + const newTodo = page.getByPlaceholder("What needs to be done?"); + + // create a todo count locator + const todoCount = page.getByTestId("todo-count"); + + await newTodo.fill(TODO_ITEMS[0]); + await newTodo.press("Enter"); + + await expect(todoCount).toContainText("1"); + + await newTodo.fill(TODO_ITEMS[1]); + await newTodo.press("Enter"); + await expect(todoCount).toContainText("2"); + + await checkNumberOfTodosInLocalStorage(page, 2); + }); +}); + +test.describe("Clear completed button", () => { + test.beforeEach(async ({ page }) => { + await createDefaultTodos(page); + }); + + test("should display the correct text", async ({ page }) => { + await page.locator(".todo-list li .toggle").first().check(); + await expect( + page.getByRole("button", { name: "Clear completed" }) + ).toBeVisible(); + }); + + test("should remove completed items when clicked", async ({ page }) => { + const todoItems = page.getByTestId("todo-item"); + await todoItems.nth(1).getByRole("checkbox").check(); + await page.getByRole("button", { name: "Clear completed" }).click(); + await expect(todoItems).toHaveCount(2); + await expect(todoItems).toHaveText([TODO_ITEMS[0], TODO_ITEMS[2]]); + }); + + test("should be hidden when there are no items that are completed", async ({ + page, + }) => { + await page.locator(".todo-list li .toggle").first().check(); + await page.getByRole("button", { name: "Clear completed" }).click(); + await expect( + page.getByRole("button", { name: "Clear completed" }) + ).toBeHidden(); + }); +}); + +test.describe("Persistence", () => { + test("should persist its data", async ({ page }) => { + // create a new todo locator + const newTodo = page.getByPlaceholder("What needs to be done?"); + + for (const item of TODO_ITEMS.slice(0, 2)) { + await newTodo.fill(item); + await newTodo.press("Enter"); + } + + const todoItems = page.getByTestId("todo-item"); + const firstTodoCheck = todoItems.nth(0).getByRole("checkbox"); + await firstTodoCheck.check(); + await expect(todoItems).toHaveText([TODO_ITEMS[0], TODO_ITEMS[1]]); + await expect(firstTodoCheck).toBeChecked(); + await expect(todoItems).toHaveClass(["completed", ""]); + + // Ensure there is 1 completed item. + await checkNumberOfCompletedTodosInLocalStorage(page, 1); + + // Now reload. + await page.reload(); + await expect(todoItems).toHaveText([TODO_ITEMS[0], TODO_ITEMS[1]]); + await expect(firstTodoCheck).toBeChecked(); + await expect(todoItems).toHaveClass(["completed", ""]); + }); +}); + +test.describe("Routing", () => { + test.beforeEach(async ({ page }) => { + await createDefaultTodos(page); + // make sure the app had a chance to save updated todos in storage + // before navigating to a new view, otherwise the items can get lost :( + // in some frameworks like Durandal + await checkTodosInLocalStorage(page, TODO_ITEMS[0]); + }); + + test("should allow me to display active items", async ({ page }) => { + const todoItem = page.getByTestId("todo-item"); + await page.getByTestId("todo-item").nth(1).getByRole("checkbox").check(); + + await checkNumberOfCompletedTodosInLocalStorage(page, 1); + await page.getByRole("link", { name: "Active" }).click(); + await expect(todoItem).toHaveCount(2); + await expect(todoItem).toHaveText([TODO_ITEMS[0], TODO_ITEMS[2]]); + }); + + test("should respect the back button", async ({ page }) => { + const todoItem = page.getByTestId("todo-item"); + await page.getByTestId("todo-item").nth(1).getByRole("checkbox").check(); + + await checkNumberOfCompletedTodosInLocalStorage(page, 1); + + await test.step("Showing all items", async () => { + await page.getByRole("link", { name: "All" }).click(); + await expect(todoItem).toHaveCount(3); + }); + + await test.step("Showing active items", async () => { + await page.getByRole("link", { name: "Active" }).click(); + }); + + await test.step("Showing completed items", async () => { + await page.getByRole("link", { name: "Completed" }).click(); + }); + + await expect(todoItem).toHaveCount(1); + await page.goBack(); + await expect(todoItem).toHaveCount(2); + await page.goBack(); + await expect(todoItem).toHaveCount(3); + }); + + test("should allow me to display completed items", async ({ page }) => { + await page.getByTestId("todo-item").nth(1).getByRole("checkbox").check(); + await checkNumberOfCompletedTodosInLocalStorage(page, 1); + await page.getByRole("link", { name: "Completed" }).click(); + await expect(page.getByTestId("todo-item")).toHaveCount(1); + }); + + test("should allow me to display all items", async ({ page }) => { + await page.getByTestId("todo-item").nth(1).getByRole("checkbox").check(); + await checkNumberOfCompletedTodosInLocalStorage(page, 1); + await page.getByRole("link", { name: "Active" }).click(); + await page.getByRole("link", { name: "Completed" }).click(); + await page.getByRole("link", { name: "All" }).click(); + await expect(page.getByTestId("todo-item")).toHaveCount(3); + }); + + test("should highlight the currently applied filter", async ({ page }) => { + await expect(page.getByRole("link", { name: "All" })).toHaveClass( + "selected" + ); + + //create locators for active and completed links + const activeLink = page.getByRole("link", { name: "Active" }); + const completedLink = page.getByRole("link", { name: "Completed" }); + await activeLink.click(); + + // Page change - active items. + await expect(activeLink).toHaveClass("selected"); + await completedLink.click(); + + // Page change - completed items. + await expect(completedLink).toHaveClass("selected"); + }); +}); + +async function createDefaultTodos(page: Page) { + // create a new todo locator + const newTodo = page.getByPlaceholder("What needs to be done?"); + + for (const item of TODO_ITEMS) { + await newTodo.fill(item); + await newTodo.press("Enter"); + } +} + +async function checkNumberOfTodosInLocalStorage(page: Page, expected: number) { + return await page.waitForFunction((e) => { + return JSON.parse(localStorage["react-todos"]).length === e; + }, expected); +} + +async function checkNumberOfCompletedTodosInLocalStorage( + page: Page, + expected: number +) { + return await page.waitForFunction((e) => { + return ( + JSON.parse(localStorage["react-todos"]).filter( + (todo: any) => todo.completed + ).length === e + ); + }, expected); +} + +async function checkTodosInLocalStorage(page: Page, title: string) { + return await page.waitForFunction((t) => { + return JSON.parse(localStorage["react-todos"]) + .map((todo: any) => todo.title) + .includes(t); + }, title); +} diff --git a/playwright/tests/example.spec.ts b/playwright/tests/example.spec.ts new file mode 100644 index 000000000..aea16f836 --- /dev/null +++ b/playwright/tests/example.spec.ts @@ -0,0 +1,20 @@ +import { test, expect } from "@playwright/test"; + +test("has title", async ({ page }) => { + await page.goto("https://playwright.dev/"); + + // Expect a title "to contain" a substring. + await expect(page).toHaveTitle(/Playwright/); +}); + +test("get started link", async ({ page }) => { + await page.goto("https://playwright.dev/"); + + // Click the get started link. + await page.getByRole("link", { name: "Get started" }).click(); + + // Expects page to have a heading with the name of Installation. + await expect( + page.getByRole("heading", { name: "Installation" }) + ).toBeVisible(); +}); diff --git a/playwright/tests/fakeIde.spec.ts b/playwright/tests/fakeIde.spec.ts new file mode 100644 index 000000000..15da246d2 --- /dev/null +++ b/playwright/tests/fakeIde.spec.ts @@ -0,0 +1,7 @@ +import { test, expect } from "@playwright/test"; +import { FakeIde } from "../fixtures/FakeIde"; + +test("fake ide", async ({ page }) => { + const fakeIde = await FakeIde.initialize(page); + await page.goto("/"); +}); diff --git a/playwright/tests/login.spec.ts b/playwright/tests/login.spec.ts new file mode 100644 index 000000000..9611f5516 --- /dev/null +++ b/playwright/tests/login.spec.ts @@ -0,0 +1,13 @@ +import { test, expect } from "../fixtures"; + +test("login through google with API stub", async ({ + page, + baseURL, + auth, + fakeIde, +}) => { + await auth.doLogin(baseURL, false, true); + await expect( + page.getByRole("heading", { name: "Login to Refact.ai" }) + ).not.toBeVisible({ timeout: 10000 }); +}); diff --git a/playwright/tests/login.spec.ts-snapshots/login-1-web-darwin.png b/playwright/tests/login.spec.ts-snapshots/login-1-web-darwin.png new file mode 100644 index 000000000..0cdfaea89 Binary files /dev/null and b/playwright/tests/login.spec.ts-snapshots/login-1-web-darwin.png differ diff --git a/playwright/tests/login.spec.ts-snapshots/login-2-web-darwin.png b/playwright/tests/login.spec.ts-snapshots/login-2-web-darwin.png new file mode 100644 index 000000000..0cdfaea89 Binary files /dev/null and b/playwright/tests/login.spec.ts-snapshots/login-2-web-darwin.png differ diff --git a/playwright/tests/login.spec.ts-snapshots/login-3-web-darwin.png b/playwright/tests/login.spec.ts-snapshots/login-3-web-darwin.png new file mode 100644 index 000000000..1c33e642a Binary files /dev/null and b/playwright/tests/login.spec.ts-snapshots/login-3-web-darwin.png differ diff --git a/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-1-chromium-darwin.png b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-1-chromium-darwin.png new file mode 100644 index 000000000..eed5178e2 Binary files /dev/null and b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-1-chromium-darwin.png differ diff --git a/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-1-vscode-darwin.png b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-1-vscode-darwin.png new file mode 100644 index 000000000..5c47c6347 Binary files /dev/null and b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-1-vscode-darwin.png differ diff --git a/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-1-web-darwin.png b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-1-web-darwin.png new file mode 100644 index 000000000..2908a80b4 Binary files /dev/null and b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-1-web-darwin.png differ diff --git a/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-2-chromium-darwin.png b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-2-chromium-darwin.png new file mode 100644 index 000000000..eed5178e2 Binary files /dev/null and b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-2-chromium-darwin.png differ diff --git a/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-2-vscode-darwin.png b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-2-vscode-darwin.png new file mode 100644 index 000000000..5c47c6347 Binary files /dev/null and b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-2-vscode-darwin.png differ diff --git a/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-2-web-darwin.png b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-2-web-darwin.png new file mode 100644 index 000000000..2908a80b4 Binary files /dev/null and b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-2-web-darwin.png differ diff --git a/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-3-chromium-darwin.png b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-3-chromium-darwin.png new file mode 100644 index 000000000..dcfbcfbf3 Binary files /dev/null and b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-3-chromium-darwin.png differ diff --git a/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-3-web-darwin.png b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-3-web-darwin.png new file mode 100644 index 000000000..3b5c25920 Binary files /dev/null and b/playwright/tests/login.spec.ts-snapshots/login-through-google-with-API-stub-3-web-darwin.png differ diff --git a/playwright/tests/statistics.spec.ts b/playwright/tests/statistics.spec.ts new file mode 100644 index 000000000..5a6c28904 --- /dev/null +++ b/playwright/tests/statistics.spec.ts @@ -0,0 +1,1294 @@ +import { test, expect } from "../fixtures"; + +test.describe("Statistics", () => { + test("stub stats", async ({ page, baseURL, navigation, fakeIde, auth }) => { + await auth.doLogin(); + await page + .context() + .route(" http://127.0.0.1:8001/v1/get-dashboard-plots", async (route) => { + await route.fulfill({ + status: 200, + json: STUB_STATS, + }); + }); + + await navigation.menuButton.click(); + + await page.getByRole("menuitem", { name: "Your Stats" }).click(); + + await page.waitForLoadState("networkidle"); + await page.waitForLoadState("domcontentloaded"); + + await new Promise((r) => setTimeout(r, 5000)); + + await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 0.1 }); + }); + + test("real stats", async ({ page, navigation, auth, fakeIde }) => { + await auth.doLogin(); + await navigation.menuButton.click(); + await page.getByRole("menuitem", { name: "Your Stats" }).click(); + + await page.waitForLoadState("networkidle"); + await page.waitForLoadState("domcontentloaded"); + await expect(page.getByText("Statistics")).toBeVisible(); + }); +}); + +const STUB_STATS = { + data: JSON.stringify({ + table_refact_impact: { + data: [ + { + lang: ".tsx", + refact: 50935, + human: 231926, + total: 282861, + refact_impact: 18.007078170776367, + completions: 1528, + }, + { + lang: ".ts", + refact: 67311, + human: 206829, + total: 274140, + refact_impact: 24.553512573242188, + completions: 1674, + }, + { + lang: ".kt", + refact: 25548, + human: 100858, + total: 126406, + refact_impact: 20.2110652923584, + completions: 852, + }, + { + lang: ".css", + refact: 568, + human: 3670, + total: 4238, + refact_impact: 13.402548789978027, + completions: 25, + }, + { + lang: ".yml", + refact: 320, + human: 352, + total: 672, + refact_impact: 47.619049072265625, + completions: 8, + }, + { + lang: ".md", + refact: 38, + human: 511, + total: 549, + refact_impact: 6.921675682067871, + completions: 2, + }, + { + lang: ".py", + refact: 355, + human: 10, + total: 365, + refact_impact: 97.2602767944336, + completions: 5, + }, + { + lang: ".kts", + refact: 76, + human: 0, + total: 76, + refact_impact: 1.0, + completions: 2, + }, + { + lang: ".html", + refact: 63, + human: 0, + total: 63, + refact_impact: 1.0, + completions: 1, + }, + { + lang: ".gitignore", + refact: 5, + human: 4, + total: 9, + refact_impact: 55.55555725097656, + completions: 1, + }, + ], + columns: [ + "Language", + "Refact", + "Human", + "Total (characters)", + "Refact Impact", + "Completions", + ], + title: "Refact's impact by language", + }, + refact_impact_dates: { + data: { + daily: { + "2024-09-03": { + langs: [".kt"], + refact: 170, + human: 52, + total: 222, + refact_impact: 76.57657623291016, + completions: 6, + }, + "2024-09-06": { + langs: [".ts", ".kt"], + refact: 2863, + human: 25443, + total: 28306, + refact_impact: 10.114463806152344, + completions: 113, + }, + "2024-12-10": { + langs: [".ts", ".tsx"], + refact: 491, + human: 7200, + total: 7691, + refact_impact: 6.384085178375244, + completions: 16, + }, + "2025-01-20": { + langs: [".ts"], + refact: 843, + human: 816, + total: 1659, + refact_impact: 50.813743591308594, + completions: 11, + }, + "2024-09-11": { + langs: [".kt", ".kts"], + refact: 695, + human: 1069, + total: 1764, + refact_impact: 39.39909362792969, + completions: 25, + }, + "2024-10-08": { + langs: [".tsx"], + refact: 41, + human: 2067, + total: 2108, + refact_impact: 1.9449715614318848, + completions: 1, + }, + "2025-03-08": { + langs: [".ts", ".tsx"], + refact: 456, + human: 2889, + total: 3345, + refact_impact: 13.63228702545166, + completions: 24, + }, + "2025-01-28": { + langs: [".css", ".ts", ".tsx"], + refact: 1323, + human: 7679, + total: 9002, + refact_impact: 14.696734428405762, + completions: 39, + }, + "2025-01-21": { + langs: [".css", ".ts", ".tsx"], + refact: 716, + human: 3189, + total: 3905, + refact_impact: 18.335468292236328, + completions: 12, + }, + "2024-10-15": { + langs: [".kt", ".tsx", ".ts"], + refact: 1038, + human: 1268, + total: 2306, + refact_impact: 45.01300811767578, + completions: 24, + }, + "2024-10-30": { + langs: [".kt"], + refact: 112, + human: 107, + total: 219, + refact_impact: 51.14155197143555, + completions: 6, + }, + "2025-02-20": { + langs: [".tsx", ".ts"], + refact: 3536, + human: 16396, + total: 19932, + refact_impact: 17.74031639099121, + completions: 112, + }, + "2025-02-28": { + langs: [".tsx", ".ts"], + refact: 394, + human: 3836, + total: 4230, + refact_impact: 9.314420700073242, + completions: 12, + }, + "2025-03-06": { + langs: [".ts", ".tsx"], + refact: 1318, + human: 3174, + total: 4492, + refact_impact: 29.34105110168457, + completions: 39, + }, + "2025-04-02": { + langs: [".ts", ".kt"], + refact: 73, + human: 270, + total: 343, + refact_impact: 21.282798767089844, + completions: 4, + }, + "2025-04-01": { + langs: [".kt", ".ts", ".md"], + refact: 371, + human: 2353, + total: 2724, + refact_impact: 13.61967658996582, + completions: 15, + }, + "2025-02-12": { + langs: [".ts", ".tsx", ".css"], + refact: 5953, + human: 10376, + total: 16329, + refact_impact: 36.45661163330078, + completions: 112, + }, + "2025-03-04": { + langs: [".tsx", ".ts"], + refact: 505, + human: 1765, + total: 2270, + refact_impact: 22.24669647216797, + completions: 21, + }, + "2025-02-21": { + langs: [".ts", ".tsx"], + refact: 2438, + human: 8769, + total: 11207, + refact_impact: 21.754261016845703, + completions: 67, + }, + "2024-09-16": { + langs: [".ts", ".tsx"], + refact: 3178, + human: 10234, + total: 13412, + refact_impact: 23.69519805908203, + completions: 85, + }, + "2025-03-13": { + langs: [".ts", ".tsx"], + refact: 3299, + human: 15211, + total: 18510, + refact_impact: 17.822797775268555, + completions: 101, + }, + "2025-03-21": { + langs: [".tsx", ".ts"], + refact: 636, + human: 3695, + total: 4331, + refact_impact: 14.684830665588379, + completions: 31, + }, + "2025-01-09": { + langs: [".ts", ".tsx"], + refact: 2939, + human: 5557, + total: 8496, + refact_impact: 34.592750549316406, + completions: 48, + }, + "2025-02-04": { + langs: [".tsx", ".ts"], + refact: 774, + human: 3744, + total: 4518, + refact_impact: 17.131473541259766, + completions: 26, + }, + "2024-12-04": { + langs: [".tsx", ".ts"], + refact: 689, + human: 1000, + total: 1689, + refact_impact: 40.79336929321289, + completions: 18, + }, + "2025-03-05": { + langs: [".tsx", ".ts"], + refact: 1152, + human: 1842, + total: 2994, + refact_impact: 38.47695541381836, + completions: 32, + }, + "2025-03-14": { + langs: [".tsx", ".ts"], + refact: 2554, + human: 8089, + total: 10643, + refact_impact: 23.996994018554688, + completions: 71, + }, + "2025-03-25": { + langs: [".tsx", ".ts"], + refact: 1570, + human: 5432, + total: 7002, + refact_impact: 22.422164916992188, + completions: 39, + }, + "2024-10-11": { + langs: [".tsx", ".ts", ".kt"], + refact: 2912, + human: 4588, + total: 7500, + refact_impact: 38.82666778564453, + completions: 69, + }, + "2025-02-23": { + langs: [".tsx", ".ts"], + refact: 619, + human: 1310, + total: 1929, + refact_impact: 32.08916473388672, + completions: 16, + }, + "2024-12-05": { + langs: [".tsx", ".ts"], + refact: 1039, + human: 2355, + total: 3394, + refact_impact: 30.61284637451172, + completions: 19, + }, + "2025-03-03": { + langs: [".ts"], + refact: 83, + human: 119, + total: 202, + refact_impact: 41.089107513427734, + completions: 3, + }, + "2025-04-11": { + langs: [".ts"], + refact: 308, + human: 707, + total: 1015, + refact_impact: 30.34482765197754, + completions: 10, + }, + "2025-02-18": { + langs: [".ts", ".tsx"], + refact: 2373, + human: 12615, + total: 14988, + refact_impact: 15.832666397094727, + completions: 61, + }, + "2025-03-17": { + langs: [".tsx", ".ts"], + refact: 835, + human: 2761, + total: 3596, + refact_impact: 23.220245361328125, + completions: 27, + }, + "2025-04-08": { + langs: [".kt", ".ts", ".tsx"], + refact: 1107, + human: 2968, + total: 4075, + refact_impact: 27.1656436920166, + completions: 34, + }, + "2024-12-08": { + langs: [".tsx"], + refact: 58, + human: 568, + total: 626, + refact_impact: 9.265175819396973, + completions: 3, + }, + "2025-03-24": { + langs: [".ts", ".tsx"], + refact: 93, + human: 483, + total: 576, + refact_impact: 16.14583396911621, + completions: 5, + }, + "2024-11-27": { + langs: [".tsx", ".ts"], + refact: 1758, + human: 4586, + total: 6344, + refact_impact: 27.711223602294922, + completions: 39, + }, + "2024-12-09": { + langs: [".tsx", ".ts"], + refact: 823, + human: 4702, + total: 5525, + refact_impact: 14.895927429199219, + completions: 14, + }, + "2025-02-19": { + langs: [".ts", ".tsx"], + refact: 9815, + human: 20295, + total: 30110, + refact_impact: 32.597145080566406, + completions: 204, + }, + "2024-12-02": { + langs: [".ts", ".tsx"], + refact: 1323, + human: 8431, + total: 9754, + refact_impact: 13.563666343688965, + completions: 41, + }, + "2024-11-22": { + langs: [".ts"], + refact: 1265, + human: 2387, + total: 3652, + refact_impact: 34.638553619384766, + completions: 19, + }, + "2024-11-26": { + langs: [".ts", ".tsx"], + refact: 1461, + human: 2736, + total: 4197, + refact_impact: 34.810577392578125, + completions: 36, + }, + "2024-09-09": { + langs: [".kt"], + refact: 3650, + human: 11523, + total: 15173, + refact_impact: 24.055889129638672, + completions: 117, + }, + "2025-03-26": { + langs: [".tsx", ".ts"], + refact: 624, + human: 3493, + total: 4117, + refact_impact: 15.156667709350586, + completions: 22, + }, + "2024-10-14": { + langs: [".tsx"], + refact: 216, + human: 762, + total: 978, + refact_impact: 22.08588981628418, + completions: 7, + }, + "2025-01-30": { + langs: [".ts", ".tsx"], + refact: 1833, + human: 7263, + total: 9096, + refact_impact: 20.151714324951172, + completions: 70, + }, + "2025-03-10": { + langs: [".gitignore", ".tsx", ".ts"], + refact: 1288, + human: 5166, + total: 6454, + refact_impact: 19.956615447998047, + completions: 38, + }, + "2024-11-29": { + langs: [".css", ".ts", ".tsx"], + refact: 2680, + human: 7715, + total: 10395, + refact_impact: 25.781625747680664, + completions: 77, + }, + "2025-01-08": { + langs: [".ts"], + refact: 1391, + human: 3297, + total: 4688, + refact_impact: 29.67150115966797, + completions: 25, + }, + "2024-09-05": { + langs: [".ts", ".kt"], + refact: 1965, + human: 5449, + total: 7414, + refact_impact: 26.5039119720459, + completions: 78, + }, + "2025-02-13": { + langs: [".tsx", ".css", ".ts"], + refact: 1089, + human: 4207, + total: 5296, + refact_impact: 20.56268882751465, + completions: 60, + }, + "2024-11-18": { + langs: [".ts"], + refact: 6, + human: 305, + total: 311, + refact_impact: 1.929260492324829, + completions: 1, + }, + "2025-02-11": { + langs: [".tsx", ".ts"], + refact: 1403, + human: 4207, + total: 5610, + refact_impact: 25.008913040161133, + completions: 63, + }, + "2024-05-21": { + langs: [".kt", ".yml"], + refact: 391, + human: 1046, + total: 1437, + refact_impact: 27.20946502685547, + completions: 11, + }, + "2025-01-07": { + langs: [".tsx"], + refact: 82, + human: 1035, + total: 1117, + refact_impact: 7.341092109680176, + completions: 3, + }, + "2024-12-06": { + langs: [".ts", ".tsx"], + refact: 1253, + human: 6009, + total: 7262, + refact_impact: 17.254199981689453, + completions: 25, + }, + "2025-03-28": { + langs: [".ts"], + refact: 465, + human: 677, + total: 1142, + refact_impact: 40.71803665161133, + completions: 14, + }, + "2025-02-10": { + langs: [".ts", ".tsx"], + refact: 744, + human: 1123, + total: 1867, + refact_impact: 39.85002517700195, + completions: 15, + }, + "2024-09-17": { + langs: [".tsx", ".ts"], + refact: 801, + human: 9929, + total: 10730, + refact_impact: 7.465051174163818, + completions: 38, + }, + "2025-01-31": { + langs: [".ts", ".tsx"], + refact: 820, + human: 2715, + total: 3535, + refact_impact: 23.196605682373047, + completions: 18, + }, + "2024-09-12": { + langs: [".tsx", ".ts", ".kt"], + refact: 526, + human: 1864, + total: 2390, + refact_impact: 22.00836753845215, + completions: 18, + }, + "2025-03-27": { + langs: [".tsx", ".ts"], + refact: 814, + human: 3261, + total: 4075, + refact_impact: 19.975460052490234, + completions: 23, + }, + "2024-10-09": { + langs: [".tsx"], + refact: 141, + human: 1151, + total: 1292, + refact_impact: 10.913312911987305, + completions: 5, + }, + "2025-01-29": { + langs: [".tsx", ".css", ".ts"], + refact: 2799, + human: 5955, + total: 8754, + refact_impact: 31.973955154418945, + completions: 53, + }, + "2025-04-03": { + langs: [".kt", ".kts"], + refact: 1151, + human: 21350, + total: 22501, + refact_impact: 5.115328311920166, + completions: 61, + }, + "2024-12-07": { + langs: [".ts"], + refact: 201, + human: 297, + total: 498, + refact_impact: 40.361446380615234, + completions: 3, + }, + "2024-12-11": { + langs: [".ts", ".tsx"], + refact: 1087, + human: 4069, + total: 5156, + refact_impact: 21.082233428955078, + completions: 27, + }, + "2025-04-09": { + langs: [".tsx", ".kt"], + refact: 694, + human: 8134, + total: 8828, + refact_impact: 7.861350059509277, + completions: 20, + }, + "2025-01-10": { + langs: [".tsx", ".ts"], + refact: 1923, + human: 6856, + total: 8779, + refact_impact: 21.904544830322266, + completions: 32, + }, + "2024-09-13": { + langs: [".kt"], + refact: 6010, + human: 8784, + total: 14794, + refact_impact: 40.624576568603516, + completions: 161, + }, + "2024-11-20": { + langs: [".tsx"], + refact: 1354, + human: 7838, + total: 9192, + refact_impact: 14.730199813842773, + completions: 47, + }, + "2024-08-21": { + langs: [".py", ".kt"], + refact: 1789, + human: 2856, + total: 4645, + refact_impact: 38.514530181884766, + completions: 60, + }, + "2024-09-24": { + langs: [".kt"], + refact: 48, + human: 11, + total: 59, + refact_impact: 81.3559341430664, + completions: 2, + }, + "2025-02-07": { + langs: [".tsx", ".ts"], + refact: 3543, + human: 10897, + total: 14440, + refact_impact: 24.5360107421875, + completions: 108, + }, + "2025-03-18": { + langs: [".ts", ".tsx"], + refact: 6691, + human: 26195, + total: 32886, + refact_impact: 20.346044540405273, + completions: 205, + }, + "2024-10-10": { + langs: [".ts"], + refact: 772, + human: 6803, + total: 7575, + refact_impact: 10.19141960144043, + completions: 31, + }, + "2024-09-18": { + langs: [".ts", ".tsx"], + refact: 1693, + human: 10208, + total: 11901, + refact_impact: 14.225695610046387, + completions: 45, + }, + "2025-04-16": { + langs: [".kt", ".ts"], + refact: 420, + human: 1216, + total: 1636, + refact_impact: 25.67237091064453, + completions: 16, + }, + "2025-04-14": { + langs: [".tsx", ".kt"], + refact: 808, + human: 911, + total: 1719, + refact_impact: 47.00407028198242, + completions: 31, + }, + "2025-01-27": { + langs: [".tsx"], + refact: 285, + human: 1752, + total: 2037, + refact_impact: 13.99116325378418, + completions: 6, + }, + "2025-02-03": { + langs: [".ts"], + refact: 178, + human: 1296, + total: 1474, + refact_impact: 12.075984001159668, + completions: 6, + }, + "2024-09-10": { + langs: [".kt", ".tsx"], + refact: 827, + human: 2683, + total: 3510, + refact_impact: 23.561254501342773, + completions: 27, + }, + "2025-03-12": { + langs: [".tsx"], + refact: 2908, + human: 9938, + total: 12846, + refact_impact: 22.63739776611328, + completions: 80, + }, + "2025-02-06": { + langs: [".tsx", ".ts"], + refact: 916, + human: 2570, + total: 3486, + refact_impact: 26.276535034179688, + completions: 29, + }, + "2024-11-21": { + langs: [".tsx", ".ts"], + refact: 788, + human: 3784, + total: 4572, + refact_impact: 17.2353458404541, + completions: 25, + }, + "2025-03-15": { + langs: [".tsx"], + refact: 384, + human: 994, + total: 1378, + refact_impact: 27.866472244262695, + completions: 10, + }, + "2025-04-04": { + langs: [".ts", ".kt"], + refact: 1991, + human: 12921, + total: 14912, + refact_impact: 13.351662635803223, + completions: 64, + }, + "2024-11-19": { + langs: [".ts", ".kt", ".tsx"], + refact: 1135, + human: 5838, + total: 6973, + refact_impact: 16.277069091796875, + completions: 48, + }, + "2025-04-10": { + langs: [".ts", ".kt"], + refact: 288, + human: 286, + total: 574, + refact_impact: 50.174217224121094, + completions: 9, + }, + "2024-10-16": { + langs: [".kt"], + refact: 1759, + human: 3715, + total: 5474, + refact_impact: 32.133724212646484, + completions: 45, + }, + "2024-12-03": { + langs: [".ts", ".tsx"], + refact: 48, + human: 190, + total: 238, + refact_impact: 20.168067932128906, + completions: 2, + }, + "2025-01-06": { + langs: [".ts"], + refact: 19, + human: 15, + total: 34, + refact_impact: 55.882354736328125, + completions: 1, + }, + "2025-01-23": { + langs: [".ts"], + refact: 971, + human: 2002, + total: 2973, + refact_impact: 32.660614013671875, + completions: 16, + }, + "2025-02-27": { + langs: [".ts"], + refact: 307, + human: 907, + total: 1214, + refact_impact: 25.28830337524414, + completions: 11, + }, + "2024-11-25": { + langs: [".ts", ".tsx"], + refact: 287, + human: 1324, + total: 1611, + refact_impact: 17.815021514892578, + completions: 9, + }, + "2024-11-28": { + langs: [".css", ".tsx"], + refact: 435, + human: 3399, + total: 3834, + refact_impact: 11.345852851867676, + completions: 17, + }, + "2025-03-07": { + langs: [".tsx", ".ts"], + refact: 1009, + human: 4434, + total: 5443, + refact_impact: 18.53757095336914, + completions: 30, + }, + "2024-10-17": { + langs: [".ts", ".tsx"], + refact: 193, + human: 242, + total: 435, + refact_impact: 44.36781692504883, + completions: 6, + }, + "2025-01-13": { + langs: [".ts", ".tsx"], + refact: 580, + human: 3671, + total: 4251, + refact_impact: 13.643848419189453, + completions: 14, + }, + "2024-10-21": { + langs: [".kt"], + refact: 16, + human: 36, + total: 52, + refact_impact: 30.769229888916016, + completions: 1, + }, + "2025-02-25": { + langs: [".ts"], + refact: 700, + human: 3683, + total: 4383, + refact_impact: 15.970796585083008, + completions: 15, + }, + "2025-03-11": { + langs: [".tsx", ".ts"], + refact: 1870, + human: 6384, + total: 8254, + refact_impact: 22.655681610107422, + completions: 58, + }, + "2025-03-19": { + langs: [".ts", ".tsx"], + refact: 1573, + human: 7723, + total: 9296, + refact_impact: 16.92125701904297, + completions: 45, + }, + "2024-09-26": { + langs: [".ts", ".tsx"], + refact: 2308, + human: 6373, + total: 8681, + refact_impact: 26.58679962158203, + completions: 46, + }, + "2025-04-07": { + langs: [".kt", ".html"], + refact: 950, + human: 7126, + total: 8076, + refact_impact: 11.763249397277832, + completions: 41, + }, + "2024-10-23": { + langs: [".kt"], + refact: 73, + human: 69, + total: 142, + refact_impact: 51.408451080322266, + completions: 4, + }, + "2025-01-22": { + langs: [".tsx"], + refact: 33, + human: 643, + total: 676, + refact_impact: 4.881656646728516, + completions: 2, + }, + "2025-02-14": { + langs: [".tsx", ".ts"], + refact: 1991, + human: 13895, + total: 15886, + refact_impact: 12.533047676086426, + completions: 52, + }, + "2025-03-20": { + langs: [".tsx", ".ts"], + refact: 247, + human: 2489, + total: 2736, + refact_impact: 9.027777671813965, + completions: 8, + }, + "2025-02-05": { + langs: [".tsx", ".ts"], + refact: 408, + human: 2006, + total: 2414, + refact_impact: 16.901409149169922, + completions: 14, + }, + "2025-02-24": { + langs: [".tsx", ".ts"], + refact: 138, + human: 1489, + total: 1627, + refact_impact: 8.481868743896484, + completions: 7, + }, + "2025-04-15": { + langs: [".kt"], + refact: 382, + human: 358, + total: 740, + refact_impact: 51.621620178222656, + completions: 8, + }, + "2024-10-29": { + langs: [".kt"], + refact: 58, + human: 215, + total: 273, + refact_impact: 21.245420455932617, + completions: 2, + }, + }, + weekly: { + "2025-02-25": { + langs: [".tsx", ".ts"], + refact: 1539, + human: 9915, + total: 11454, + refact_impact: 13.43635368347168, + completions: 45, + }, + "2025-02-20": { + langs: [".ts", ".tsx"], + refact: 18781, + human: 59385, + total: 78166, + refact_impact: 24.027070999145508, + completions: 460, + }, + "2025-01-09": { + langs: [".ts", ".tsx"], + refact: 6354, + human: 16760, + total: 23114, + refact_impact: 27.48983383178711, + completions: 109, + }, + "2024-09-05": { + langs: [".ts", ".kt"], + refact: 4998, + human: 30944, + total: 35942, + refact_impact: 13.905736923217773, + completions: 197, + }, + "2024-09-26": { + langs: [".kt", ".ts", ".tsx"], + refact: 2356, + human: 6384, + total: 8740, + refact_impact: 26.95652198791504, + completions: 48, + }, + "2024-11-19": { + langs: [".ts", ".tsx", ".kt"], + refact: 4548, + human: 20152, + total: 24700, + refact_impact: 18.41295623779297, + completions: 140, + }, + "2024-12-04": { + langs: [".ts", ".tsx"], + refact: 4611, + human: 18850, + total: 23461, + refact_impact: 19.653894424438477, + completions: 111, + }, + "2025-03-18": { + langs: [".ts", ".tsx"], + refact: 9982, + human: 42863, + total: 52845, + refact_impact: 18.889204025268555, + completions: 316, + }, + "2025-04-01": { + langs: [".ts", ".kts", ".md", ".kt"], + refact: 3586, + human: 36894, + total: 40480, + refact_impact: 8.858695983886719, + completions: 144, + }, + "2024-10-10": { + langs: [".ts", ".kt", ".tsx"], + refact: 3866, + human: 14609, + total: 18475, + refact_impact: 20.925575256347656, + completions: 106, + }, + "2025-04-11": { + langs: [".html", ".ts", ".kt", ".tsx"], + refact: 3347, + human: 19221, + total: 22568, + refact_impact: 14.830734252929688, + completions: 114, + }, + "2025-04-16": { + langs: [".tsx", ".kt", ".ts"], + refact: 1610, + human: 2485, + total: 4095, + refact_impact: 39.31623840332031, + completions: 55, + }, + "2024-09-10": { + langs: [".tsx", ".kts", ".kt", ".ts"], + refact: 11708, + human: 25923, + total: 37631, + refact_impact: 31.112646102905273, + completions: 348, + }, + "2024-05-21": { + langs: [".yml", ".kt"], + refact: 391, + human: 1046, + total: 1437, + refact_impact: 27.20946502685547, + completions: 11, + }, + "2024-11-27": { + langs: [".css", ".ts", ".tsx"], + refact: 6621, + human: 19760, + total: 26381, + refact_impact: 25.09760856628418, + completions: 178, + }, + "2024-10-29": { + langs: [".kt"], + refact: 170, + human: 322, + total: 492, + refact_impact: 34.5528450012207, + completions: 8, + }, + "2025-01-13": { + langs: [".ts", ".tsx"], + refact: 580, + human: 3671, + total: 4251, + refact_impact: 13.643848419189453, + completions: 14, + }, + "2024-10-23": { + langs: [".kt"], + refact: 89, + human: 105, + total: 194, + refact_impact: 45.87628936767578, + completions: 5, + }, + "2025-02-10": { + langs: [".tsx", ".ts", ".css"], + refact: 11180, + human: 33808, + total: 44988, + refact_impact: 24.851072311401367, + completions: 302, + }, + "2025-03-12": { + langs: [".ts", ".tsx", ".gitignore"], + refact: 12303, + human: 45782, + total: 58085, + refact_impact: 21.181028366088867, + completions: 358, + }, + "2025-03-26": { + langs: [".ts", ".tsx"], + refact: 3566, + human: 13346, + total: 16912, + refact_impact: 21.08561897277832, + completions: 103, + }, + "2024-10-16": { + langs: [".ts", ".tsx", ".kt"], + refact: 3206, + human: 5987, + total: 9193, + refact_impact: 34.874359130859375, + completions: 82, + }, + "2025-02-07": { + langs: [".ts", ".tsx"], + refact: 5819, + human: 20513, + total: 26332, + refact_impact: 22.098587036132812, + completions: 183, + }, + "2025-01-30": { + langs: [".tsx", ".ts", ".css"], + refact: 7060, + human: 25364, + total: 32424, + refact_impact: 21.77399444580078, + completions: 186, + }, + "2025-01-21": { + langs: [".ts", ".tsx", ".css"], + refact: 2563, + human: 6650, + total: 9213, + refact_impact: 27.819385528564453, + completions: 41, + }, + "2024-08-21": { + langs: [".kt", ".py"], + refact: 1789, + human: 2856, + total: 4645, + refact_impact: 38.514530181884766, + completions: 60, + }, + "2025-03-07": { + langs: [".ts", ".tsx"], + refact: 4523, + human: 14223, + total: 18746, + refact_impact: 24.1278133392334, + completions: 149, + }, + "2024-09-16": { + langs: [".ts", ".tsx"], + refact: 5672, + human: 30371, + total: 36043, + refact_impact: 15.736759185791016, + completions: 168, + }, + "2024-12-11": { + langs: [".ts", ".tsx"], + refact: 2401, + human: 15971, + total: 18372, + refact_impact: 13.06879997253418, + completions: 57, + }, + }, + }, + }, + }), +}; diff --git a/playwright/tests/statistics.spec.ts-snapshots/Statistics-stub-stats-1-chromium-darwin.png b/playwright/tests/statistics.spec.ts-snapshots/Statistics-stub-stats-1-chromium-darwin.png new file mode 100644 index 000000000..529655f76 Binary files /dev/null and b/playwright/tests/statistics.spec.ts-snapshots/Statistics-stub-stats-1-chromium-darwin.png differ diff --git a/playwright/tests/statistics.spec.ts-snapshots/Statistics-stub-stats-1-vscode-darwin.png b/playwright/tests/statistics.spec.ts-snapshots/Statistics-stub-stats-1-vscode-darwin.png new file mode 100644 index 000000000..16e11ce96 Binary files /dev/null and b/playwright/tests/statistics.spec.ts-snapshots/Statistics-stub-stats-1-vscode-darwin.png differ diff --git a/playwright/tests/statistics.spec.ts-snapshots/Statistics-stub-stats-1-web-darwin.png b/playwright/tests/statistics.spec.ts-snapshots/Statistics-stub-stats-1-web-darwin.png new file mode 100644 index 000000000..529655f76 Binary files /dev/null and b/playwright/tests/statistics.spec.ts-snapshots/Statistics-stub-stats-1-web-darwin.png differ diff --git a/playwright/tests/survey.spec.ts b/playwright/tests/survey.spec.ts new file mode 100644 index 000000000..3aa9be1bc --- /dev/null +++ b/playwright/tests/survey.spec.ts @@ -0,0 +1,32 @@ +import { test, expect } from "../fixtures"; + +test("User Survey", async ({ page, baseURL, fakeIde, auth }) => { + await auth.doLogin(baseURL, true, false); + // await page.goto(baseURL ?? "/"); + + await expect(page.getByRole("dialog")).toHaveScreenshot(); + + await page.locator("label").filter({ hasText: "Other" }).click(); + + await page.getByRole("textbox", { name: "Other..." }).fill("testing"); + + await page + .context() + .route( + "http://www.smallcloud.ai/save-questionnaire", + async (route, request) => { + await expect(request.method).toBe("POST"); + const body = request.postDataJSON(); + await expect(body).toEqual({}); + route.fulfill({ status: 200 }); + } + ); + + await page.getByRole("button", { name: "Submit" }).click(); + + await page.waitForLoadState("networkidle"); + + await expect( + page.getByRole("dialog", { name: "Thank You" }) + ).toHaveScreenshot(); +}); diff --git a/playwright/tests/survey.spec.ts-snapshots/User-Survey-1-chromium-darwin.png b/playwright/tests/survey.spec.ts-snapshots/User-Survey-1-chromium-darwin.png new file mode 100644 index 000000000..d1b112641 Binary files /dev/null and b/playwright/tests/survey.spec.ts-snapshots/User-Survey-1-chromium-darwin.png differ diff --git a/playwright/tests/survey.spec.ts-snapshots/User-Survey-1-chromium.png b/playwright/tests/survey.spec.ts-snapshots/User-Survey-1-chromium.png new file mode 100644 index 000000000..eed5178e2 Binary files /dev/null and b/playwright/tests/survey.spec.ts-snapshots/User-Survey-1-chromium.png differ diff --git a/playwright/tests/survey.spec.ts-snapshots/User-Survey-1-vscode-darwin.png b/playwright/tests/survey.spec.ts-snapshots/User-Survey-1-vscode-darwin.png new file mode 100644 index 000000000..9407ed1b9 Binary files /dev/null and b/playwright/tests/survey.spec.ts-snapshots/User-Survey-1-vscode-darwin.png differ diff --git a/playwright/tests/survey.spec.ts-snapshots/User-Survey-1-web-darwin.png b/playwright/tests/survey.spec.ts-snapshots/User-Survey-1-web-darwin.png new file mode 100644 index 000000000..bda5c160c Binary files /dev/null and b/playwright/tests/survey.spec.ts-snapshots/User-Survey-1-web-darwin.png differ diff --git a/playwright/tests/survey.spec.ts-snapshots/User-Survey-2-chromium-darwin.png b/playwright/tests/survey.spec.ts-snapshots/User-Survey-2-chromium-darwin.png new file mode 100644 index 000000000..52c75aa8a Binary files /dev/null and b/playwright/tests/survey.spec.ts-snapshots/User-Survey-2-chromium-darwin.png differ diff --git a/playwright/tests/survey.spec.ts-snapshots/User-Survey-2-chromium.png b/playwright/tests/survey.spec.ts-snapshots/User-Survey-2-chromium.png new file mode 100644 index 000000000..eed5178e2 Binary files /dev/null and b/playwright/tests/survey.spec.ts-snapshots/User-Survey-2-chromium.png differ diff --git a/playwright/tests/survey.spec.ts-snapshots/User-Survey-2-vscode-darwin.png b/playwright/tests/survey.spec.ts-snapshots/User-Survey-2-vscode-darwin.png new file mode 100644 index 000000000..45fc20785 Binary files /dev/null and b/playwright/tests/survey.spec.ts-snapshots/User-Survey-2-vscode-darwin.png differ diff --git a/playwright/tests/survey.spec.ts-snapshots/User-Survey-2-web-darwin.png b/playwright/tests/survey.spec.ts-snapshots/User-Survey-2-web-darwin.png new file mode 100644 index 000000000..52c75aa8a Binary files /dev/null and b/playwright/tests/survey.spec.ts-snapshots/User-Survey-2-web-darwin.png differ diff --git a/playwright/tests/survey.spec.ts-snapshots/User-Survey-3-chromium-darwin.png b/playwright/tests/survey.spec.ts-snapshots/User-Survey-3-chromium-darwin.png new file mode 100644 index 000000000..dcfbcfbf3 Binary files /dev/null and b/playwright/tests/survey.spec.ts-snapshots/User-Survey-3-chromium-darwin.png differ diff --git a/playwright/tests/tour.spec.ts b/playwright/tests/tour.spec.ts new file mode 100644 index 000000000..38e8a7762 --- /dev/null +++ b/playwright/tests/tour.spec.ts @@ -0,0 +1,47 @@ +import { test, expect } from "../fixtures"; +import { LoginPage } from "../fixtures/LoginPage"; +import { TourPage } from "../fixtures/TourPage"; + +test.use({ storageState: { cookies: [], origins: [] } }); +test("Tour", async ({ page, baseURL, fakeIde, auth }) => { + await fakeIde.clearMessages(); + await auth.doLogin(baseURL, false, false); + + const tourPage = new TourPage(page); + + await tourPage.step1(); + await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 0.1 }); + await expect(page.getByTestId("tour-box")).toHaveScreenshot(); + + await tourPage.step2(); + await expect(page.getByTestId("tour-box")).toHaveScreenshot(); + + await tourPage.step3(); + await expect(page.getByTestId("tour-box")).toHaveScreenshot({ + maxDiffPixelRatio: 0.01, + }); + + await tourPage.step4(); + // await expect(page.getByTestId("tour-box")).toHaveScreenshot({ + // maxDiffPixelRatio: 0.01, + // }); + + await tourPage.step5(); + await expect(page.getByTestId("tour-box")).toHaveScreenshot({ + maxDiffPixelRatio: 0.01, + }); + + await tourPage.step6(); + await expect(page.getByTestId("tour-box")).toMatchAriaSnapshot(); + await expect(page.getByTestId("tour-box")).toHaveScreenshot({ + maxDiffPixelRatio: 0.1, + }); + + await tourPage.step7(); + await expect(page.getByTestId("tour-box")).toHaveScreenshot({ + maxDiffPixelRatio: 0.01, + }); + + await tourPage.step8(); + await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 0.01 }); +}); diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-1-chromium-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-1-chromium-darwin.png new file mode 100644 index 000000000..eed5178e2 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-1-chromium-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-1-chromium.png b/playwright/tests/tour.spec.ts-snapshots/Tour-1-chromium.png new file mode 100644 index 000000000..eed5178e2 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-1-chromium.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-1-vscode-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-1-vscode-darwin.png new file mode 100644 index 000000000..9843c5e21 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-1-vscode-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-1-web-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-1-web-darwin.png new file mode 100644 index 000000000..64acc0837 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-1-web-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-1.aria.yml b/playwright/tests/tour.spec.ts-snapshots/Tour-1.aria.yml new file mode 100644 index 000000000..27c2bafa2 --- /dev/null +++ b/playwright/tests/tour.spec.ts-snapshots/Tour-1.aria.yml @@ -0,0 +1,4 @@ +- img +- text: Code completion - we use context from your entire repository - you can adjust the number of output tokens in Plugin settings +- img +- text: × next \ No newline at end of file diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-10-chromium-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-10-chromium-darwin.png new file mode 100644 index 000000000..6feb67c12 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-10-chromium-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-11-chromium-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-11-chromium-darwin.png new file mode 100644 index 000000000..16b9744b6 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-11-chromium-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-2-chromium-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-2-chromium-darwin.png new file mode 100644 index 000000000..2a774ada5 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-2-chromium-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-2-chromium.png b/playwright/tests/tour.spec.ts-snapshots/Tour-2-chromium.png new file mode 100644 index 000000000..eed5178e2 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-2-chromium.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-2-vscode-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-2-vscode-darwin.png new file mode 100644 index 000000000..82f473d29 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-2-vscode-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-2-web-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-2-web-darwin.png new file mode 100644 index 000000000..2a774ada5 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-2-web-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-3-chromium-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-3-chromium-darwin.png new file mode 100644 index 000000000..8a5d3121f Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-3-chromium-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-3-vscode-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-3-vscode-darwin.png new file mode 100644 index 000000000..79f3c051e Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-3-vscode-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-3-web-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-3-web-darwin.png new file mode 100644 index 000000000..8a5d3121f Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-3-web-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-4-chromium-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-4-chromium-darwin.png new file mode 100644 index 000000000..d2bfbce46 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-4-chromium-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-4-vscode-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-4-vscode-darwin.png new file mode 100644 index 000000000..e2f500f59 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-4-vscode-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-4-web-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-4-web-darwin.png new file mode 100644 index 000000000..d2bfbce46 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-4-web-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-5-chromium-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-5-chromium-darwin.png new file mode 100644 index 000000000..bcf499c25 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-5-chromium-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-5-vscode-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-5-vscode-darwin.png new file mode 100644 index 000000000..1b6d7c6e2 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-5-vscode-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-5-web-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-5-web-darwin.png new file mode 100644 index 000000000..04137ddb5 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-5-web-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-6-chromium-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-6-chromium-darwin.png new file mode 100644 index 000000000..a57aca025 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-6-chromium-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-6-vscode-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-6-vscode-darwin.png new file mode 100644 index 000000000..a396a8ba9 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-6-vscode-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-6-web-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-6-web-darwin.png new file mode 100644 index 000000000..60bf4c962 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-6-web-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-7-chromium-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-7-chromium-darwin.png new file mode 100644 index 000000000..6845b7d5c Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-7-chromium-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-7-vscode-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-7-vscode-darwin.png new file mode 100644 index 000000000..fe2141d9b Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-7-vscode-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-7-web-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-7-web-darwin.png new file mode 100644 index 000000000..896e9f378 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-7-web-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-8-chromium-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-8-chromium-darwin.png new file mode 100644 index 000000000..4d4e29603 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-8-chromium-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-8-vscode-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-8-vscode-darwin.png new file mode 100644 index 000000000..e5c44971e Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-8-vscode-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-8-web-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-8-web-darwin.png new file mode 100644 index 000000000..41aabf9b4 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-8-web-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-9-chromium-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-9-chromium-darwin.png new file mode 100644 index 000000000..16b9744b6 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-9-chromium-darwin.png differ diff --git a/playwright/tests/tour.spec.ts-snapshots/Tour-9-web-darwin.png b/playwright/tests/tour.spec.ts-snapshots/Tour-9-web-darwin.png new file mode 100644 index 000000000..16b9744b6 Binary files /dev/null and b/playwright/tests/tour.spec.ts-snapshots/Tour-9-web-darwin.png differ diff --git a/playwright/tsconfig.json b/playwright/tsconfig.json new file mode 100644 index 000000000..ab0c7b94b --- /dev/null +++ b/playwright/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "refact-chat-js/*": ["../refact-agent/gui/*"] // This mapping is relative to "baseUrl". + } + }, + "references": [{ "path": "../refact-agent/gui/tsconfig.node.json" }] +} diff --git a/refact-agent/engine/tests/emergency_frog_situation/frog.py b/refact-agent/engine/tests/emergency_frog_situation/frog.py index b8b05c955..547d27197 100644 --- a/refact-agent/engine/tests/emergency_frog_situation/frog.py +++ b/refact-agent/engine/tests/emergency_frog_situation/frog.py @@ -33,8 +33,8 @@ def croak(self, n_times): def swim(self, pond_width, pond_height): print("Swimming...") print("Splash! The frog is moving through the water") - self.x += self.vx * DT - self.y += self.vy * DT + self.x += self.vx * DT * 0.8 # Swimming is faster but still slightly slower than jumping + self.y += self.vy * DT * 0.8 # Swimming is faster but still slightly slower than jumping print("Ripple... ripple...") self.bounce_off_banks(pond_width, pond_height) self.x = np.clip(self.x, 0, pond_width) diff --git a/refact-agent/gui/package.json b/refact-agent/gui/package.json index 97d893a18..82ece3251 100644 --- a/refact-agent/gui/package.json +++ b/refact-agent/gui/package.json @@ -31,6 +31,7 @@ }, "scripts": { "dev": "vite", + "build:node": "vite build -c vite.node.config.ts ", "build": "tsc && vite build && vite build -c vite.node.config.ts", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", diff --git a/refact-agent/gui/src/app/store.ts b/refact-agent/gui/src/app/store.ts index 49b48ee80..77a2e3b33 100644 --- a/refact-agent/gui/src/app/store.ts +++ b/refact-agent/gui/src/app/store.ts @@ -223,6 +223,6 @@ export type AppStore = typeof store; declare global { interface Window { - __INITIAL_STATE__?: RootState; + __INITIAL_STATE__?: Partial; } } diff --git a/refact-agent/gui/src/components/Toolbar/Dropdown.tsx b/refact-agent/gui/src/components/Toolbar/Dropdown.tsx index c3702f802..fd40ac89a 100644 --- a/refact-agent/gui/src/components/Toolbar/Dropdown.tsx +++ b/refact-agent/gui/src/components/Toolbar/Dropdown.tsx @@ -106,7 +106,7 @@ export const Dropdown: React.FC = ({ return ( - + refs.setMore(x)}> diff --git a/refact-agent/gui/src/components/Tour/TourBox.tsx b/refact-agent/gui/src/components/Tour/TourBox.tsx index 627b40e2c..89ed666c5 100644 --- a/refact-agent/gui/src/components/Tour/TourBox.tsx +++ b/refact-agent/gui/src/components/Tour/TourBox.tsx @@ -13,6 +13,7 @@ export function TourBox({ children, style }: TourBubbleProps) { return ( ("ide/toolEdit"); -export const ideToolCallResponse = createAction<{ +export type ToolCallResponsePayload = { toolCallId: string; chatId: string; accepted: boolean | "indeterminate"; -}>("ide/toolEditResponse"); +}; + +export const ideToolCallResponse = createAction( + "ide/toolEditResponse", +); export const ideForceReloadProjectTreeFiles = createAction( "ide/forceReloadProjectTreeFiles",