Home / File/ todomvc.spec.ts — vue Source File

todomvc.spec.ts — vue Source File

Architecture documentation for todomvc.spec.ts, a typescript file in the vue codebase. 3 imports, 0 dependents.

File typescript VueCore 3 imports

Entity Profile

Dependency Diagram

graph LR
  569a2571_090b_ad2c_8933_9f2f34b1f6c7["todomvc.spec.ts"]
  89e1d5c3_816b_464a_8e3e_7496dffe6752["e2eUtils.ts"]
  569a2571_090b_ad2c_8933_9f2f34b1f6c7 --> 89e1d5c3_816b_464a_8e3e_7496dffe6752
  29f97b51_38b6_0943_0c18_913d76c86b26["setupPuppeteer"]
  569a2571_090b_ad2c_8933_9f2f34b1f6c7 --> 29f97b51_38b6_0943_0c18_913d76c86b26
  0409ae0b_e495_6959_8f5e_6f3562f01086["getExampleUrl"]
  569a2571_090b_ad2c_8933_9f2f34b1f6c7 --> 0409ae0b_e495_6959_8f5e_6f3562f01086
  style 569a2571_090b_ad2c_8933_9f2f34b1f6c7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { setupPuppeteer, getExampleUrl, E2E_TIMEOUT } from './e2eUtils'

describe('e2e: todomvc', () => {
  const {
    page,
    click,
    isVisible,
    count,
    text,
    value,
    isChecked,
    isFocused,
    classList,
    enterValue,
    clearValue
  } = setupPuppeteer()

  async function removeItemAt(n: number) {
    const item = (await page().$('.todo:nth-child(' + n + ')'))!
    const itemBBox = (await item.boundingBox())!
    await page().mouse.move(itemBBox.x + 10, itemBBox.y + 10)
    await click('.todo:nth-child(' + n + ') .destroy')
  }

  async function testTodomvc(apiType: 'classic' | 'composition') {
    const baseUrl = getExampleUrl('todomvc', apiType)
    await page().goto(baseUrl)
    expect(await isVisible('.main')).toBe(false)
    expect(await isVisible('.footer')).toBe(false)
    expect(await count('.filters .selected')).toBe(1)
    expect(await text('.filters .selected')).toBe('All')
    expect(await count('.todo')).toBe(0)

    await enterValue('.new-todo', 'test')
    expect(await count('.todo')).toBe(1)
    expect(await isVisible('.todo .edit')).toBe(false)
    expect(await text('.todo label')).toBe('test')
    expect(await text('.todo-count strong')).toBe('1')
    expect(await isChecked('.todo .toggle')).toBe(false)
    expect(await isVisible('.main')).toBe(true)
    expect(await isVisible('.footer')).toBe(true)
    expect(await isVisible('.clear-completed')).toBe(false)
    expect(await value('.new-todo')).toBe('')

    await enterValue('.new-todo', 'test2')
    expect(await count('.todo')).toBe(2)
    expect(await text('.todo:nth-child(2) label')).toBe('test2')
    expect(await text('.todo-count strong')).toBe('2')

    // toggle
    await click('.todo .toggle')
    expect(await count('.todo.completed')).toBe(1)
    expect(await classList('.todo:nth-child(1)')).toContain('completed')
    expect(await text('.todo-count strong')).toBe('1')
    expect(await isVisible('.clear-completed')).toBe(true)

    await enterValue('.new-todo', 'test3')
    expect(await count('.todo')).toBe(3)
    expect(await text('.todo:nth-child(3) label')).toBe('test3')
    expect(await text('.todo-count strong')).toBe('2')
// ... (123 more lines)

Domain

Frequently Asked Questions

What does todomvc.spec.ts do?
todomvc.spec.ts is a source file in the vue codebase, written in typescript. It belongs to the VueCore domain.
What does todomvc.spec.ts depend on?
todomvc.spec.ts imports 3 module(s): e2eUtils.ts, getExampleUrl, setupPuppeteer.
Where is todomvc.spec.ts in the architecture?
todomvc.spec.ts is located at test/e2e/todomvc.spec.ts (domain: VueCore, directory: test/e2e).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free