mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Fix loading large workflow embedded in webp (#777)
* Fix loading large workflow embedded in webp * Update test expectations [skip ci] * nit --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
BIN
browser_tests/assets/large_workflow.webp
Normal file
BIN
browser_tests/assets/large_workflow.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 316 KiB |
@@ -2,12 +2,15 @@ import { expect } from '@playwright/test'
|
||||
import { comfyPageFixture as test } from './ComfyPage'
|
||||
|
||||
test.describe('Load Workflow in Media', () => {
|
||||
;['workflow.webp', 'edited_workflow.webp', 'no_workflow.webp'].forEach(
|
||||
async (fileName) => {
|
||||
test(`Load workflow in ${fileName}`, async ({ comfyPage }) => {
|
||||
await comfyPage.dragAndDropFile(fileName)
|
||||
await expect(comfyPage.canvas).toHaveScreenshot(`${fileName}.png`)
|
||||
})
|
||||
}
|
||||
)
|
||||
;[
|
||||
'workflow.webp',
|
||||
'edited_workflow.webp',
|
||||
'no_workflow.webp',
|
||||
'large_workflow.webp'
|
||||
].forEach(async (fileName) => {
|
||||
test(`Load workflow in ${fileName}`, async ({ comfyPage }) => {
|
||||
await comfyPage.dragAndDropFile(fileName)
|
||||
await expect(comfyPage.canvas).toHaveScreenshot(`${fileName}.png`)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
@@ -50,8 +50,8 @@ function parseExifData(exifData) {
|
||||
let value
|
||||
if (type === 2) {
|
||||
// ASCII string
|
||||
value = String.fromCharCode(
|
||||
...exifData.slice(valueOffset, valueOffset + numValues - 1)
|
||||
value = new TextDecoder('utf-8').decode(
|
||||
exifData.subarray(valueOffset, valueOffset + numValues - 1)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user