fix: fixing another e2e test
This commit is contained in:
@ -95,7 +95,7 @@ test(
|
|||||||
await u.openFilePanel()
|
await u.openFilePanel()
|
||||||
|
|
||||||
// Click on the other file
|
// Click on the other file
|
||||||
const otherKclButton = page.getByRole('button', { name: 'other.kcl' })
|
const otherKclButton = scene.getFileRowFromExplorer('other.kcl')
|
||||||
await otherKclButton.click()
|
await otherKclButton.click()
|
||||||
|
|
||||||
// Close the file pane
|
// Close the file pane
|
||||||
|
@ -1092,7 +1092,7 @@ test(`Create a few projects using the default project name`, async ({
|
|||||||
test(
|
test(
|
||||||
'File in the file pane should open with a single click',
|
'File in the file pane should open with a single click',
|
||||||
{ tag: '@desktop' },
|
{ tag: '@desktop' },
|
||||||
async ({ context, homePage, page }, testInfo) => {
|
async ({ context, homePage, page, scene }, testInfo) => {
|
||||||
const projectName = 'router-template-slate'
|
const projectName = 'router-template-slate'
|
||||||
await context.folderSetupFn(async (dir) => {
|
await context.folderSetupFn(async (dir) => {
|
||||||
await fsp.mkdir(`${dir}/${projectName}`, { recursive: true })
|
await fsp.mkdir(`${dir}/${projectName}`, { recursive: true })
|
||||||
@ -1120,7 +1120,7 @@ test(
|
|||||||
|
|
||||||
await page.getByRole('button', { name: 'Project Files' }).click()
|
await page.getByRole('button', { name: 'Project Files' }).click()
|
||||||
|
|
||||||
const file = page.getByRole('button', { name: 'otherThingToClickOn.kcl' })
|
const file = scene.getFileRowFromExplorer('otherThingToClickOn.kcl')
|
||||||
await expect(file).toBeVisible()
|
await expect(file).toBeVisible()
|
||||||
|
|
||||||
await file.click()
|
await file.click()
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import { addPlaceHoldersForNewFileAndFolder, isRowFake } from '@src/components/Explorer/utils'
|
import {
|
||||||
|
addPlaceHoldersForNewFileAndFolder,
|
||||||
|
isRowFake,
|
||||||
|
} from '@src/components/Explorer/utils'
|
||||||
import type { FileExplorerEntry } from '@src/components/Explorer/utils'
|
import type { FileExplorerEntry } from '@src/components/Explorer/utils'
|
||||||
import type { FileEntry } from '@src/lib/project'
|
import type { FileEntry } from '@src/lib/project'
|
||||||
|
|
||||||
@ -98,12 +101,12 @@ describe('Explorer utils.ts', () => {
|
|||||||
{
|
{
|
||||||
path: `/${parentPath}/.zoo-placeholder-folder`,
|
path: `/${parentPath}/.zoo-placeholder-folder`,
|
||||||
name: '.zoo-placeholder-folder',
|
name: '.zoo-placeholder-folder',
|
||||||
children : []
|
children: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: `/${parentPath}/.zoo-placeholder-file.kcl`,
|
path: `/${parentPath}/.zoo-placeholder-file.kcl`,
|
||||||
name: '.zoo-placeholder-file.kcl',
|
name: '.zoo-placeholder-file.kcl',
|
||||||
children : null
|
children: null,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
const children: FileEntry[] = []
|
const children: FileEntry[] = []
|
||||||
@ -120,7 +123,7 @@ describe('Explorer utils.ts', () => {
|
|||||||
{
|
{
|
||||||
path: `/${parentPath}/.zoo-placeholder-folder`,
|
path: `/${parentPath}/.zoo-placeholder-folder`,
|
||||||
name: '.zoo-placeholder-folder',
|
name: '.zoo-placeholder-folder',
|
||||||
children : []
|
children: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: `/${parentPath}/part001`,
|
path: `/${parentPath}/part001`,
|
||||||
@ -129,36 +132,36 @@ describe('Explorer utils.ts', () => {
|
|||||||
{
|
{
|
||||||
path: `/${parentPath}/part001/.zoo-placeholder-folder`,
|
path: `/${parentPath}/part001/.zoo-placeholder-folder`,
|
||||||
name: '.zoo-placeholder-folder',
|
name: '.zoo-placeholder-folder',
|
||||||
children : []
|
children: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: `/${parentPath}/part001/.zoo-placeholder-file.kcl`,
|
path: `/${parentPath}/part001/.zoo-placeholder-file.kcl`,
|
||||||
name: '.zoo-placeholder-file.kcl',
|
name: '.zoo-placeholder-file.kcl',
|
||||||
children : null
|
children: null,
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: `/${parentPath}/main.kcl`,
|
path: `/${parentPath}/main.kcl`,
|
||||||
name: 'main.kcl',
|
name: 'main.kcl',
|
||||||
children : null
|
children: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: `/${parentPath}/.zoo-placeholder-file.kcl`,
|
path: `/${parentPath}/.zoo-placeholder-file.kcl`,
|
||||||
name: '.zoo-placeholder-file.kcl',
|
name: '.zoo-placeholder-file.kcl',
|
||||||
children : null
|
children: null,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
const children: FileEntry[] = [
|
const children: FileEntry[] = [
|
||||||
{
|
{
|
||||||
path: `/${parentPath}/part001`,
|
path: `/${parentPath}/part001`,
|
||||||
name: 'part001',
|
name: 'part001',
|
||||||
children : []
|
children: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: `/${parentPath}/main.kcl`,
|
path: `/${parentPath}/main.kcl`,
|
||||||
name: 'main.kcl',
|
name: 'main.kcl',
|
||||||
children : null
|
children: null,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
const actual = addPlaceHoldersForNewFileAndFolder(children, parentPath)
|
const actual = addPlaceHoldersForNewFileAndFolder(children, parentPath)
|
||||||
|
Reference in New Issue
Block a user