svg.spec.ts — vue Source File
Architecture documentation for svg.spec.ts, a typescript file in the vue codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR a2eacfa0_6531_3300_dcd1_a86184018e56["svg.spec.ts"] 74c9703b_0a18_7462_9820_16ae2926fb68["e2eUtils.ts"] a2eacfa0_6531_3300_dcd1_a86184018e56 --> 74c9703b_0a18_7462_9820_16ae2926fb68 a0544ceb_04fe_69ff_50e4_5f4b5588b908["setupPuppeteer"] a2eacfa0_6531_3300_dcd1_a86184018e56 --> a0544ceb_04fe_69ff_50e4_5f4b5588b908 86d0ef47_5ef3_4c63_5a71_03f519f9407a["getExampleUrl"] a2eacfa0_6531_3300_dcd1_a86184018e56 --> 86d0ef47_5ef3_4c63_5a71_03f519f9407a style a2eacfa0_6531_3300_dcd1_a86184018e56 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { setupPuppeteer, getExampleUrl, E2E_TIMEOUT } from './e2eUtils'
declare const globalStats: {
label: string
value: number
}[]
declare function valueToPoint(
value: number,
index: number,
total: number
): {
x: number
y: number
}
describe('e2e: svg', () => {
const { page, click, count, setValue, typeValue } = setupPuppeteer()
// assert the shape of the polygon is correct
async function assertPolygon(total: number) {
expect(
await page().evaluate(
total => {
const points = globalStats
.map((stat, i) => {
const point = valueToPoint(stat.value, i, total)
return point.x + ',' + point.y
})
.join(' ')
return (
document.querySelector('polygon')!.attributes[0].value === points
)
},
[total]
)
).toBe(true)
}
// assert the position of each label is correct
async function assertLabels(total: number) {
const positions = await page().evaluate(
total => {
return globalStats.map((stat, i) => {
const point = valueToPoint(+stat.value + 10, i, total)
return [point.x, point.y]
})
},
[total]
)
for (let i = 0; i < total; i++) {
const textPosition = await page().$eval(
`text:nth-child(${i + 3})`,
node => [+node.attributes[0].value, +node.attributes[1].value]
)
expect(textPosition).toEqual(positions[i])
}
}
// assert each value of stats is correct
// ... (92 more lines)
Domain
Subdomains
Classes
Dependencies
Source
Frequently Asked Questions
What does svg.spec.ts do?
svg.spec.ts is a source file in the vue codebase, written in typescript. It belongs to the CompilerSFC domain, ScriptAnalyzer subdomain.
What does svg.spec.ts depend on?
svg.spec.ts imports 3 module(s): e2eUtils.ts, getExampleUrl, setupPuppeteer.
Where is svg.spec.ts in the architecture?
svg.spec.ts is located at test/e2e/svg.spec.ts (domain: CompilerSFC, subdomain: ScriptAnalyzer, directory: test/e2e).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free