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

Basic playwright electron support #12207

Merged

Commits on Nov 30, 2023

  1. First working version

    Contributed on behalf of STMicroelectronics.
    Change-Id: I7c817b00262229ab096ecbbacca5c465b9fa6302
    planger authored and xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    f10a58b View commit details
    Browse the repository at this point in the history
  2. playwright: improve playwright support for electron

    This patch adds the possibility to disable natively rendered elements
    by setting the environment variable THEIA_ELECTRON_DISABLE_NATIVE_ELEMENTS to 1.
    
    We need this functionality for testing menu actions or use cases that
    involve file choosers using electron playwright.
    When the environment variable is set, the app loader enforces the
    rendering of HTML menus that playwright can access.
    
    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    b7c088e View commit details
    Browse the repository at this point in the history
  3. playwright: make all tests executable in electron

    * Use unified AppLoader for both electron and browser tests
    * Control early window loading of electron via environment variable
      THEIA_ELECTRON_NO_EARLY_WINDOW
    * Introduce environment variable USE_ELECTRON to run playwright tests in electron
    * Add ui-tests-electron target to package.json
    * Adjust workflow to use the new ui-tests-ci target (only one worker +
      both electron and browser tests)
    * Merge electron playwright tests into the existing tests
    * Skip tests that are currently too flaky in electron:
      - theia-output-view.test.ts
      - theia-quick-command.test.ts
    
    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    b7c72f9 View commit details
    Browse the repository at this point in the history
  4. fix: workspace loading in theia-electron-app-loader

    Ensures that the workspace is defined before electron launches.
    
    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    eead583 View commit details
    Browse the repository at this point in the history
  5. fix: query useNativeDialogs in implementation not in bindings

    Instead of using useNativeDialogs() to change bindings,
    we use to decide whether to call the extended FileDialogService or the
    parent implementation.
    
    This should simplify debugging and help moving away from the
    environment variable approach towards preferences or something else.
    
    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    162bb8b View commit details
    Browse the repository at this point in the history
  6. fix: Remove duplicated bindings

    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    199f814 View commit details
    Browse the repository at this point in the history
  7. chore: move useNativeDialogs to core + rename to useNativeElements

    This generalized flag applies to all electron-based UI and should
    therefore go to core. Also, the name is more general now.
    
    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    a2d7297 View commit details
    Browse the repository at this point in the history
  8. chore: revert corrupted warning message

    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    1536956 View commit details
    Browse the repository at this point in the history
  9. chore: refactor TheiaAppLoader

    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    625d699 View commit details
    Browse the repository at this point in the history
  10. chore: simplify initialization of TheiaApploader

    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    0063a43 View commit details
    Browse the repository at this point in the history
  11. chore: remove duplicated mode 'serial' annotations

    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    b82f413 View commit details
    Browse the repository at this point in the history
  12. chore: remove unnecessary open() calls in test

    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    8a43294 View commit details
    Browse the repository at this point in the history
  13. chore: remove class ElectronLaunchOptions

    As suggested in the code review, we remove the explicit class
    and convert the options within `TheiaElectronAppLoader` if necessary.
    
    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    0d19547 View commit details
    Browse the repository at this point in the history
  14. fix: always set env variables for playwright-electron

    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    c09bdce View commit details
    Browse the repository at this point in the history
  15. chore: use namespaces instead of static classes in theia-app-loader

    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    c3e9272 View commit details
    Browse the repository at this point in the history
  16. chore: remove TheiaAppMainPageObjects class

    Replaced with factory methods within TheiaApp class.
    
    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    e5aebaa View commit details
    Browse the repository at this point in the history
  17. fix: revert path transformation for windows/macos

    path.normalize() does not transform drive letters to lower case,
    so we revert back to the original version.
    
    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    fad7d23 View commit details
    Browse the repository at this point in the history
  18. fix: re-enable all playwright tests in the test suite

    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    2f78ce1 View commit details
    Browse the repository at this point in the history
  19. fix: disable playwright-electron workflow

    Contributed on behalf of STMicroelectronics
    
    Signed-off-by: Olaf Lessenich <[email protected]>
    xai committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    f8f01fe View commit details
    Browse the repository at this point in the history