/** E2E-SCR-001 — scripts library loads (MCP-SCR-001沉淀) */
import { test, expect } from '../fixtures.mjs'
import { login, nav } from '../helpers.mjs'

test('E2E-SCR-001 scripts page toolbar without JS errors', async ({ page }) => {
  const errors = []
  page.on('pageerror', (e) => errors.push(e.message))
  await login(page)
  await nav(page, '/scripts')
  await expect(page.getByRole('button', { name: '新建脚本' })).toBeVisible({ timeout: 20000 })
  expect(errors).toEqual([])
})
