Files
modeling-app/e2e/playwright/native-file-menu.spec.ts

563 lines
22 KiB
TypeScript
Raw Normal View History

Feature: Traditional menu actions in desktop application part II (#6030) * chore: skeleton for building and creating menus. Need electron to renderer interface to dynamically set the menu * chore: skeleton typing for communication between nodes and web side * chore: more skeleton for the different roles within the menu options, need more type safety * chore: adding more skeleton and templates of what the menus could be * chore: implemented first pass for helpRole links * fix: syntax issue stopped the build step * feature: loading different menus based on your page * feature: Home page file role implemented * chore: handling the build workflow for the signin page * fix: moving edit actionst to the edit menu * chore: adding preferences to the file role * chore: redoing help roles based on the question mark widget * fix: auto fmt * chore: examples of accelerator strings for Menu.MenuItems keyboard shortcuts! * chore: oddly specific toggle API for disabling MenuItems from JS. No rules! * fix: do not implement a custom label disable thingy, use id on menu and use the native APIga * fix: auto fmt * fix: adding some typechecks and auto fmt fixes * fix: trying to fix custom type? * fix: nvm we back, the lsp on my editor borked for a second * fix: adding one more level to the custom type for the labels * chore: cleaning up type definitions to read easier * fix: resolving yarn lint errors * chore: adding file sign out * chore: adding more file bar actions * chore: ready for PR draft * fix: preemptive GC collectoin bug fix if somehow a user interacts with a menu while it is being GCed * fix: linking the OG source * fix: set application menu to null to avoid default electron menu * chore: trying to add more typescript * chore: BIG workflow changes... better typing, less IPC junk * fix: remapping the icp functions to the cb option select... * chore: all og events are rehooked up with new workflow pattern * feat: adding more options to the native bar! * fix: todo * chore: cleaning up some menus and adding more * fix: desktop vs browser and lint errors * fix: typescript did not like sample electorn JS code for the basic templates with isMac conditionals... * fix: PR clean up * fix: more PR cleanup * A snapshot a day keeps the bugs away! 📷🐛 * fix: added the new help menu to the default sign in and modeling page * fix: disabled two menu actions within sign in page since they will not do anything. * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: mergining main, auto fixes * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: saving off progress found an IPC on/off bug thanks electron! * fix: fixed ipc renderer off/remove listener bug * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * chore: skeleton layout for the file menu in the modeling page. * fix: adding types * A snapshot a day keeps the bugs away! 📷🐛 * fix: more skeleton * feat: adding file preferences project settings * feat: adding share current part link to file menu * fix: report a bug to refresha and report a bug * fix: new type for webContents send payload that does not brick TS * fix: removing import file from url since it is not working in the command palette for manual user input * fix: removing old comment * chore: adding user default units * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: trying to create a new file but I don't think this the correct workflow... * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: disabling create a file and folder until we get it properly implemented at the commad bar level * fix: hooking up more commands * fix: auto fixes * chore: adding standard views * chore: adding some E2E tests. * chore: added E2E tests for each file menu * fix: auto fixes * chore: adding more edit role E2E tests * chore: e2e test * chore: adding help role e2e test * A snapshot a day keeps the bugs away! 📷🐛 * chore: e2e test for all the menu options you can interact with in the frontend * chore: hooking up more menu actions * chore: adding pane actions * fix: mac only menu fix and added start sketch * chore: big edit for state management and command registration * fix: auto fixes, tsc * fix: codespell typo * chore: implementing E2E tests for the menus since we cleared them. * chore: file export current part e2e test * chore: added all file role tests in modeling page * chore: modeling page edit e2e tests * chore: implemented view e2e test for modeling page * chore: add all design e2e playright tests * fix: auto linter,fmt * chore: added modeling help role e2e tests * fix: ugh this function isn't available in electron evalulate * fix: new default project name --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
2025-04-04 08:39:02 -05:00
import { throwTronAppMissing } from '@e2e/playwright/lib/electron-helpers'
import {
clickElectronNativeMenuById,
findElectronNativeMenuById,
openSettingsExpectLocator,
openSettingsExpectText,
} from '@e2e/playwright/test-utils'
Sort imports (#6101) * add package.json Signed-off-by: Jess Frazelle <github@jessfraz.com> initial run; Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> more fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> clientsidescne Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> paths Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix styles Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> combine Signed-off-by: Jess Frazelle <github@jessfraz.com> eslint rule Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> my ocd Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> constants file Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> no more import sceneInfra Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> try fix circular import Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
2025-04-01 23:54:26 -07:00
import { expect, test } from '@e2e/playwright/zoo-test'
Feature: Traditional menu actions in desktop application (#5892) * chore: skeleton for building and creating menus. Need electron to renderer interface to dynamically set the menu * chore: skeleton typing for communication between nodes and web side * chore: more skeleton for the different roles within the menu options, need more type safety * chore: adding more skeleton and templates of what the menus could be * chore: implemented first pass for helpRole links * fix: syntax issue stopped the build step * feature: loading different menus based on your page * feature: Home page file role implemented * chore: handling the build workflow for the signin page * fix: moving edit actionst to the edit menu * chore: adding preferences to the file role * chore: redoing help roles based on the question mark widget * fix: auto fmt * chore: examples of accelerator strings for Menu.MenuItems keyboard shortcuts! * chore: oddly specific toggle API for disabling MenuItems from JS. No rules! * fix: do not implement a custom label disable thingy, use id on menu and use the native APIga * fix: auto fmt * fix: adding some typechecks and auto fmt fixes * fix: trying to fix custom type? * fix: nvm we back, the lsp on my editor borked for a second * fix: adding one more level to the custom type for the labels * chore: cleaning up type definitions to read easier * fix: resolving yarn lint errors * chore: adding file sign out * chore: adding more file bar actions * chore: ready for PR draft * fix: preemptive GC collectoin bug fix if somehow a user interacts with a menu while it is being GCed * fix: linking the OG source * fix: set application menu to null to avoid default electron menu * chore: trying to add more typescript * chore: BIG workflow changes... better typing, less IPC junk * fix: remapping the icp functions to the cb option select... * chore: all og events are rehooked up with new workflow pattern * feat: adding more options to the native bar! * fix: todo * chore: cleaning up some menus and adding more * fix: desktop vs browser and lint errors * fix: typescript did not like sample electorn JS code for the basic templates with isMac conditionals... * fix: PR clean up * fix: more PR cleanup * A snapshot a day keeps the bugs away! 📷🐛 * fix: added the new help menu to the default sign in and modeling page * fix: disabled two menu actions within sign in page since they will not do anything. * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: mergining main, auto fixes * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: fixed ipc renderer off/remove listener bug * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: report a bug to refresha and report a bug * fix: new type for webContents send payload that does not brick TS * fix: removing import file from url since it is not working in the command palette for manual user input * fix: removing old comment * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * chore: adding some E2E tests. * chore: added E2E tests for each file menu * fix: auto fixes * chore: adding more edit role E2E tests * chore: e2e test * chore: adding help role e2e test * A snapshot a day keeps the bugs away! 📷🐛 * chore: e2e test for all the menu options you can interact with in the frontend --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-26 13:03:44 -05:00
/**
* Not all menu actions are tested. Some are default electron menu actions.
* Test file menu actions that trigger something in the frontend
*/
test.describe(
'Native file menu',
{ tag: ['@desktop', '@macos', '@windows'] },
() => {
test('Home page', async ({ tronApp, cmdBar, page, homePage }) => {
if (!tronApp) fail()
await test.step('Home.File.Create project', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(tronApp, 'File.Create project')
await cmdBar.toBeOpened()
await cmdBar.expectArgValue('untitled')
})
await test.step('Home.File.Open project', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(tronApp, 'File.Open project')
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Open project')
})
await test.step('Home.File.Preferences.User settings', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(
tronApp,
'File.Preferences.User settings'
)
await openSettingsExpectText(page, 'The overall appearance of the app')
})
await test.step('Home.File.Preferences.Keybindings', async () => {
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(
tronApp,
'File.Preferences.Keybindings'
)
await openSettingsExpectLocator(page, '#enter-sketch-mode')
})
await test.step('Home.File.Preferences.User default units', async () => {
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(
tronApp,
'File.Preferences.User default units'
)
await openSettingsExpectLocator(page, '#defaultUnit')
})
await test.step('Home.File.Preferences.Theme', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(tronApp, 'File.Preferences.Theme')
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Settings · app · theme')
})
await test.step('Home.File.Preferences.Theme color', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(
tronApp,
'File.Preferences.Theme color'
)
await openSettingsExpectLocator(page, '#themeColor')
})
await test.step('Home.Edit.Rename project', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(tronApp, 'Edit.Rename project')
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Rename project')
})
await test.step('Home.Edit.Delete project', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(tronApp, 'Edit.Delete project')
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Delete project')
})
await test.step('Home.Edit.Change project directory', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(
tronApp,
'Edit.Change project directory'
)
await openSettingsExpectLocator(page, '#projectDirectory')
Feature: Traditional menu actions in desktop application (#5892) * chore: skeleton for building and creating menus. Need electron to renderer interface to dynamically set the menu * chore: skeleton typing for communication between nodes and web side * chore: more skeleton for the different roles within the menu options, need more type safety * chore: adding more skeleton and templates of what the menus could be * chore: implemented first pass for helpRole links * fix: syntax issue stopped the build step * feature: loading different menus based on your page * feature: Home page file role implemented * chore: handling the build workflow for the signin page * fix: moving edit actionst to the edit menu * chore: adding preferences to the file role * chore: redoing help roles based on the question mark widget * fix: auto fmt * chore: examples of accelerator strings for Menu.MenuItems keyboard shortcuts! * chore: oddly specific toggle API for disabling MenuItems from JS. No rules! * fix: do not implement a custom label disable thingy, use id on menu and use the native APIga * fix: auto fmt * fix: adding some typechecks and auto fmt fixes * fix: trying to fix custom type? * fix: nvm we back, the lsp on my editor borked for a second * fix: adding one more level to the custom type for the labels * chore: cleaning up type definitions to read easier * fix: resolving yarn lint errors * chore: adding file sign out * chore: adding more file bar actions * chore: ready for PR draft * fix: preemptive GC collectoin bug fix if somehow a user interacts with a menu while it is being GCed * fix: linking the OG source * fix: set application menu to null to avoid default electron menu * chore: trying to add more typescript * chore: BIG workflow changes... better typing, less IPC junk * fix: remapping the icp functions to the cb option select... * chore: all og events are rehooked up with new workflow pattern * feat: adding more options to the native bar! * fix: todo * chore: cleaning up some menus and adding more * fix: desktop vs browser and lint errors * fix: typescript did not like sample electorn JS code for the basic templates with isMac conditionals... * fix: PR clean up * fix: more PR cleanup * A snapshot a day keeps the bugs away! 📷🐛 * fix: added the new help menu to the default sign in and modeling page * fix: disabled two menu actions within sign in page since they will not do anything. * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: mergining main, auto fixes * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: fixed ipc renderer off/remove listener bug * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: report a bug to refresha and report a bug * fix: new type for webContents send payload that does not brick TS * fix: removing import file from url since it is not working in the command palette for manual user input * fix: removing old comment * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * chore: adding some E2E tests. * chore: added E2E tests for each file menu * fix: auto fixes * chore: adding more edit role E2E tests * chore: e2e test * chore: adding help role e2e test * A snapshot a day keeps the bugs away! 📷🐛 * chore: e2e test for all the menu options you can interact with in the frontend --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-26 13:03:44 -05:00
})
Feature: Traditional menu actions in desktop application part II (#6030) * chore: skeleton for building and creating menus. Need electron to renderer interface to dynamically set the menu * chore: skeleton typing for communication between nodes and web side * chore: more skeleton for the different roles within the menu options, need more type safety * chore: adding more skeleton and templates of what the menus could be * chore: implemented first pass for helpRole links * fix: syntax issue stopped the build step * feature: loading different menus based on your page * feature: Home page file role implemented * chore: handling the build workflow for the signin page * fix: moving edit actionst to the edit menu * chore: adding preferences to the file role * chore: redoing help roles based on the question mark widget * fix: auto fmt * chore: examples of accelerator strings for Menu.MenuItems keyboard shortcuts! * chore: oddly specific toggle API for disabling MenuItems from JS. No rules! * fix: do not implement a custom label disable thingy, use id on menu and use the native APIga * fix: auto fmt * fix: adding some typechecks and auto fmt fixes * fix: trying to fix custom type? * fix: nvm we back, the lsp on my editor borked for a second * fix: adding one more level to the custom type for the labels * chore: cleaning up type definitions to read easier * fix: resolving yarn lint errors * chore: adding file sign out * chore: adding more file bar actions * chore: ready for PR draft * fix: preemptive GC collectoin bug fix if somehow a user interacts with a menu while it is being GCed * fix: linking the OG source * fix: set application menu to null to avoid default electron menu * chore: trying to add more typescript * chore: BIG workflow changes... better typing, less IPC junk * fix: remapping the icp functions to the cb option select... * chore: all og events are rehooked up with new workflow pattern * feat: adding more options to the native bar! * fix: todo * chore: cleaning up some menus and adding more * fix: desktop vs browser and lint errors * fix: typescript did not like sample electorn JS code for the basic templates with isMac conditionals... * fix: PR clean up * fix: more PR cleanup * A snapshot a day keeps the bugs away! 📷🐛 * fix: added the new help menu to the default sign in and modeling page * fix: disabled two menu actions within sign in page since they will not do anything. * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: mergining main, auto fixes * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: saving off progress found an IPC on/off bug thanks electron! * fix: fixed ipc renderer off/remove listener bug * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * chore: skeleton layout for the file menu in the modeling page. * fix: adding types * A snapshot a day keeps the bugs away! 📷🐛 * fix: more skeleton * feat: adding file preferences project settings * feat: adding share current part link to file menu * fix: report a bug to refresha and report a bug * fix: new type for webContents send payload that does not brick TS * fix: removing import file from url since it is not working in the command palette for manual user input * fix: removing old comment * chore: adding user default units * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: trying to create a new file but I don't think this the correct workflow... * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: disabling create a file and folder until we get it properly implemented at the commad bar level * fix: hooking up more commands * fix: auto fixes * chore: adding standard views * chore: adding some E2E tests. * chore: added E2E tests for each file menu * fix: auto fixes * chore: adding more edit role E2E tests * chore: e2e test * chore: adding help role e2e test * A snapshot a day keeps the bugs away! 📷🐛 * chore: e2e test for all the menu options you can interact with in the frontend * chore: hooking up more menu actions * chore: adding pane actions * fix: mac only menu fix and added start sketch * chore: big edit for state management and command registration * fix: auto fixes, tsc * fix: codespell typo * chore: implementing E2E tests for the menus since we cleared them. * chore: file export current part e2e test * chore: added all file role tests in modeling page * chore: modeling page edit e2e tests * chore: implemented view e2e test for modeling page * chore: add all design e2e playright tests * fix: auto linter,fmt * chore: added modeling help role e2e tests * fix: ugh this function isn't available in electron evalulate * fix: new default project name --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
2025-04-04 08:39:02 -05:00
await test.step('Home.View.Command Palette...', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(tronApp, 'View.Command Palette...')
// Check the placeholder project name exists
const actual = cmdBar.cmdBarElement.getByTestId('cmd-bar-search')
await expect(actual).toBeVisible()
})
await test.step('Home.Help.Show all commands', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(tronApp, 'Help.Show all commands')
// Check the placeholder project name exists
const actual = cmdBar.cmdBarElement.getByTestId('cmd-bar-search')
await expect(actual).toBeVisible()
})
await test.step('Home.Help.KCL code samples', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(tronApp, 'Help.KCL code samples')
})
await test.step('Home.Help.Report a bug', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(tronApp, 'Help.Report a bug')
// Core dump and refresh magic number timeout
await page.waitForTimeout(7000)
await homePage.projectsLoaded()
})
await test.step('Home.Help.Replay onboarding tutorial', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await findElectronNativeMenuById(
tronApp,
'Help.Replay onboarding tutorial'
)
})
await test.step('Home.File.Preferences.Sign out', async () => {
await page.reload()
await homePage.projectsLoaded()
await homePage.isNativeFileMenuCreated()
await clickElectronNativeMenuById(tronApp, 'File.Sign out')
// FIXME: When signing out during E2E the page is not bound correctly.
// It cannot find the button
// const signIn = page.getByTestId('sign-in-button')
// await expect(signIn).toBeVisible()
Feature: Traditional menu actions in desktop application part II (#6030) * chore: skeleton for building and creating menus. Need electron to renderer interface to dynamically set the menu * chore: skeleton typing for communication between nodes and web side * chore: more skeleton for the different roles within the menu options, need more type safety * chore: adding more skeleton and templates of what the menus could be * chore: implemented first pass for helpRole links * fix: syntax issue stopped the build step * feature: loading different menus based on your page * feature: Home page file role implemented * chore: handling the build workflow for the signin page * fix: moving edit actionst to the edit menu * chore: adding preferences to the file role * chore: redoing help roles based on the question mark widget * fix: auto fmt * chore: examples of accelerator strings for Menu.MenuItems keyboard shortcuts! * chore: oddly specific toggle API for disabling MenuItems from JS. No rules! * fix: do not implement a custom label disable thingy, use id on menu and use the native APIga * fix: auto fmt * fix: adding some typechecks and auto fmt fixes * fix: trying to fix custom type? * fix: nvm we back, the lsp on my editor borked for a second * fix: adding one more level to the custom type for the labels * chore: cleaning up type definitions to read easier * fix: resolving yarn lint errors * chore: adding file sign out * chore: adding more file bar actions * chore: ready for PR draft * fix: preemptive GC collectoin bug fix if somehow a user interacts with a menu while it is being GCed * fix: linking the OG source * fix: set application menu to null to avoid default electron menu * chore: trying to add more typescript * chore: BIG workflow changes... better typing, less IPC junk * fix: remapping the icp functions to the cb option select... * chore: all og events are rehooked up with new workflow pattern * feat: adding more options to the native bar! * fix: todo * chore: cleaning up some menus and adding more * fix: desktop vs browser and lint errors * fix: typescript did not like sample electorn JS code for the basic templates with isMac conditionals... * fix: PR clean up * fix: more PR cleanup * A snapshot a day keeps the bugs away! 📷🐛 * fix: added the new help menu to the default sign in and modeling page * fix: disabled two menu actions within sign in page since they will not do anything. * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: mergining main, auto fixes * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: saving off progress found an IPC on/off bug thanks electron! * fix: fixed ipc renderer off/remove listener bug * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * chore: skeleton layout for the file menu in the modeling page. * fix: adding types * A snapshot a day keeps the bugs away! 📷🐛 * fix: more skeleton * feat: adding file preferences project settings * feat: adding share current part link to file menu * fix: report a bug to refresha and report a bug * fix: new type for webContents send payload that does not brick TS * fix: removing import file from url since it is not working in the command palette for manual user input * fix: removing old comment * chore: adding user default units * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: trying to create a new file but I don't think this the correct workflow... * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: disabling create a file and folder until we get it properly implemented at the commad bar level * fix: hooking up more commands * fix: auto fixes * chore: adding standard views * chore: adding some E2E tests. * chore: added E2E tests for each file menu * fix: auto fixes * chore: adding more edit role E2E tests * chore: e2e test * chore: adding help role e2e test * A snapshot a day keeps the bugs away! 📷🐛 * chore: e2e test for all the menu options you can interact with in the frontend * chore: hooking up more menu actions * chore: adding pane actions * fix: mac only menu fix and added start sketch * chore: big edit for state management and command registration * fix: auto fixes, tsc * fix: codespell typo * chore: implementing E2E tests for the menus since we cleared them. * chore: file export current part e2e test * chore: added all file role tests in modeling page * chore: modeling page edit e2e tests * chore: implemented view e2e test for modeling page * chore: add all design e2e playright tests * fix: auto linter,fmt * chore: added modeling help role e2e tests * fix: ugh this function isn't available in electron evalulate * fix: new default project name --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
2025-04-04 08:39:02 -05:00
})
})
test('Modeling page', async ({
tronApp,
cmdBar,
page,
homePage,
scene,
}) => {
if (!tronApp) {
throwTronAppMissing()
return
}
await homePage.goToModelingScene()
await scene.settled(cmdBar)
await scene.connectionEstablished()
await scene.isNativeFileMenuCreated()
await test.step('Modeling.File.Create project', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'File.Create project')
await cmdBar.expectCommandName('Create project')
})
await test.step('Modeling.File.Open project', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'File.Open project')
await cmdBar.expectCommandName('Open project')
})
await test.step('Modeling.File.Add file to project', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'File.Add file to project')
await cmdBar.expectCommandName('Add file to project')
})
await test.step('Modeling.File.Export current part', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'File.Export current part')
await cmdBar.expectCommandName('Export')
})
await test.step('Modeling.File.Preferences.Project settings', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'File.Preferences.Project settings'
)
await openSettingsExpectText(
page,
'The hue of the primary theme color for the app'
)
})
await test.step('Modeling.File.Preferences.User settings', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'File.Preferences.User settings'
)
await openSettingsExpectText(page, 'The overall appearance of the app')
})
await test.step('Modeling.File.Preferences.Keybindings', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'File.Preferences.Keybindings'
)
await openSettingsExpectLocator(page, '#enter-sketch-mode')
})
await test.step('Modeling.File.Preferences.User default units', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'File.Preferences.User default units'
)
await openSettingsExpectLocator(page, '#defaultUnit')
})
await test.step('Modeling.File.Preferences.Theme', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'File.Preferences.Theme')
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Settings · app · theme')
})
await test.step('Modeling.File.Preferences.Theme color', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'File.Preferences.Theme color'
)
await openSettingsExpectLocator(page, '#themeColor')
})
await test.step('Modeling.Edit.Modify with Zoo Text-To-CAD', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'Edit.Modify with Zoo Text-To-CAD'
)
await cmdBar.expectCommandName('Text-to-CAD Edit')
})
await test.step('Modeling.Edit.Edit parameter', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'Edit.Edit parameter')
await cmdBar.expectCommandName('Edit parameter')
})
await test.step('Modeling.Edit.Format code', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'Edit.Format code')
})
await test.step('Modeling.Edit.Rename project', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'Edit.Rename project')
await cmdBar.expectCommandName('Rename project')
})
await test.step('Modeling.Edit.Delete project', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'Edit.Delete project')
await cmdBar.expectCommandName('Delete project')
})
await test.step('Modeling.Edit.Change project directory', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'Edit.Change project directory'
)
await openSettingsExpectLocator(page, '#projectDirectory')
})
await test.step('Modeling.View.Orthographic view', async () => {
await page.waitForTimeout(250)
// wait for previous toast to disappear
await page.waitForTimeout(10000)
await clickElectronNativeMenuById(tronApp, 'View.Orthographic view')
const textToCheck =
'Set camera projection to "orthographic" as a user default'
const toast = page.locator('#_rht_toaster')
// Let the previous toast clear
await expect(toast).toHaveText(textToCheck)
})
await test.step('Modeling.View.Perspective view', async () => {
await page.waitForTimeout(250)
// wait for previous toast to disappear
await page.waitForTimeout(10000)
await clickElectronNativeMenuById(tronApp, 'View.Perspective view')
const textToCheck =
'Set camera projection to "perspective" as a user default'
const toast = page.locator('#_rht_toaster')
await expect(toast).toHaveText(textToCheck)
})
await test.step('Modeling.View.Standard views.Right view', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'View.Standard views.Right view'
)
})
await test.step('Modeling.View.Standard views.Back view', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'View.Standard views.Back view'
)
})
await test.step('Modeling.View.Standard views.Top view', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'View.Standard views.Top view'
)
})
await test.step('Modeling.View.Standard views.Left view', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'View.Standard views.Left view'
)
})
await test.step('Modeling.View.Standard views.Front view', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'View.Standard views.Front view'
)
})
await test.step('Modeling.View.Standard views.Bottom view', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'View.Standard views.Bottom view'
)
})
await test.step('Modeling.View.Standard views.Reset view', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'View.Standard views.Reset view'
)
})
await test.step('Modeling.View.Standard views.Center view on selection', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'View.Standard views.Center view on selection'
)
})
await test.step('Modeling.View.Standard views.Refresh', async () => {
await page.waitForTimeout(250)
await findElectronNativeMenuById(tronApp, 'View.Standard views.Refresh')
})
await test.step('Modeling.View.Named views.Create named view', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'View.Named views.Create named view'
)
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Create named view')
})
await test.step('Modeling.View.Named views.Load named view', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'View.Named views.Load named view'
)
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Load named view')
})
await test.step('Modeling.View.Named views.Delete named view', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'View.Named views.Delete named view'
)
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Delete named view')
})
await test.step('Modeling.View.Panes.Feature tree', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'View.Panes.Feature tree')
const button = page.getByTestId('feature-tree-pane-button')
const isPressed = await button.getAttribute('aria-pressed')
expect(isPressed).toBe('true')
})
await test.step('Modeling.View.Panes.KCL code', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'View.Panes.KCL code')
const button = page.getByTestId('code-pane-button')
const isPressed = await button.getAttribute('aria-pressed')
expect(isPressed).toBe('true')
})
await test.step('Modeling.View.Panes.Project files', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'View.Panes.Project files')
const button = page.getByTestId('files-pane-button')
const isPressed = await button.getAttribute('aria-pressed')
expect(isPressed).toBe('true')
})
await test.step('Modeling.View.Panes.Variables', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'View.Panes.Variables')
const button = page.getByTestId('variables-pane-button')
const isPressed = await button.getAttribute('aria-pressed')
expect(isPressed).toBe('true')
})
await test.step('Modeling.View.Panes.Logs', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'View.Panes.Logs')
const button = page.getByTestId('logs-pane-button')
const isPressed = await button.getAttribute('aria-pressed')
expect(isPressed).toBe('true')
})
await test.step('Modeling.Design.Create an offset plane', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'Design.Create an offset plane'
)
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Offset plane')
})
await test.step('Modeling.Design.Create a helix', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'Design.Create a helix')
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Helix')
})
await test.step('Modeling.Design.Create a parameter', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'Design.Create a parameter')
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Create parameter')
})
Feature: Traditional menu actions in desktop application part II (#6030) * chore: skeleton for building and creating menus. Need electron to renderer interface to dynamically set the menu * chore: skeleton typing for communication between nodes and web side * chore: more skeleton for the different roles within the menu options, need more type safety * chore: adding more skeleton and templates of what the menus could be * chore: implemented first pass for helpRole links * fix: syntax issue stopped the build step * feature: loading different menus based on your page * feature: Home page file role implemented * chore: handling the build workflow for the signin page * fix: moving edit actionst to the edit menu * chore: adding preferences to the file role * chore: redoing help roles based on the question mark widget * fix: auto fmt * chore: examples of accelerator strings for Menu.MenuItems keyboard shortcuts! * chore: oddly specific toggle API for disabling MenuItems from JS. No rules! * fix: do not implement a custom label disable thingy, use id on menu and use the native APIga * fix: auto fmt * fix: adding some typechecks and auto fmt fixes * fix: trying to fix custom type? * fix: nvm we back, the lsp on my editor borked for a second * fix: adding one more level to the custom type for the labels * chore: cleaning up type definitions to read easier * fix: resolving yarn lint errors * chore: adding file sign out * chore: adding more file bar actions * chore: ready for PR draft * fix: preemptive GC collectoin bug fix if somehow a user interacts with a menu while it is being GCed * fix: linking the OG source * fix: set application menu to null to avoid default electron menu * chore: trying to add more typescript * chore: BIG workflow changes... better typing, less IPC junk * fix: remapping the icp functions to the cb option select... * chore: all og events are rehooked up with new workflow pattern * feat: adding more options to the native bar! * fix: todo * chore: cleaning up some menus and adding more * fix: desktop vs browser and lint errors * fix: typescript did not like sample electorn JS code for the basic templates with isMac conditionals... * fix: PR clean up * fix: more PR cleanup * A snapshot a day keeps the bugs away! 📷🐛 * fix: added the new help menu to the default sign in and modeling page * fix: disabled two menu actions within sign in page since they will not do anything. * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: mergining main, auto fixes * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: saving off progress found an IPC on/off bug thanks electron! * fix: fixed ipc renderer off/remove listener bug * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * chore: skeleton layout for the file menu in the modeling page. * fix: adding types * A snapshot a day keeps the bugs away! 📷🐛 * fix: more skeleton * feat: adding file preferences project settings * feat: adding share current part link to file menu * fix: report a bug to refresha and report a bug * fix: new type for webContents send payload that does not brick TS * fix: removing import file from url since it is not working in the command palette for manual user input * fix: removing old comment * chore: adding user default units * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: trying to create a new file but I don't think this the correct workflow... * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: disabling create a file and folder until we get it properly implemented at the commad bar level * fix: hooking up more commands * fix: auto fixes * chore: adding standard views * chore: adding some E2E tests. * chore: added E2E tests for each file menu * fix: auto fixes * chore: adding more edit role E2E tests * chore: e2e test * chore: adding help role e2e test * A snapshot a day keeps the bugs away! 📷🐛 * chore: e2e test for all the menu options you can interact with in the frontend * chore: hooking up more menu actions * chore: adding pane actions * fix: mac only menu fix and added start sketch * chore: big edit for state management and command registration * fix: auto fixes, tsc * fix: codespell typo * chore: implementing E2E tests for the menus since we cleared them. * chore: file export current part e2e test * chore: added all file role tests in modeling page * chore: modeling page edit e2e tests * chore: implemented view e2e test for modeling page * chore: add all design e2e playright tests * fix: auto linter,fmt * chore: added modeling help role e2e tests * fix: ugh this function isn't available in electron evalulate * fix: new default project name --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
2025-04-04 08:39:02 -05:00
await test.step('Modeling.Design.Create an additive feature.Extrude', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'Design.Create an additive feature.Extrude'
)
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Extrude')
})
await test.step('Modeling.Design.Create an additive feature.Revolve', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'Design.Create an additive feature.Revolve'
)
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Revolve')
})
await test.step('Modeling.Design.Create an additive feature.Sweep', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'Design.Create an additive feature.Sweep'
)
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Sweep')
})
await test.step('Modeling.Design.Create an additive feature.Loft', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'Design.Create an additive feature.Loft'
)
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Loft')
})
await test.step('Modeling.Design.Apply modification feature.Fillet', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'Design.Apply modification feature.Fillet'
)
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Fillet')
})
await test.step('Modeling.Design.Apply modification feature.Chamfer', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'Design.Apply modification feature.Chamfer'
)
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Chamfer')
})
Assemblies: Load outside files into project via point-and-click (#6217) * WIP: Add point-and-click Import for geometry Will eventually fix #6120 Right now the whole loop is there but the codemod doesn't work yet * Better pathToNOde, log on non-working cm dispatch call * Add workaround to updateModelingState not working * Back to updateModelingState with a skip flag * Better todo * Change working from Import to Insert, cleanups * Sister command in kclCommands to populate file options * Improve path selector * Unsure: move importAstMod to kclCommands onSubmit :no_mouth: * Add e2e test * Clean up for review * Add native file menu entry and test * No await yo lint said so * WIP: UX improvements around foreign file imports Fixes #6152 * @lrev-Dev's suggestion to remove a comment Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> * Update to scene.settled(cmdBar) * Add partNNN default name for alias * Lint * Lint * Fix unit tests * Add sad path insert test Thanks @Irev-Dev for the suggestion * Add step insert test * Lint * Add test for second foreign import thru file tree click * WIP: Add point-and-click Load to copy files from outside the project into the project Towards #6210 * Move Insert button to modeling toolbar, update menus and toolbars * Add default value for local name alias * Aligning tests * Fix tests * Add padding for filenames starting with a digit * Lint * Lint * Update snapshots * Merge branch 'main' into pierremtb/issue6210-Add-point-and-click-Load-to-copy-files-from-outside-the-project-into-the-project * Add disabled transform subbutton * Merge kcl-samples and local disk load into one 'Load external model' command * Fix em tests * Fix test * Add test for file pick import, better input * Fix non .kcl loading * Lint * Update snapshots * Fix issue leading to test failure * Fix clone test * Add note * Fix nested clone issue * Clean up for review * Add valueSummary for path * Fix test after path change * Clean up for review * Update src/lib/kclCommands.ts Thanks @franknoirot! Co-authored-by: Frank Noirot <frank@zoo.dev> * Improve path input arg * Fix tests * Merge branch 'main' into pierremtb/issue6210-Add-point-and-click-Load-to-copy-files-from-outside-the-project-into-the-project * Fix path header not showing and improve tests * Clean up --------- Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch> Co-authored-by: Frank Noirot <frank@zoo.dev>
2025-04-14 14:53:01 -04:00
await test.step('Modeling.Design.Apply modification feature.Shell', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'Design.Apply modification feature.Shell'
)
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Shell')
})
Feature: Traditional menu actions in desktop application part II (#6030) * chore: skeleton for building and creating menus. Need electron to renderer interface to dynamically set the menu * chore: skeleton typing for communication between nodes and web side * chore: more skeleton for the different roles within the menu options, need more type safety * chore: adding more skeleton and templates of what the menus could be * chore: implemented first pass for helpRole links * fix: syntax issue stopped the build step * feature: loading different menus based on your page * feature: Home page file role implemented * chore: handling the build workflow for the signin page * fix: moving edit actionst to the edit menu * chore: adding preferences to the file role * chore: redoing help roles based on the question mark widget * fix: auto fmt * chore: examples of accelerator strings for Menu.MenuItems keyboard shortcuts! * chore: oddly specific toggle API for disabling MenuItems from JS. No rules! * fix: do not implement a custom label disable thingy, use id on menu and use the native APIga * fix: auto fmt * fix: adding some typechecks and auto fmt fixes * fix: trying to fix custom type? * fix: nvm we back, the lsp on my editor borked for a second * fix: adding one more level to the custom type for the labels * chore: cleaning up type definitions to read easier * fix: resolving yarn lint errors * chore: adding file sign out * chore: adding more file bar actions * chore: ready for PR draft * fix: preemptive GC collectoin bug fix if somehow a user interacts with a menu while it is being GCed * fix: linking the OG source * fix: set application menu to null to avoid default electron menu * chore: trying to add more typescript * chore: BIG workflow changes... better typing, less IPC junk * fix: remapping the icp functions to the cb option select... * chore: all og events are rehooked up with new workflow pattern * feat: adding more options to the native bar! * fix: todo * chore: cleaning up some menus and adding more * fix: desktop vs browser and lint errors * fix: typescript did not like sample electorn JS code for the basic templates with isMac conditionals... * fix: PR clean up * fix: more PR cleanup * A snapshot a day keeps the bugs away! 📷🐛 * fix: added the new help menu to the default sign in and modeling page * fix: disabled two menu actions within sign in page since they will not do anything. * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: mergining main, auto fixes * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: saving off progress found an IPC on/off bug thanks electron! * fix: fixed ipc renderer off/remove listener bug * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * chore: skeleton layout for the file menu in the modeling page. * fix: adding types * A snapshot a day keeps the bugs away! 📷🐛 * fix: more skeleton * feat: adding file preferences project settings * feat: adding share current part link to file menu * fix: report a bug to refresha and report a bug * fix: new type for webContents send payload that does not brick TS * fix: removing import file from url since it is not working in the command palette for manual user input * fix: removing old comment * chore: adding user default units * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: trying to create a new file but I don't think this the correct workflow... * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: disabling create a file and folder until we get it properly implemented at the commad bar level * fix: hooking up more commands * fix: auto fixes * chore: adding standard views * chore: adding some E2E tests. * chore: added E2E tests for each file menu * fix: auto fixes * chore: adding more edit role E2E tests * chore: e2e test * chore: adding help role e2e test * A snapshot a day keeps the bugs away! 📷🐛 * chore: e2e test for all the menu options you can interact with in the frontend * chore: hooking up more menu actions * chore: adding pane actions * fix: mac only menu fix and added start sketch * chore: big edit for state management and command registration * fix: auto fixes, tsc * fix: codespell typo * chore: implementing E2E tests for the menus since we cleared them. * chore: file export current part e2e test * chore: added all file role tests in modeling page * chore: modeling page edit e2e tests * chore: implemented view e2e test for modeling page * chore: add all design e2e playright tests * fix: auto linter,fmt * chore: added modeling help role e2e tests * fix: ugh this function isn't available in electron evalulate * fix: new default project name --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
2025-04-04 08:39:02 -05:00
await test.step('Modeling.Design.Create with Zoo Text-To-CAD', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'Design.Create with Zoo Text-To-CAD'
)
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Text-to-CAD Create')
})
await test.step('Modeling.Design.Modify with Zoo Text-To-CAD', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(
tronApp,
'Design.Modify with Zoo Text-To-CAD'
)
await cmdBar.toBeOpened()
await cmdBar.expectCommandName('Text-to-CAD Edit')
})
await test.step('Modeling.Help.KCL code samples', async () => {
await page.waitForTimeout(250)
await findElectronNativeMenuById(tronApp, 'Help.KCL code samples')
})
await test.step('Modeling.Help.Report a bug', async () => {
await page.waitForTimeout(250)
await findElectronNativeMenuById(tronApp, 'Help.Report a bug')
})
await test.step('Modeling.Help.Replay onboarding tutorial', async () => {
await page.waitForTimeout(250)
await findElectronNativeMenuById(
tronApp,
'Help.Replay onboarding tutorial'
)
})
await test.step('Modeling.File.Preferences.Sign out', async () => {
await page.waitForTimeout(250)
await clickElectronNativeMenuById(tronApp, 'File.Sign out')
// FIXME: When signing out during E2E the page is not bound correctly.
// It cannot find the button
// const signIn = page.getByTestId('sign-in-button')
// await expect(signIn).toBeVisible()
Feature: Traditional menu actions in desktop application (#5892) * chore: skeleton for building and creating menus. Need electron to renderer interface to dynamically set the menu * chore: skeleton typing for communication between nodes and web side * chore: more skeleton for the different roles within the menu options, need more type safety * chore: adding more skeleton and templates of what the menus could be * chore: implemented first pass for helpRole links * fix: syntax issue stopped the build step * feature: loading different menus based on your page * feature: Home page file role implemented * chore: handling the build workflow for the signin page * fix: moving edit actionst to the edit menu * chore: adding preferences to the file role * chore: redoing help roles based on the question mark widget * fix: auto fmt * chore: examples of accelerator strings for Menu.MenuItems keyboard shortcuts! * chore: oddly specific toggle API for disabling MenuItems from JS. No rules! * fix: do not implement a custom label disable thingy, use id on menu and use the native APIga * fix: auto fmt * fix: adding some typechecks and auto fmt fixes * fix: trying to fix custom type? * fix: nvm we back, the lsp on my editor borked for a second * fix: adding one more level to the custom type for the labels * chore: cleaning up type definitions to read easier * fix: resolving yarn lint errors * chore: adding file sign out * chore: adding more file bar actions * chore: ready for PR draft * fix: preemptive GC collectoin bug fix if somehow a user interacts with a menu while it is being GCed * fix: linking the OG source * fix: set application menu to null to avoid default electron menu * chore: trying to add more typescript * chore: BIG workflow changes... better typing, less IPC junk * fix: remapping the icp functions to the cb option select... * chore: all og events are rehooked up with new workflow pattern * feat: adding more options to the native bar! * fix: todo * chore: cleaning up some menus and adding more * fix: desktop vs browser and lint errors * fix: typescript did not like sample electorn JS code for the basic templates with isMac conditionals... * fix: PR clean up * fix: more PR cleanup * A snapshot a day keeps the bugs away! 📷🐛 * fix: added the new help menu to the default sign in and modeling page * fix: disabled two menu actions within sign in page since they will not do anything. * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: mergining main, auto fixes * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: fixed ipc renderer off/remove listener bug * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * fix: report a bug to refresha and report a bug * fix: new type for webContents send payload that does not brick TS * fix: removing import file from url since it is not working in the command palette for manual user input * fix: removing old comment * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * chore: adding some E2E tests. * chore: added E2E tests for each file menu * fix: auto fixes * chore: adding more edit role E2E tests * chore: e2e test * chore: adding help role e2e test * A snapshot a day keeps the bugs away! 📷🐛 * chore: e2e test for all the menu options you can interact with in the frontend --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-26 13:03:44 -05:00
})
})
}
)