v-bind-style.test.js 570 字节
Newer Older
H
hdx 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
const PAGE_PATH = '/pages/directive/v-bind/v-bind-style'

describe('v-bind-style', () => {
  let page
  beforeAll(async () => {
    page = await program.reLaunch(PAGE_PATH)
    await page.waitFor(500)
  })
  it('basic', async () => {
    const text = await page.$('.text-font-size')
    const view = await page.$('.view-style')

    expect(await text.style('fontSize')).toBe('14px')
    expect(await view.style('backgroundColor')).toBe('#008000')
    expect(await view.style('borderWidth')).toBe('2px')
    expect(await view.style('borderColor')).toBe('#0000FF')
  })
})