Rename desktop e2e scripts and tags for consistency (#7240)

* Rename desktop e2e scripts and tags for consistency

* Show local command in main test step

* Restore 'e2e' prefix to clarify GitHub UI

* Add web script to contributor guide
This commit is contained in:
Jace Browning
2025-05-29 09:29:03 -04:00
committed by GitHub
parent b123dacc41
commit 55e1ec7dad
24 changed files with 129 additions and 118 deletions

View File

@ -17,7 +17,7 @@ import { expect, test } from '@e2e/playwright/zoo-test'
test(
'projects reload if a new one is created, deleted, or renamed externally',
{ tag: ['@electron', '@macos', '@windows'] },
{ tag: ['@desktop', '@macos', '@windows'] },
async ({ context, page }, testInfo) => {
let externalCreatedProjectName = 'external-created-project'
@ -63,7 +63,7 @@ test(
test(
'click help/keybindings from home page',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ page }, testInfo) => {
await page.setBodyDimensions({ width: 1200, height: 500 })
@ -81,7 +81,7 @@ test(
test(
'click help/keybindings from project page',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ scene, cmdBar, context, page }, testInfo) => {
await context.folderSetupFn(async (dir) => {
const bracketDir = path.join(dir, 'bracket')
@ -112,7 +112,7 @@ test(
test(
'open a file in a project works and renders, open another file in different project with errors, it should clear the scene',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ scene, cmdBar, context, page, editor }, testInfo) => {
await context.folderSetupFn(async (dir) => {
const bracketDir = path.join(dir, 'bracket')
@ -184,7 +184,7 @@ test(
test(
'open a file in a project works and renders, open another file in different project that is empty, it should clear the scene',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ scene, cmdBar, context, page }, testInfo) => {
await context.folderSetupFn(async (dir) => {
const bracketDir = path.join(dir, 'bracket')
@ -244,7 +244,7 @@ test(
test(
'open a file in a project works and renders, open empty file, it should clear the scene',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page }, testInfo) => {
await context.folderSetupFn(async (dir) => {
const bracketDir = path.join(dir, 'bracket')
@ -310,7 +310,7 @@ test(
test(
'open a file in a project works and renders, open another file in the same project with errors, it should clear the scene',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ scene, cmdBar, context, page }, testInfo) => {
await context.folderSetupFn(async (dir) => {
const bracketDir = path.join(dir, 'bracket')
@ -382,7 +382,7 @@ test(
test(
'when code with error first loads you get errors in console',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page, editor }, testInfo) => {
await context.folderSetupFn(async (dir) => {
await fsp.mkdir(path.join(dir, 'broken-code'), { recursive: true })
@ -416,7 +416,7 @@ test.describe('Can export from electron app', () => {
for (const method of exportMethods) {
test(
`Can export using ${method}`,
{ tag: ['@electron', '@skipLocalEngine'] },
{ tag: ['@desktop', '@skipLocalEngine'] },
async ({ scene, cmdBar, context, page, tronApp }, testInfo) => {
if (!tronApp) {
fail()
@ -507,7 +507,7 @@ test.describe('Can export from electron app', () => {
})
test(
'Rename and delete projects, also spam arrow keys when renaming',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page }, testInfo) => {
await context.folderSetupFn(async (dir) => {
await fsp.mkdir(`${dir}/router-template-slate`, { recursive: true })
@ -723,7 +723,7 @@ test(
test(
'pressing "delete" on home screen should do nothing',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page, homePage }, testInfo) => {
await context.folderSetupFn(async (dir) => {
await fsp.mkdir(`${dir}/router-template-slate`, { recursive: true })
@ -753,7 +753,7 @@ test(
test.describe(`Project management commands`, () => {
test(
`Rename from project page`,
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page, scene, cmdBar }, testInfo) => {
const projectName = `my_project_to_rename`
await context.folderSetupFn(async (dir) => {
@ -815,7 +815,7 @@ test.describe(`Project management commands`, () => {
test(
`Delete from project page`,
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page, scene, cmdBar }, testInfo) => {
const projectName = `my_project_to_delete`
await context.folderSetupFn(async (dir) => {
@ -869,7 +869,7 @@ test.describe(`Project management commands`, () => {
)
test(
`Rename from home page`,
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page, homePage, scene, cmdBar }, testInfo) => {
const projectName = `my_project_to_rename`
await context.folderSetupFn(async (dir) => {
@ -927,7 +927,7 @@ test.describe(`Project management commands`, () => {
)
test(
`Delete from home page`,
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page, scene, cmdBar }, testInfo) => {
const projectName = `my_project_to_delete`
await context.folderSetupFn(async (dir) => {
@ -1103,7 +1103,7 @@ test(`Create a few projects using the default project name`, async ({
test(
'File in the file pane should open with a single click',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, homePage, page }, testInfo) => {
const projectName = 'router-template-slate'
await context.folderSetupFn(async (dir) => {
@ -1145,7 +1145,7 @@ test(
test(
'Nested directories in project without main.kcl do not create main.kcl',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ scene, cmdBar, context, page }, testInfo) => {
let testDir: string | undefined
await context.folderSetupFn(async (dir) => {
@ -1202,7 +1202,7 @@ test(
test(
'Deleting projects, can delete individual project, can still create projects after deleting all',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page }, testInfo) => {
const projectData = [
['router-template-slate', 'cylinder.kcl'],
@ -1280,7 +1280,7 @@ test(
test(
'Can load a file with CRLF line endings',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page, scene, cmdBar }, testInfo) => {
await context.folderSetupFn(async (dir) => {
const routerTemplateDir = path.join(dir, 'router-template-slate')
@ -1312,7 +1312,7 @@ test(
test(
'Can sort projects on home page',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page }, testInfo) => {
const projectData = [
['router-template-slate', 'cylinder.kcl'],
@ -1419,7 +1419,7 @@ test(
test(
'When the project folder is empty, user can create new project and open it.',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ page }, testInfo) => {
const u = await getUtils(page)
await page.setBodyDimensions({ width: 1200, height: 500 })
@ -1515,7 +1515,7 @@ extrude001 = extrude(sketch001, length = 200)`)
test(
'Opening a project should successfully load the stream, (regression test that this also works when switching between projects)',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page, cmdBar, homePage, scene }, testInfo) => {
await context.folderSetupFn(async (dir) => {
await fsp.mkdir(path.join(dir, 'router-template-slate'), {
@ -1628,7 +1628,7 @@ test(
test(
'You can change the root projects directory and nothing is lost',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page, tronApp, homePage }, testInfo) => {
if (!tronApp) {
fail()
@ -1735,7 +1735,7 @@ test(
test(
'Search projects on desktop home',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page }, testInfo) => {
const projectData = [
['basic bracket', 'focusrite_scarlett_mounting_bracket.kcl'],
@ -1791,7 +1791,7 @@ test(
test(
'file pane is scrollable when there are many files',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ scene, cmdBar, context, page }, testInfo) => {
await context.folderSetupFn(async (dir) => {
const testDir = path.join(dir, 'testProject')
@ -1892,7 +1892,7 @@ test(
test(
'select all in code editor does not actually select all, just what is visible (regression)',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page }, testInfo) => {
await context.folderSetupFn(async (dir) => {
// rust/kcl-lib/e2e/executor/inputs/mike_stress_test.kcl
@ -1950,7 +1950,7 @@ test(
test(
'Settings persist across restarts',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ page, toolbar }, testInfo) => {
await test.step('We can change a user setting like theme', async () => {
await page.setBodyDimensions({ width: 1200, height: 500 })
@ -1982,7 +1982,7 @@ test(
test(
'Original project name persist after onboarding',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ page, toolbar }, testInfo) => {
const nextButton = page.getByTestId('onboarding-next')
await page.setBodyDimensions({ width: 1200, height: 500 })
@ -2022,7 +2022,7 @@ test(
test(
'project name with foreign characters should open',
{ tag: '@electron' },
{ tag: '@desktop' },
async ({ context, page }, testInfo) => {
await context.folderSetupFn(async (dir) => {
const bracketDir = path.join(dir, 'العربية')
@ -2067,7 +2067,7 @@ test(
test(
'import from nested directory',
{ tag: ['@electron', '@windows', '@macos'] },
{ tag: ['@desktop', '@windows', '@macos'] },
async ({ scene, cmdBar, context, page }) => {
await context.folderSetupFn(async (dir) => {
const bracketDir = path.join(dir, 'bracket')