From 93c097bd9c5d73ffecbd647023ac4d4e50820070 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Nov 2025 06:33:18 +0000 Subject: [PATCH] Fix URL examples to match Appwrite's localhost pattern and ensure consistent playwright install commands Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com> --- .github/agents/CHECKLIST.md | 2 +- .github/agents/code-change-agent.md | 18 +++++++++--------- .github/agents/screenshot-guide.md | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/agents/CHECKLIST.md b/.github/agents/CHECKLIST.md index 8dca974e23..7e0fae0b75 100644 --- a/.github/agents/CHECKLIST.md +++ b/.github/agents/CHECKLIST.md @@ -60,7 +60,7 @@ const { chromium } = require('playwright'); const browser = await chromium.launch(); const page = await browser.newPage(); await page.setViewportSize({ width: 1920, height: 1080 }); - await page.goto('http://localhost:3000/dashboard'); // Replace with your actual URL + await page.goto('http://localhost/console'); // Appwrite console URL (adjust path as needed) await page.waitForLoadState('networkidle'); await page.screenshot({ path: '/tmp/pr-screenshots/screenshot.png', fullPage: true }); await browser.close(); diff --git a/.github/agents/code-change-agent.md b/.github/agents/code-change-agent.md index 7d7858dd0d..5bae31634b 100644 --- a/.github/agents/code-change-agent.md +++ b/.github/agents/code-change-agent.md @@ -33,7 +33,7 @@ Take screenshots in the following scenarios: 1. **Install Playwright** (if not already available): ```bash npm install -D @playwright/test - npx playwright install + npx playwright install chromium ``` 2. **Create a screenshot script** in `/tmp/take-screenshots.js`: @@ -44,8 +44,8 @@ Take screenshots in the following scenarios: const browser = await chromium.launch(); const page = await browser.newPage(); - // Navigate to the changed UI (replace with your actual URL) - await page.goto('http://localhost:3000/dashboard'); + // Navigate to the changed UI (Appwrite runs on http://localhost by default) + await page.goto('http://localhost/console'); // Wait for the page to fully load await page.waitForLoadState('networkidle'); @@ -74,8 +74,8 @@ Take screenshots in the following scenarios: const { test, expect } = require('@playwright/test'); test('capture UI changes', async ({ page }) => { - // Replace with your actual URL - await page.goto('http://localhost:3000/dashboard'); + // Appwrite console runs on http://localhost by default + await page.goto('http://localhost/console'); await expect(page).toHaveScreenshot('ui-state.png'); }); ``` @@ -146,12 +146,12 @@ const { chromium } = require('playwright'); // Desktop view await page.setViewportSize({ width: 1920, height: 1080 }); - await page.goto('http://localhost:3000/dashboard'); - await page.screenshot({ path: '/tmp/pr-screenshots/dashboard-desktop.png', fullPage: true }); + await page.goto('http://localhost/console'); + await page.screenshot({ path: '/tmp/pr-screenshots/console-desktop.png', fullPage: true }); // Mobile view await page.setViewportSize({ width: 375, height: 667 }); - await page.screenshot({ path: '/tmp/pr-screenshots/dashboard-mobile.png', fullPage: true }); + await page.screenshot({ path: '/tmp/pr-screenshots/console-mobile.png', fullPage: true }); // Specific component const component = await page.locator('.my-changed-component'); @@ -168,7 +168,7 @@ const { chromium } = require('playwright'); (async () => { const browser = await chromium.launch(); const page = await browser.newPage(); - await page.goto('http://localhost:3000/form'); + await page.goto('http://localhost/console/account'); // Default state await page.screenshot({ path: '/tmp/pr-screenshots/form-default.png' }); diff --git a/.github/agents/screenshot-guide.md b/.github/agents/screenshot-guide.md index ac36979820..01e114ca8b 100644 --- a/.github/agents/screenshot-guide.md +++ b/.github/agents/screenshot-guide.md @@ -23,8 +23,8 @@ const { chromium } = require('playwright'); // Set viewport size await page.setViewportSize({ width: 1920, height: 1080 }); - // Navigate to your changed page (replace with actual URL, e.g., http://localhost:3000/settings) - await page.goto('http://localhost:3000/dashboard'); + // Navigate to your changed page (Appwrite console runs on http://localhost by default) + await page.goto('http://localhost/console'); await page.waitForLoadState('networkidle'); // Take screenshot @@ -191,8 +191,8 @@ const fs = require('fs'); // Test your changes on different pages const pages = [ - { url: 'http://localhost:3000/dashboard', name: 'dashboard' }, - { url: 'http://localhost:3000/settings', name: 'settings' } + { url: 'http://localhost/console', name: 'console' }, + { url: 'http://localhost/console/account', name: 'account' } ]; for (const pageInfo of pages) {