mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 00:50:05 +00:00
Use named imports.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { APIRequestContext, Locator, Page } from '@playwright/test'
|
||||
import { test as base, expect } from '@playwright/test'
|
||||
import dotenv from 'dotenv'
|
||||
import * as fs from 'fs'
|
||||
import { readFileSync } from 'fs'
|
||||
|
||||
import type { KeyCombo } from '../../src/platform/keybindings'
|
||||
import { TestIds } from './selectors'
|
||||
@@ -550,7 +550,7 @@ export class ComfyPage {
|
||||
// Dropping a file from the filesystem
|
||||
if (fileName) {
|
||||
const filePath = this.assetPath(fileName)
|
||||
const buffer = fs.readFileSync(filePath)
|
||||
const buffer = readFileSync(filePath)
|
||||
|
||||
const getFileType = (fileName: string) => {
|
||||
if (fileName.endsWith('.png')) return 'image/png'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as fs from 'fs'
|
||||
import { readFileSync } from 'fs'
|
||||
|
||||
import type { ComfyPage } from '../ComfyPage'
|
||||
|
||||
@@ -15,7 +15,7 @@ export class WorkflowHelper {
|
||||
for (const [key, value] of Object.entries(structure)) {
|
||||
if (typeof value === 'string') {
|
||||
const filePath = this.comfyPage.assetPath(value)
|
||||
result[key] = fs.readFileSync(filePath, 'utf-8')
|
||||
result[key] = readFileSync(filePath, 'utf-8')
|
||||
} else {
|
||||
result[key] = this.convertLeafToContent(value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user