Some checks are pending
Auto-tag / Create date-tag (push) Waiting to run
CI / Backend (.NET 8) (push) Waiting to run
CI / Web (React + Vite) (push) Waiting to run
CI / POS (WPF, Windows) (push) Waiting to run
Docker Public / Build + push Public (test + latest) (push) Waiting to run
Docker Public / Deploy :test → test.food-market.kz (push) Blocked by required conditions
Проверка на test.food-market.kz: касса подаётся одинаково честно (скачивание «скоро») на главной/about как на /pos; «₸» не переносится в тарифах (1280 и 390). Автопроверка 5/5. Реквизиты не трогал. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
39 lines
2.5 KiB
JavaScript
39 lines
2.5 KiB
JavaScript
import { chromium } from '@playwright/test'
|
|
import { mkdirSync } from 'node:fs'
|
|
import { resolve } from 'node:path'
|
|
const BASE = process.env.SITE_URL ?? 'https://test.food-market.kz'
|
|
const OUT = resolve('/home/nns/food-market', 'docs/site-fixes-2026-10-11')
|
|
mkdirSync(OUT, { recursive: true })
|
|
const results = []
|
|
const ok = (n, c, d = '') => { results.push({ n, c: !!c, d }); console.log(`${c ? '✓' : '✗'} ${n} ${d}`) }
|
|
const b = await chromium.launch({ args: ['--ignore-certificate-errors'] })
|
|
|
|
for (const [w, h, tag] of [[1280, 900, '1280'], [390, 844, '390']]) {
|
|
const ctx = await b.newContext({ viewport: { width: w, height: h }, deviceScaleFactor: 2, ignoreHTTPSErrors: true, isMobile: w < 500, hasTouch: w < 500 })
|
|
const p = await ctx.newPage()
|
|
// pricing — конструктор, «₸» не переносится
|
|
await p.goto(`${BASE}/pricing`, { waitUntil: 'networkidle' }); await p.waitForTimeout(1200)
|
|
// «₸» в большой сумме и «5 000 ₸/мес» в одной строке (проверяем перенос по высоте строки)
|
|
const priceBox = await p.locator('#configurator .font-extrabold').first().boundingBox().catch(() => null)
|
|
ok(`pricing@${tag}: цена конструктора в одну строку`, priceBox && priceBox.height < 60, priceBox ? `h=${Math.round(priceBox.height)}` : 'нет')
|
|
await p.locator('#configurator').scrollIntoViewIfNeeded().catch(() => {})
|
|
await p.screenshot({ path: resolve(OUT, `k3-pricing-${tag}.png`) })
|
|
// главная — касса «скоро»
|
|
await p.goto(`${BASE}/`, { waitUntil: 'networkidle' }); await p.waitForTimeout(600)
|
|
const homeTxt = await p.locator('body').innerText()
|
|
ok(`главная@${tag}: касса «скачивание — скоро»`, /скачивани[ея].{0,3}—.{0,3}скоро/i.test(homeTxt))
|
|
await ctx.close()
|
|
}
|
|
// about — касса «скоро» (один раз)
|
|
{
|
|
const ctx = await b.newContext({ viewport: { width: 1280, height: 900 }, deviceScaleFactor: 2, ignoreHTTPSErrors: true })
|
|
const p = await ctx.newPage()
|
|
await p.goto(`${BASE}/about`, { waitUntil: 'networkidle' }); await p.waitForTimeout(500)
|
|
const t = await p.locator('body').innerText()
|
|
ok('about: касса «скачивание — скоро»', /приложение для скачивания.{0,3}—.{0,3}скоро/i.test(t))
|
|
await p.screenshot({ path: resolve(OUT, 'k3-about-1280.png'), fullPage: true })
|
|
await ctx.close()
|
|
}
|
|
await b.close()
|
|
console.log(`\n[site-verify-3] ${results.filter(r => r.c).length}/${results.length} passed → ${OUT}`)
|