Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

Things we want to learn about #2

@rpherbig

Description

@rpherbig

building

  • javascript
  • typescript?
  • linting

deploying

automated testing

  • unit - jest
  • unit - react-test-renderer
  • unit - @testing-library/react - this library only lets you examine the DOM and we wanted the ability to test React components themselves
  • unit - enzyme - There is no adapter to allow Enzyme to work with the latest version of React (17.x). The PR has been stalled for over a year. There is an unofficial adapter which we decided not to use.
  • integration - Cypress - Cypress has stopped supporting Electron
  • integration - Spectron - Spectron has been deprecated
  • integration - Selenium via WebdriverJS
    • Note: requires rebuilding the app before running tests if changes were made to it or it has never been built
    • requires a compiled Electron app and running Webdriver server to run locally
    • headless locally
      • headless windows - via cross-env
      • headless linux - via xvfb
      • headless osx - via xvfb & homebrew
    • headless on the CI/CD server requires using xvfb, maybe we can use a special GitHub Action
  • integration - Playwright integrated with Electron plus Playwright Test (see also "Playwright vs Webdriver")
    • Note: requires browsers to support the DevTools protocol. Not a problem for Electron, but could be if the UI is hosted as a web site and required to support older browsers (e.g. Internet Explorer).
    • Note: requires rebuilding the app before running tests if changes were made to it or it has never been built
    • Note: for an Electron app, Playwright can be installed faster with PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm i -D playwright
    • headless locally
      • headless windows - via cross-env
      • headless linux - via xvfb
      • headless osx - via xvfb & homebrew
    • headless on the CI/CD server
  • system level/UI: there aren't any external dependencies to justify this level of testing.

cross-platform?

  • if/when deploying to different platforms, how much is custom?
  • background services
  • native components
  • System tray icon (Windows) and the equivalent for Mac and Linux
    • Windows
    • Linux
    • OSx
    • Need to capture the system tray object as a variable to avoid garbage collection and the tray going away
  • Mac-specific conventions

what does interacting with local resources look like?

  • USB/HID
  • Bluetooth
  • files/disk
  • database
  • what about elevated access?
  • use of IPC

logging

  • splunk

ui framework

  • use React
  • use Angular
  • SPA/routing - this is typically a concern of the UI framework and shouldn't be any different within Electron
  • open multiple windows and have them communicate with each other
    • Note: two windows can communicate, but have to use the main process as an intermediary. This is by (Electron's) design. See the chat app's "whisper" for an example.
  • Vue, Ember, Backbone?: we decided not to pursue this because the integration of these frameworks won't be significantly different than the React or Angular examples.

Localization/internationalization

  • do it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions