import Config from '@opentiny-internal/playwright-config'

/**
 *  本地开发环境链接:'http://localhost:7130/pc/'
 *  本地官网链接:'http://localhost:3101'
 *  外部测试官网链接:'https://opentiny.github.io/tiny-vue-web-doc'
 */
const origin = 'http://localhost:3101/tiny-vue'

const baseURL = `${origin}/zh-CN/os-theme/components/`
const devServerCommon = 'pnpm run -w site'

export default Config({
  testDir: '../sites/demos/pc',
  baseURL,
  storageState: {
    origins: [
      {
        origin,
        localStorage: [
          { name: 'tiny-vue-api-mode', value: 'Composition' },
          { name: 'tiny-vue-demo-mode', value: 'single' },
          { name: 'tiny-e2e-test', value: 'true' }
        ]
      }
    ]
  },
  devServerCommon
})