Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: separate out projectMachine from Home route #4109

Merged
merged 53 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
401dcf8
Rename `homeMachine` and accessories to `projectsMachine`
franknoirot Oct 4, 2024
5822321
Separate out `/home` route from `projectsMachine`
franknoirot Oct 4, 2024
5bd8904
Add logic to navigate out from deleted or renamed project
franknoirot Oct 4, 2024
049e487
Show a warning in the command palette for deleting a project
franknoirot Oct 4, 2024
d7fe827
Make it navigate when you create a project
franknoirot Oct 4, 2024
4f06524
Update "New project" button to use command bar flow
franknoirot Oct 4, 2024
5d8f3f9
More explicit warning message text
franknoirot Oct 4, 2024
f496d94
Merge branch 'main' into franknoirot/4088/decouple-homeMachine
franknoirot Oct 7, 2024
fe6d1f8
Make projects watching code not run in web
franknoirot Oct 7, 2024
bfccb79
Tests first version: nested loops
franknoirot Oct 7, 2024
238163d
Tests second version: flattened
franknoirot Oct 7, 2024
3fc707a
Remove console logs
franknoirot Oct 7, 2024
f163870
Fix tsc
franknoirot Oct 7, 2024
8ab24ce
@jtran feedback, use the type guard util
franknoirot Oct 7, 2024
d1be6d7
A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
github-actions[bot] Oct 7, 2024
7545b61
A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
github-actions[bot] Oct 7, 2024
3d2e487
A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
github-actions[bot] Oct 7, 2024
f0136a5
Fix tests that relied on one-click, no-navigation project creation
franknoirot Oct 8, 2024
75e3f84
Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
franknoirot Oct 8, 2024
e22a9ed
Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)"
franknoirot Oct 8, 2024
372f2ee
Add a mask to the state indicator to client-side scale test
franknoirot Oct 8, 2024
1f515b7
A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
github-actions[bot] Oct 8, 2024
9378d98
A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
github-actions[bot] Oct 8, 2024
80e32b3
Merge branch 'main' into franknoirot/4088/decouple-homeMachine
franknoirot Oct 8, 2024
48380be
A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
github-actions[bot] Oct 8, 2024
f4ecd16
Merge branch 'main' into franknoirot/4088/decouple-homeMachine
franknoirot Oct 8, 2024
14eeafb
Fix lint
franknoirot Oct 8, 2024
403cee5
Fix tsc
franknoirot Oct 8, 2024
3a9e0c7
Fix a couple stray tests that still relied on the old way of creating…
franknoirot Oct 8, 2024
02b249b
Merge branch 'main' into franknoirot/update-download-progress
franknoirot Oct 10, 2024
746ebf8
De-flake another text that could be thrown off by toast-based selectors
franknoirot Oct 10, 2024
15bedd5
FMT
franknoirot Oct 10, 2024
1ce3d8c
Dumb test error because I was rushing
franknoirot Oct 10, 2024
a2330a0
A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
github-actions[bot] Oct 10, 2024
698ce67
Merge branch 'main' into franknoirot/4088/decouple-homeMachine
franknoirot Oct 10, 2024
4748c2d
Ahhh more flaky toasts, they're everywhere!
franknoirot Oct 10, 2024
36d49b1
A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)
github-actions[bot] Oct 10, 2024
1e5954e
Merge branch 'main' into franknoirot/4088/decouple-homeMachine
franknoirot Oct 11, 2024
b84d595
Merge branch 'main' into franknoirot/4088/decouple-homeMachine
franknoirot Oct 15, 2024
cbb8df5
A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
github-actions[bot] Oct 15, 2024
f55a7f0
Merge branch 'main' into franknoirot/4088/decouple-homeMachine
franknoirot Oct 22, 2024
e15d28c
A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
github-actions[bot] Oct 22, 2024
8af1e09
Re-run CI
franknoirot Oct 22, 2024
ee85c41
Merge branch 'main' into franknoirot/4088/decouple-homeMachine
franknoirot Oct 22, 2024
9667ffd
Merge branch 'main' into franknoirot/4088/decouple-homeMachine
franknoirot Oct 24, 2024
8bc3e89
Merge branch 'main' into franknoirot/4088/decouple-homeMachine
franknoirot Oct 28, 2024
f5be179
A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)
github-actions[bot] Oct 28, 2024
5ebd7d3
Re-run CI
franknoirot Oct 28, 2024
5528b2d
Merge branch 'main' into franknoirot/4088/decouple-homeMachine
franknoirot Oct 28, 2024
7d8a236
Fix one test added since this PR was made
franknoirot Oct 28, 2024
127f97d
Fix a few tests that failed due to changes since PR was made
franknoirot Oct 28, 2024
bec5187
Prevent double selector issue in Ubuntu test
franknoirot Oct 28, 2024
1949810
Prevent *a different* double selector issue
franknoirot Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 12 additions & 24 deletions e2e/playwright/file-tree.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { test, expect } from './fixtures/fixtureSetup'
import * as fsp from 'fs/promises'
import * as fs from 'fs'
import {
createProject,
executorInputPath,
getUtils,
setup,
Expand Down Expand Up @@ -114,20 +115,15 @@ test.describe('when using the file tree to', () => {
async ({ browser: _, tronApp }, testInfo) => {
await tronApp.initialise()

const {
panesOpen,
createAndSelectProject,
pasteCodeInEditor,
renameFile,
editorTextMatches,
} = await getUtils(tronApp.page, test)
const { panesOpen, pasteCodeInEditor, renameFile, editorTextMatches } =
await getUtils(tronApp.page, test)

await tronApp.page.setViewportSize({ width: 1200, height: 500 })
tronApp.page.on('console', console.log)

await panesOpen(['files', 'code'])

await createAndSelectProject('project-000')
await createProject({ name: 'project-000', page: tronApp.page })

// File the main.kcl with contents
const kclCube = await fsp.readFile(
Expand Down Expand Up @@ -167,15 +163,14 @@ test.describe('when using the file tree to', () => {
async ({ browser: _, tronApp }, testInfo) => {
await tronApp.initialise()

const { panesOpen, createAndSelectProject, createNewFile } =
await getUtils(tronApp.page, test)
const { panesOpen, createNewFile } = await getUtils(tronApp.page, test)

await tronApp.page.setViewportSize({ width: 1200, height: 500 })
tronApp.page.on('console', console.log)

await panesOpen(['files'])

await createAndSelectProject('project-000')
await createProject({ name: 'project-000', page: tronApp.page })

await createNewFile('')
await createNewFile('')
Expand Down Expand Up @@ -204,7 +199,6 @@ test.describe('when using the file tree to', () => {
const {
openKclCodePanel,
openFilePanel,
createAndSelectProject,
pasteCodeInEditor,
createNewFileAndSelect,
renameFile,
Expand All @@ -215,7 +209,7 @@ test.describe('when using the file tree to', () => {
await tronApp.page.setViewportSize({ width: 1200, height: 500 })
tronApp.page.on('console', console.log)

await createAndSelectProject('project-000')
await createProject({ name: 'project-000', page: tronApp.page })
await openKclCodePanel()
await openFilePanel()
// File the main.kcl with contents
Expand Down Expand Up @@ -263,20 +257,15 @@ test.describe('when using the file tree to', () => {
async ({ browser: _, tronApp }, testInfo) => {
await tronApp.initialise()

const {
panesOpen,
createAndSelectProject,
pasteCodeInEditor,
deleteFile,
editorTextMatches,
} = await getUtils(tronApp.page, _test)
const { panesOpen, pasteCodeInEditor, deleteFile, editorTextMatches } =
await getUtils(tronApp.page, _test)

await tronApp.page.setViewportSize({ width: 1200, height: 500 })
tronApp.page.on('console', console.log)

await panesOpen(['files', 'code'])

await createAndSelectProject('project-000')
await createProject({ name: 'project-000', page: tronApp.page })
// File the main.kcl with contents
const kclCube = await fsp.readFile(
'src/wasm-lib/tests/executor/inputs/cube.kcl',
Expand Down Expand Up @@ -306,7 +295,6 @@ test.describe('when using the file tree to', () => {

const {
panesOpen,
createAndSelectProject,
pasteCodeInEditor,
createNewFile,
openDebugPanel,
Expand All @@ -318,7 +306,7 @@ test.describe('when using the file tree to', () => {
tronApp.page.on('console', console.log)

await panesOpen(['files', 'code'])
await createAndSelectProject('project-000')
await createProject({ name: 'project-000', page: tronApp.page })

// Create a small file
const kclCube = await fsp.readFile(
Expand Down Expand Up @@ -722,7 +710,7 @@ _test.describe('Renaming in the file tree', () => {
})

await _test.step('Rename the folder', async () => {
await page.waitForTimeout(60000)
await page.waitForTimeout(1000)
await folderToRename.click({ button: 'right' })
await _expect(renameMenuItem).toBeVisible()
await renameMenuItem.click()
Expand Down
8 changes: 2 additions & 6 deletions e2e/playwright/onboarding-tests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
setupElectron,
tearDown,
executorInputPath,
createProject,
} from './test-utils'
import { bracket } from 'lib/exampleKcl'
import { onboardingPaths } from 'routes/Onboarding/paths'
Expand Down Expand Up @@ -74,13 +75,8 @@ test.describe('Onboarding tests', () => {
const viewportSize = { width: 1200, height: 500 }
await page.setViewportSize(viewportSize)

// Locators and constants
const newProjectButton = page.getByRole('button', { name: 'New project' })
const projectLink = page.getByTestId('project-link')

await test.step(`Create a project and open to the onboarding`, async () => {
await newProjectButton.click()
await projectLink.click()
await createProject({ name: 'project-link', page })
await test.step(`Ensure the engine connection works by testing the sketch button`, async () => {
await u.waitForPageLoad()
})
Expand Down
Loading
Loading