Files
modeling-app/e2e/playwright/toolbarFixture.ts
Kurt Hutten 579151a9bb Sketch on chamfer UI (#3918)
* sketch on chamfer start

* working

* step app from getting in weird state when selection face to sketch on

* sketch on chamfer tests

* clean up

* fix test

* fix click selections for chamfers, add tests

* fixture setup (#3964)

* initial break up

* rename main fixture file

* add more expect state pattern

* add fixture comment

* add comments to chamfer function

* typos

* works without pipeExpr
2024-09-26 18:25:05 +10:00

22 lines
703 B
TypeScript

import type { Page, Locator } from '@playwright/test'
import { doAndWaitForImageDiff } from './test-utils'
export class ToolbarFixture {
public readonly page: Page
readonly extrudeButton: Locator
readonly startSketchBtn: Locator
readonly rectangleBtn: Locator
readonly exitSketchBtn: Locator
constructor(page: Page) {
this.page = page
this.extrudeButton = page.getByTestId('extrude')
this.startSketchBtn = page.getByTestId('sketch')
this.rectangleBtn = page.getByTestId('corner-rectangle')
this.exitSketchBtn = page.getByTestId('sketch-exit')
}
startSketchPlaneSelection = async () =>
doAndWaitForImageDiff(this.page, () => this.startSketchBtn.click(), 500)
}