Fix blob viewer (new UI) (#521)

* Fix blob viewer (new UI)
Fixes #371

* Add step test and update snaps

* Better selector
This commit is contained in:
Pierre Jacquier
2024-01-16 04:39:38 -05:00
committed by GitHub
parent 3db79ec964
commit 3bf47a10b8
6 changed files with 32 additions and 55 deletions

View File

@ -124,17 +124,28 @@ test('commit diff with an added .step file', async ({
// expect(screenshot2).toMatchSnapshot()
// })
// TODO: re-enable when new blob page is fixed
// test('blob preview with an .obj file', async ({
// page,
// authorizedBackground,
// }) => {
// const url =
// 'https://github.com/KittyCAD/diff-samples/blob/fd9eec79f0464833686ea6b5b34ea07145e32734/models/box.obj'
// const element = await getBlobPreviewElement(page, url)
// const screenshot = await element.screenshot()
// expect(screenshot).toMatchSnapshot()
// })
test('blob preview with an .obj file', async ({
page,
authorizedBackground,
}) => {
const url =
'https://github.com/KittyCAD/diff-samples/blob/fd9eec79f0464833686ea6b5b34ea07145e32734/models/box.obj'
const element = await getBlobPreviewElement(page, url)
const screenshot = await element.screenshot()
expect(screenshot).toMatchSnapshot()
})
test('blob preview with a .step file', async ({
page,
authorizedBackground,
}) => {
const url =
'https://github.com/KittyCAD/diff-samples/blob/fd9eec79f0464833686ea6b5b34ea07145e32734/models/box.step'
const element = await getBlobPreviewElement(page, url)
const screenshot = await element.screenshot()
expect(screenshot).toMatchSnapshot()
})
test('blob preview with an .stl file', async ({
page,