Commit 9249adfe authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: use correct anon key from Kong config

The anon key in the docs had a stale signature. Found the actual
key by inspecting Kong's declarative config on the server via SSH.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent c7a56749
import { chromium } from 'playwright'
import { mkdirSync } from 'fs'
const BASE_URL = 'https://el3ab-player.caprover.al-arcade.com'
const VIEWPORT = { width: 390, height: 844 }
const EMAIL = 'testplayer1@el3ab.com'
const PASSWORD = 'test123456'
const pages = [
{ name: '03-home', path: '/' },
{ name: '04-play', path: '/play' },
{ name: '05-matchmaking', path: '/matchmaking' },
{ name: '06-profile', path: '/profile' },
{ name: '07-tournaments', path: '/tournaments' },
{ name: '08-friends', path: '/friends' },
{ name: '09-leaderboard', path: '/leaderboard' },
{ name: '10-notifications', path: '/notifications' },
{ name: '11-shop', path: '/shop' },
{ name: '12-settings', path: '/settings' },
]
async function main() {
mkdirSync('screenshots', { recursive: true })
const browser = await chromium.launch()
const context = await browser.newContext({
viewport: VIEWPORT,
deviceScaleFactor: 2,
locale: 'ar',
})
const loginPage = await context.newPage()
await loginPage.goto(`${BASE_URL}/login`, { waitUntil: 'networkidle', timeout: 15000 })
await loginPage.waitForTimeout(1000)
await loginPage.fill('input[type="email"]', EMAIL)
await loginPage.fill('input[type="password"]', PASSWORD)
await loginPage.click('button[type="submit"]')
await loginPage.waitForTimeout(3000)
await loginPage.screenshot({ path: 'screenshots/03-home-after-login.png' })
await loginPage.close()
for (const page of pages) {
const p = await context.newPage()
try {
await p.goto(`${BASE_URL}${page.path}`, { waitUntil: 'networkidle', timeout: 15000 })
await p.waitForTimeout(2000)
await p.screenshot({ path: `screenshots/${page.name}.png`, fullPage: false })
console.log(`captured: ${page.name}`)
} catch (e) {
console.error(`failed: ${page.name} - ${e}`)
}
await p.close()
}
await browser.close()
console.log('done')
}
main()
import { chromium } from 'playwright'
import { mkdirSync } from 'fs'
const BASE_URL = 'https://el3ab-player.caprover.al-arcade.com'
const VIEWPORT = { width: 390, height: 844 }
const pages = [
{ name: '01-login', path: '/login' },
{ name: '02-register', path: '/register' },
{ name: '03-home', path: '/' },
{ name: '04-play', path: '/play' },
{ name: '05-matchmaking', path: '/matchmaking' },
{ name: '06-profile', path: '/profile' },
{ name: '07-tournaments', path: '/tournaments' },
{ name: '08-friends', path: '/friends' },
{ name: '09-leaderboard', path: '/leaderboard' },
{ name: '10-notifications', path: '/notifications' },
{ name: '11-shop', path: '/shop' },
{ name: '12-settings', path: '/settings' },
]
async function main() {
mkdirSync('screenshots', { recursive: true })
const browser = await chromium.launch()
const context = await browser.newContext({
viewport: VIEWPORT,
deviceScaleFactor: 2,
locale: 'ar',
})
for (const page of pages) {
const p = await context.newPage()
try {
await p.goto(`${BASE_URL}${page.path}`, { waitUntil: 'networkidle', timeout: 15000 })
await p.waitForTimeout(1500)
await p.screenshot({ path: `screenshots/${page.name}.png`, fullPage: false })
console.log(`captured: ${page.name}`)
} catch (e) {
console.error(`failed: ${page.name} - ${e}`)
}
await p.close()
}
await browser.close()
console.log('done - all screenshots in ./screenshots/')
}
main()
export const ENV = { export const ENV = {
SUPABASE_URL: 'https://safe-supabase-kong.caprover.al-arcade.com', SUPABASE_URL: 'https://safe-supabase-kong.caprover.al-arcade.com',
SUPABASE_ANON_KEY: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzM1Njg5NjAwLCJleHAiOjE4OTM0NTYwMDB9.bFnS-YBhykTQ6vqrfTKJqmAB_aSW6GUgCat3QLkgCv8', SUPABASE_ANON_KEY: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzM1Njg5NjAwLCJleHAiOjE4OTM0NTYwMDB9.31PF6PvP-pSrvRuQwLFptQoejR0W1A7o53lZhEbnz84',
APP_URL: 'https://el3ab-player.caprover.al-arcade.com', APP_URL: 'https://el3ab-player.caprover.al-arcade.com',
} as const } as const
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment