Skip to content

beta v7 release candidate#1816

Merged
toddtarsi merged 24 commits into
trunkfrom
beta-v7-preview
Apr 18, 2024
Merged

beta v7 release candidate#1816
toddtarsi merged 24 commits into
trunkfrom
beta-v7-preview

Conversation

@toddtarsi

@toddtarsi toddtarsi commented Apr 16, 2024

Copy link
Copy Markdown
Contributor

User description

@fernandozw - I took your code and am teeing this up as the next release candidate! I tried to keep the core things involving the language maps, but I switched out openBrowser for a modified version of requestPlaybackWindow (this way it works with the tab system).

Please test with me and let me know your thoughts!


Type

enhancement, bug_fix


Description

  • Added extensive language maps for UI elements to support both English and Chinese translations.
  • Introduced new components and API commands for handling language settings and displaying messages.
  • Enhanced requestPlaybackWindow to accept an optional URL for improved flexibility.
  • Various code cleanup and formatting adjustments across multiple files for better readability and maintenance.

Changes walkthrough

Relevant files
Enhancement
8 files
I18N.ts
Add Language Maps for UI Elements                                               

packages/selenium-ide/src/browser/enums/I18N.ts

  • Added extensive language maps for UI elements in both English and
    Chinese.
  • Included translations for window tabs, menu trees, configuration tabs,
    and more.
  • +2176/-0
    Message.tsx
    Add New Message Component for Alerts                                         

    packages/selenium-ide/src/browser/windows/ProjectEditor/tabs/Project/Message.tsx

  • Introduced a new component for displaying messages using MUI Snackbar
    and Alert.
  • +39/-0   
    OutPutSettings.tsx
    Implement Output Settings Component with Export Functionality

    packages/selenium-ide/src/browser/windows/ProjectEditor/tabs/Project/OutPutSettings.tsx

  • Added a new component for output settings with functionality to export
    tests.
  • Implemented language map support for dynamic translations.
  • +320/-0 
    index.ts
    Enhance requestPlaybackWindow to Accept URL                           

    packages/selenium-ide/src/main/session/controllers/Windows/index.ts

    • Modified requestPlaybackWindow to optionally accept a URL.
    +2/-2     
    getLanguage.ts
    Add API Command to Get Language Setting                                   

    packages/side-api/src/commands/system/getLanguage.ts

    • Introduced a new API command to get the current language setting.
    +4/-0     
    getLanguageMap.ts
    Add API Command to Retrieve Language Map                                 

    packages/side-api/src/commands/system/getLanguageMap.ts

  • Added a new API command to retrieve the language map for translations.

  • +4/-0     
    setLanguage.ts
    Add API Command to Set Language                                                   

    packages/side-api/src/commands/system/setLanguage.ts

    • Added a new API command to set the current language.
    +4/-0     
    requestPlaybackWindow.ts
    Update requestPlaybackWindow Command to Accept URL             

    packages/side-api/src/commands/windows/requestPlaybackWindow.ts

    • Updated the command to optionally accept a URL parameter.
    +1/-1     
    Error handling
    1 files
    find-select.ts
    Improve Error Handling in find-select.ts                                 

    packages/selenium-ide/src/browser/windows/PlaybackWindow/preload/find-select.ts

  • Added comments to catch block within processElementAtCommand function.

  • +3/-1     
    Formatting
    4 files
    prompt.ts
    Code Cleanup in prompt.ts                                                               

    packages/selenium-ide/src/browser/windows/PlaybackWindow/preload/prompt.ts

    • Minor formatting adjustments and cleanup.
    +1/-2     
    record-handlers.ts
    Fix Import Formatting in record-handlers.ts                           

    packages/selenium-ide/src/browser/windows/PlaybackWindow/preload/record-handlers.ts

    • Imported locatorBuilders with correct spacing.
    +1/-1     
    record-shortcuts.ts
    Formatting Adjustment in record-shortcuts.ts                         

    packages/selenium-ide/src/browser/windows/PlaybackWindow/preload/record-shortcuts.ts

    • Corrected spacing for targets assignment.
    +1/-1     
    utils.ts
    Improve Readability of isVisible Function                               

    packages/selenium-ide/src/browser/windows/PlaybackWindow/preload/utils.ts

    • Reformatted the isVisible function for better readability.
    +37/-24 
    Bug fix
    1 files
    index.ts
    Adjust Development Mode Check                                                       

    packages/selenium-ide/src/main/session/controllers/System/index.ts

    • Adjusted development mode check to exclude production environment.
    +2/-1     

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @qodo-code-review

    Copy link
    Copy Markdown

    PR Description updated to latest commit (003f064)

    @qodo-code-review

    Copy link
    Copy Markdown

    PR Review

    ⏱️ Estimated effort to review [1-5]

    4, because the PR introduces a significant amount of new code across multiple files, including UI components, internationalization support, and modifications to existing functionality. The complexity of integrating these changes with the existing codebase, ensuring compatibility, and verifying the correctness of internationalization implementation requires a thorough review.

    🧪 Relevant tests

    No

    🔍 Possible issues

    Possible Bug: The requestPlaybackWindow method in packages/selenium-ide/src/main/session/controllers/Windows/index.ts has been modified to accept an optional URL parameter. However, there's no indication that existing calls to this method have been updated to account for this change. This could potentially lead to issues if the method is called without the URL parameter expecting the previous behavior.

    Code Quality: Several files have inconsistent formatting, such as inconsistent use of semicolons and spacing. This doesn't affect the functionality but could hinder code maintainability.

    Error Handling: The new exportToUi function in OutPutSettings.tsx catches errors but only logs them to the console. It might be beneficial for user experience to display a message to the user in case of failure.

    Hardcoded Values: There are hardcoded URLs and paths in OutPutSettings.tsx which might make the code less flexible and harder to maintain. Consider making these configurable through environment variables or another configuration method.

    🔒 Security concerns

    No


    ✨ Review tool usage guide:

    Overview:
    The review tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.

    The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.

    • When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:
    /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
    
    [pr_reviewer]
    some_config1=...
    some_config2=...
    

    See the review usage page for a comprehensive guide on using this tool.

    @qodo-code-review

    Copy link
    Copy Markdown

    PR Code Suggestions

    CategorySuggestions                                                                                                                                                       
    Best practice
    Use TypeScript type assertion for state initialization to ensure type safety.

    Instead of initializing state with an empty array and later filling it with data, consider
    using TypeScript's type assertion or defining a type for the state to ensure type safety
    and clarity in your component's state management.

    packages/selenium-ide/src/browser/windows/ProjectEditor/tabs/Project/OutPutSettings.tsx [58]

    -const [options, setOptions] = React.useState([])
    +interface OptionType {
    +  id: string;
    +  pageName: string;
    +}
    +const [options, setOptions] = React.useState<OptionType[]>([])
     
    Use specific types instead of any for state variables to ensure type safety.

    Consider using a more specific type than any for the useState hook to ensure type safety
    and improve code readability. For example, define an interface for the language map
    structure.

    packages/selenium-ide/src/browser/windows/ProjectEditor/tabs/Project/OutPutSettings.tsx [68]

    -const [languageMap, setLanguageMap] = useState<any>({
    +interface LanguageMap {
    +  [key: string]: string;
    +}
    +const [languageMap, setLanguageMap] = useState<LanguageMap>({
     
    Use strict equality checks to avoid potential bugs.

    To avoid potential bugs and ensure the code's correctness, explicitly check for both null
    and undefined in conditions instead of using a loose equality check (==).

    packages/selenium-ide/src/browser/windows/ProjectEditor/tabs/Project/OutPutSettings.tsx [106]

    -if (url == '' || url == undefined) {
    +if (url === '' || url === undefined) {
     
    Maintainability
    Extract API request logic into a separate function for better maintainability.

    To improve code readability and maintainability, consider extracting the logic for making
    API requests into a separate function or service. This will make the component less
    cluttered and make the API logic reusable across components.

    packages/selenium-ide/src/browser/windows/ProjectEditor/tabs/Project/OutPutSettings.tsx [157-158]

    -const response = await fetch(host + url, options)
    -const result = await response.json()
    +async function fetchAPI(url: string, options: RequestInit) {
    +  const response = await fetch(url, options);
    +  return await response.json();
    +}
    +// Usage
    +const result = await fetchAPI(host + url, options);
     
    Performance
    Debounce function calls to improve performance and user experience.

    For better performance and user experience, consider debouncing the changeUrl function
    calls. This prevents the function from being called too frequently, for example, when a
    user is typing in an input field.

    packages/selenium-ide/src/browser/windows/ProjectEditor/tabs/Project/OutPutSettings.tsx [247]

    -onBlur={changeUrl}
    +onBlur={debounce(changeUrl, 300)}
     

    ✨ Improve tool usage guide:

    Overview:
    The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.

    • When commenting, to edit configurations related to the improve tool (pr_code_suggestions section), use the following template:
    /improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
    
    [pr_code_suggestions]
    some_config1=...
    some_config2=...
    

    See the improve usage page for a comprehensive guide on using this tool.

    @toddtarsi

    Copy link
    Copy Markdown
    Contributor Author

    @fernandozw - I am going to merge this in just a bit. It resolves an issue where the system.onLog api causes another system.onLog api that continues until the whole system crashes.

    @qodo-code-review

    qodo-code-review Bot commented Apr 16, 2024

    Copy link
    Copy Markdown

    CI Failure Feedback

    (Checks updated until commit 3255a68)

    Action: test

    Failed stage: Build side-runner and selenium-ide [❌]

    Failure summary:

    The action failed due to multiple errors during the build process:

  • Multiple instances of the TypeScript error TS6133, indicating that the session variable is imported
    from electron but never used in ./src/main/session/controllers/Projects/index.ts. This unused
    variable causes the build to fail as it likely violates the project's TypeScript configuration rules
    which prevent compilation when unused variables are declared.
  • Additionally, there were repeated failures to create binary links for side-code-export across
    various packages due to missing target files. This suggests either a path configuration error or
    missing distribution files in the project structure.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    171:  .../node_modules/@bazel/hide-bazel-files postinstall: Done
    172:  .../node_modules/@bazel/typescript postinstall: Done
    173:  .../node_modules/electron postinstall$ node install.js
    174:  .../node_modules/electron postinstall$ node install.js
    175:  .../node_modules/electron-chromedriver install$ node ./download-chromedriver.js
    176:  .../node_modules/electron postinstall: Done
    177:  .../node_modules/electron postinstall: Done
    178:  .../node_modules/electron-chromedriver install: Done
    179:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-xunit/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'
    180:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-java-junit/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'
    181:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-nunit/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'
    182:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-commons/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'
    183:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-javascript-mocha/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'
    184:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-python-pytest/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'
    185:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-ruby-rspec/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'
    186:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/side-example-suite/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'
    187:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/selenium-ide/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-code-export/dist/bin.js'
    188:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-commons/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-commons/node_modules/side-code-export/dist/bin.js'
    189:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-java-junit/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-java-junit/node_modules/side-code-export/dist/bin.js'
    190:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-javascript-mocha/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-javascript-mocha/node_modules/side-code-export/dist/bin.js'
    191:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-python-pytest/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-python-pytest/node_modules/side-code-export/dist/bin.js'
    192:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-ruby-rspec/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-ruby-rspec/node_modules/side-code-export/dist/bin.js'
    193:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-xunit/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-xunit/node_modules/side-code-export/dist/bin.js'
    194:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-nunit/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/code-export-csharp-nunit/node_modules/side-code-export/dist/bin.js'
    195:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/side-example-suite/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/side-example-suite/node_modules/side-code-export/dist/bin.js'
    196:  WARN  Failed to create bin at /home/runner/work/selenium-ide/selenium-ide/packages/selenium-ide/node_modules/.bin/side-code-export. ENOENT: no such file or directory, open '/home/runner/work/selenium-ide/selenium-ide/packages/selenium-ide/node_modules/side-code-export/dist/bin.js'
    ...
    
    278:  packages/selenium-ide build:webpack:   assets by path �[1m�[32m*.html�[39m�[22m 2.88 KiB
    279:  packages/selenium-ide build:webpack:     asset �[1m�[32mplayback-window.html�[39m�[22m 427 bytes �[1m�[32m[emitted]�[39m�[22m
    280:  packages/selenium-ide build:webpack:     asset �[1m�[32mupdate-notifier.html�[39m�[22m 427 bytes �[1m�[32m[emitted]�[39m�[22m
    281:  packages/selenium-ide build:webpack:     asset �[1m�[32mproject-editor.html�[39m�[22m 426 bytes �[1m�[32m[emitted]�[39m�[22m
    282:  packages/selenium-ide build:webpack:     asset �[1m�[32mconfirm.html�[39m�[22m 419 bytes �[1m�[32m[emitted]�[39m�[22m
    283:  packages/selenium-ide build:webpack:     asset �[1m�[32mprompt.html�[39m�[22m 418 bytes �[1m�[32m[emitted]�[39m�[22m
    284:  packages/selenium-ide build:webpack:     + 2 assets
    285:  packages/selenium-ide build:webpack: 12423 modules
    286:  packages/selenium-ide build:webpack: �[1m�[31mERROR�[39m�[22m in �[1m./src/main/session/controllers/Projects/index.ts:12:1�[39m�[22m
    287:  packages/selenium-ide build:webpack: �[1mTS6133: 'session' is declared but its value is never read.
    288:  packages/selenium-ide build:webpack:     10 | import BaseController from '../Base'
    289:  packages/selenium-ide build:webpack:     11 | import { isAutomated } from 'main/util'
    290:  packages/selenium-ide build:webpack:   > 12 | import { session } from 'electron'
    291:  packages/selenium-ide build:webpack:        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    292:  packages/selenium-ide build:webpack:     13 |
    293:  packages/selenium-ide build:webpack:     14 | export default class ProjectsController {
    294:  packages/selenium-ide build:webpack:     15 |   constructor(session: Session) {�[39m�[22m
    295:  packages/selenium-ide build:webpack: webpack 5.89.0 compiled with �[1m�[31m1 error�[39m�[22m in 40487 ms
    ...
    
    309:  packages/selenium-ide build:webpack: modules by path �[1m./src/browser/�[39m�[22m 137 KiB
    310:  packages/selenium-ide build:webpack:   modules by path �[1m./src/browser/windows/�[39m�[22m 131 KiB 17 modules
    311:  packages/selenium-ide build:webpack:   modules by path �[1m./src/browser/api/�[39m�[22m 3.71 KiB 4 modules
    312:  packages/selenium-ide build:webpack:   modules by path �[1m./src/browser/helpers/*.ts�[39m�[22m 2.6 KiB
    313:  packages/selenium-ide build:webpack:     �[1m./src/browser/helpers/preload-electron.ts�[39m�[22m 1.28 KiB �[1m�[33m[built]�[39m�[22m �[1m�[33m[code generated]�[39m�[22m
    314:  packages/selenium-ide build:webpack:     �[1m./src/browser/helpers/preload.ts�[39m�[22m 1.32 KiB �[1m�[33m[built]�[39m�[22m �[1m�[33m[code generated]�[39m�[22m
    315:  packages/selenium-ide build:webpack: �[1mexternal "electron"�[39m�[22m 42 bytes �[1m�[33m[built]�[39m�[22m �[1m�[33m[code generated]�[39m�[22m
    316:  packages/selenium-ide build:webpack: �[1m../side-model/dist/types.js�[39m�[22m 140 bytes �[1m�[33m[built]�[39m�[22m �[1m�[33m[code generated]�[39m�[22m
    317:  packages/selenium-ide build:webpack: �[1m�[31mERROR�[39m�[22m in �[1m./src/main/session/controllers/Projects/index.ts:12:1�[39m�[22m
    318:  packages/selenium-ide build:webpack: �[1mTS6133: 'session' is declared but its value is never read.
    319:  packages/selenium-ide build:webpack:     10 | import BaseController from '../Base'
    320:  packages/selenium-ide build:webpack:     11 | import { isAutomated } from 'main/util'
    321:  packages/selenium-ide build:webpack:   > 12 | import { session } from 'electron'
    322:  packages/selenium-ide build:webpack:        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    323:  packages/selenium-ide build:webpack:     13 |
    324:  packages/selenium-ide build:webpack:     14 | export default class ProjectsController {
    325:  packages/selenium-ide build:webpack:     15 |   constructor(session: Session) {�[39m�[22m
    326:  packages/selenium-ide build:webpack: webpack 5.89.0 compiled with �[1m�[31m1 error�[39m�[22m in 24925 ms
    ...
    
    333:  packages/selenium-ide build:webpack: modules by path �[1m../side-api/dist/�[39m�[22m 83.9 KiB 150 modules
    334:  packages/selenium-ide build:webpack: modules by path �[1m./src/browser/�[39m�[22m 132 KiB
    335:  packages/selenium-ide build:webpack:   modules by path �[1m./src/browser/windows/�[39m�[22m 127 KiB
    336:  packages/selenium-ide build:webpack:     modules by path �[1m./src/browser/windows/PlaybackWindow/preload/�[39m�[22m 114 KiB 8 modules
    337:  packages/selenium-ide build:webpack:     modules by path �[1m./src/browser/windows/PlaybackWindowBidi/�[39m�[22m 12.9 KiB 3 modules
    338:  packages/selenium-ide build:webpack:   modules by path �[1m./src/browser/api/�[39m�[22m 3.92 KiB 5 modules
    339:  packages/selenium-ide build:webpack:   �[1m./src/browser/helpers/preload.ts�[39m�[22m 1.32 KiB �[1m�[33m[built]�[39m�[22m �[1m�[33m[code generated]�[39m�[22m
    340:  packages/selenium-ide build:webpack: �[1m../side-model/dist/types.js�[39m�[22m 140 bytes �[1m�[33m[built]�[39m�[22m �[1m�[33m[code generated]�[39m�[22m
    341:  packages/selenium-ide build:webpack: �[1m�[31mERROR�[39m�[22m in �[1m./src/main/session/controllers/Projects/index.ts:12:1�[39m�[22m
    342:  packages/selenium-ide build:webpack: �[1mTS6133: 'session' is declared but its value is never read.
    343:  packages/selenium-ide build:webpack:     10 | import BaseController from '../Base'
    344:  packages/selenium-ide build:webpack:     11 | import { isAutomated } from 'main/util'
    345:  packages/selenium-ide build:webpack:   > 12 | import { session } from 'electron'
    346:  packages/selenium-ide build:webpack:        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    347:  packages/selenium-ide build:webpack:     13 |
    348:  packages/selenium-ide build:webpack:     14 | export default class ProjectsController {
    349:  packages/selenium-ide build:webpack:     15 |   constructor(session: Session) {�[39m�[22m
    350:  packages/selenium-ide build:webpack: webpack 5.89.0 compiled with �[1m�[31m1 error�[39m�[22m in 24920 ms
    ...
    
    373:  packages/selenium-ide build:webpack:       + 27 modules
    374:  packages/selenium-ide build:webpack:     modules by path �[1m../../node_modules/.pnpm/@fontsource+roboto@5.0.8/node_modules/@fontsource/robot...(truncated)�[39m�[22m 1.15 KiB (javascript) 231 KiB (asset)
    375:  packages/selenium-ide build:webpack:       �[1m../../node_modules/.pnpm/@fontsource+roboto@5.0.8/node_modules/@fontsource/robot...(truncated)�[39m�[22m 42 bytes (javascript) 13.2 KiB (asset) �[1m�[33m[built]�[39m�[22m �[1m�[33m[code generated]�[39m�[22m
    376:  packages/selenium-ide build:webpack:       + 27 modules
    377:  packages/selenium-ide build:webpack: modules by path �[1m./src/browser/�[39m�[22m 3.06 KiB
    378:  packages/selenium-ide build:webpack:   �[1m./src/browser/windows/PlaybackWindowBidi/renderer.tsx�[39m�[22m 979 bytes �[1m�[33m[built]�[39m�[22m �[1m�[33m[code generated]�[39m�[22m
    379:  packages/selenium-ide build:webpack:   �[1m./src/browser/components/AppWrapper.tsx�[39m�[22m 1.51 KiB �[1m�[33m[built]�[39m�[22m �[1m�[33m[code generated]�[39m�[22m
    380:  packages/selenium-ide build:webpack:   �[1m./src/browser/helpers/renderWhenReady.ts�[39m�[22m 603 bytes �[1m�[33m[built]�[39m�[22m �[1m�[33m[code generated]�[39m�[22m
    381:  packages/selenium-ide build:webpack: �[1m�[31mERROR�[39m�[22m in �[1m./src/main/session/controllers/Projects/index.ts:12:1�[39m�[22m
    382:  packages/selenium-ide build:webpack: �[1mTS6133: 'session' is declared but its value is never read.
    383:  packages/selenium-ide build:webpack:     10 | import BaseController from '../Base'
    384:  packages/selenium-ide build:webpack:     11 | import { isAutomated } from 'main/util'
    385:  packages/selenium-ide build:webpack:   > 12 | import { session } from 'electron'
    386:  packages/selenium-ide build:webpack:        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    387:  packages/selenium-ide build:webpack:     13 |
    388:  packages/selenium-ide build:webpack:     14 | export default class ProjectsController {
    389:  packages/selenium-ide build:webpack:     15 |   constructor(session: Session) {�[39m�[22m
    390:  packages/selenium-ide build:webpack: webpack 5.89.0 compiled with �[1m�[31m1 error�[39m�[22m in 25587 ms
    ...
    
    402:  packages/selenium-ide build:webpack:  @ ../side-runtime/dist/index.js 46:13-33
    403:  packages/selenium-ide build:webpack:  @ ./src/main/session/controllers/Driver/index.ts 31:23-58
    404:  packages/selenium-ide build:webpack:  @ ./src/main/session/index.ts 10:33-64
    405:  packages/selenium-ide build:webpack:  @ ./src/main/index.ts 11:34-54
    406:  packages/selenium-ide build:webpack: �[1m�[33mWARNING�[39m�[22m in �[1m../../node_modules/.pnpm/v8-compile-cache@2.3.0/node_modules/v8-compile-cache/v8-compile-cache.js�[39m�[22m �[1m�[32m153:42-49�[39m�[22m
    407:  packages/selenium-ide build:webpack: �[1mCritical dependency: require function is used in a way in which dependencies cannot be statically extracted�[39m�[22m
    408:  packages/selenium-ide build:webpack:  @ ./src/main/index.ts 6:0-27
    409:  packages/selenium-ide build:webpack: 3 warnings have detailed information that is not shown.
    410:  packages/selenium-ide build:webpack: Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
    411:  packages/selenium-ide build:webpack: �[1m�[31mERROR�[39m�[22m in �[1m./src/main/session/controllers/Projects/index.ts:12:1�[39m�[22m
    412:  packages/selenium-ide build:webpack: �[1mTS6133: 'session' is declared but its value is never read.
    413:  packages/selenium-ide build:webpack:     10 | import BaseController from '../Base'
    414:  packages/selenium-ide build:webpack:     11 | import { isAutomated } from 'main/util'
    415:  packages/selenium-ide build:webpack:   > 12 | import { session } from 'electron'
    416:  packages/selenium-ide build:webpack:        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    417:  packages/selenium-ide build:webpack:     13 |
    418:  packages/selenium-ide build:webpack:     14 | export default class ProjectsController {
    419:  packages/selenium-ide build:webpack:     15 |   constructor(session: Session) {�[39m�[22m
    420:  packages/selenium-ide build:webpack: webpack 5.89.0 compiled with �[1m�[31m1 error�[39m�[22m and �[1m�[33m3 warnings�[39m�[22m in 34897 ms
    421:  packages/selenium-ide build:webpack: Failed
    422:  /home/runner/work/selenium-ide/selenium-ide/packages/selenium-ide:
    423:  ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  selenium-ide@4.0.1-beta.7 build:webpack: `webpack`
    424:  Exit status 1
    425:  ERROR: "build:ide" exited with 1.
    426:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    @fernandozw

    Copy link
    Copy Markdown
    Contributor

    Okay, I will pull the latest version for testing tomorrow. Thank you for your hard work.

    @fernandozw

    Copy link
    Copy Markdown
    Contributor

    @toddtarsi I just used the beta-v7-preview branch to build&start, and found that there is no language selection option function and output function. Do I need to complete these functions on the beta-v7-preview branch?

    选择语言

    @toddtarsi

    Copy link
    Copy Markdown
    Contributor Author

    Ah! Let me cherry pick it across real quick!

    @toddtarsi

    Copy link
    Copy Markdown
    Contributor Author

    @fernandozw - Oh my gosh, I had a ton in my stash. Sorry about the delay. Changes should be here now. Holy cow, you really worked hard on the codebase. 💪 Nice job!!!!

    @toddtarsi

    Copy link
    Copy Markdown
    Contributor Author

    @fernandozw - Oh, I think I messed up some of the localization around deleting suites. I am sorry, but the component structure has changed a lot there and I may have goofed that a bit. Regardless, I think I got most of the items brought across. From here, we can probably do smaller PRs to fix. Nice job again!!!

    @toddtarsi

    Copy link
    Copy Markdown
    Contributor Author

    @fernandozw - For some of these "OutPut" options, is there any chance you'd want to add that functionality via a plugin? It seems like you're wanting to integrate a testing platform into the IDE, which I absolutely love. However, I want to keep the vanilla UX and base platform as simple as possible and support enriched UX via plugins like most IDEs do. Would it be cool if I rewrite some of that UX later into a "testing platform" plugin type of thing?

    @toddtarsi

    Copy link
    Copy Markdown
    Contributor Author

    For now, I'm going to merge it with that panel. But later, I'd like to make that panel into a plugin so it can kind of really get into that logic without making the base IDE more confusing.

    Also, I'm disabling the ide-runner test for now. Something has changed in github actions and it's wasted two days of my time 😡

    @toddtarsi toddtarsi merged commit 762a39c into trunk Apr 18, 2024
    @toddtarsi toddtarsi deleted the beta-v7-preview branch April 18, 2024 12:16
    @fernandozw

    Copy link
    Copy Markdown
    Contributor

    @toddtarsi I think it is a very good idea to connect to the test platform in the form of a plug-in, which will not destroy the original core functions of selenium ide.

    @fernandozw

    Copy link
    Copy Markdown
    Contributor

    @toddtarsi It doesn’t matter, open source projects themselves require a long period of reconstruction and accumulation in usage scenarios. A good project must go through a lot of consideration and demonstration. This is why I like the tool selenium ide, because there are almost 10 Over the years, this project has been iterating on new features

    @toddtarsi

    Copy link
    Copy Markdown
    Contributor Author

    @fernandozw - 💯 I feel the same. Some time soon, I will transplant this UX into the example plugin in side-example-suite, so it can hopefully act as a guide for plugin authors to inject custom pages or components into the app in a way that plays nicely with the panel system and such.

    @toddtarsi

    Copy link
    Copy Markdown
    Contributor Author

    My api for client side plugin UX is not complete, but it has a good bit of work. There is an event emitter api.plugins.onRequestCustomEditorPanel.dispatchEvent that appends webframes to the editor window, but I think it's not stateful enough. I think we need to make 2 new functions in side-api:

    api.plugins.registerCustomPanel(
        type: 'config-settings-group', // where this panel goes and how its labeled (maybe other options are test-editor and tab?)
        name: 'OutPut' // Must be global unique
        url: 'file://' + path.join(__dirname, 'client/settings-panel.html')
    )
    api.plugins.getCustomPanels(
        type: 'config-settings-group' | 'test-interface'
    )
    

    @fernandozw

    Copy link
    Copy Markdown
    Contributor

    I haven’t studied the plug-in yet🤦‍♂️. I will familiarize myself with the working principle of the plug-in as soon as possible. I think the electron version of selenium ide is much more perfect in terms of working method and ease of use than previous browser plug-ins. Regarding plug-in functions, It will make selenium ide more convenient to connect with external tools or platforms,👍

    @fernandozw

    Copy link
    Copy Markdown
    Contributor

    @toddtarsi So I developed the output function on selenium ide (sorry, this destroyed the core function of selenium ide. Now it seems that it is the most reasonable to exist in the form of a plug-in), using the data of the session file of selenium ide, imported into Test the platform, store all data in the database, make persistence, and execute it on the test platform. Haha, my idea is that the UI automated test is completely closed-loop. The test engineer only needs to record the test case, and all subsequent regression tests are left to the test platform. The core of ci/cd is that we write and debug use cases, all on selenium, because it is so convenient. I don’t care at all how to execute the subsequent test cases. After importing to the test platform, the test platform will be based on the settings Scheduled tasks or pull requests of business systems are run because I just want to reduce the time spent maintaining test cases, because I am a very lazy person😄

    @toddtarsi

    Copy link
    Copy Markdown
    Contributor Author

    @fernandozw - Thank you so much for your help with the code. I am very impressed with how effective you are at working in the codebase. I will work on adding a plugin with debug rendering panels to this directory

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants