Skip to content

[grid] UI Overview is able to see live preview per Node #15777

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

Merged
merged 4 commits into from
May 23, 2025
Merged

Conversation

VietND96
Copy link
Member

@VietND96 VietND96 commented May 22, 2025

User description

🔗 Related Issues

💥 What does this PR do?

Quick live preview of what's happening in Node (main VNC session in Node, it is good for 1 session per Node)
Demo

Screen.Recording.2025-05-22.at.18.29.32.mov

🔧 Implementation Notes

💡 Additional Considerations

🔄 Types of changes

  • Cleanup (formatting, renaming)
  • Bug fix (backwards compatible)
  • New feature (non-breaking change which adds functionality and tests!)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR Type

Enhancement


Description

  • Add live VNC session preview for each Node in UI

  • Integrate live session dialog with close and scaling support

  • Enhance Node component with VNC session detection and controls

  • Update Overview to pass session data and origin to Node


Changes walkthrough 📝

Relevant files
Enhancement
Node.tsx
Enable live VNC session preview and controls in Node component

javascript/grid-ui/src/components/Node/Node.tsx

  • Add live VNC session preview dialog for nodes
  • Add animated camera icon for live view activation
  • Implement logic to extract and use VNC session URLs
  • Integrate LiveView component and dialog controls
  • +121/-3 
    Overview.tsx
    Pass sessions and origin to Node for live preview               

    javascript/grid-ui/src/screens/Overview/Overview.tsx

  • Fetch sessions data and pass to Node component
  • Pass window origin to Node for VNC URL construction
  • Filter sessions by node for live preview support
  • +13/-1   

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @VietND96 VietND96 requested a review from diemol May 22, 2025 12:01
    @selenium-ci selenium-ci added the B-grid Everything grid and server related label May 22, 2025
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🎫 Ticket compliance analysis ❌

    1234 - Not compliant

    Non-compliant requirements:

    • Fix issue where Selenium 2.48 doesn't trigger JavaScript in link's href on click()
    • Ensure JavaScript events are properly triggered in Firefox 42.0

    5678 - Not compliant

    Non-compliant requirements:

    • Fix "ConnectFailure (Connection refused)" error when instantiating ChromeDriver
    • Address issue where subsequent ChromeDriver instances fail after first successful instance

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Error Handling

    The VNC URL construction logic has basic error handling but could be improved. If the URL construction fails, it silently logs to console and returns an empty string, which might lead to confusing behavior for users when live view fails.

    function getVncUrl(session, origin) {
      try {
        const parsed = JSON.parse(session.capabilities)
        let vnc = parsed['se:vnc'] ?? ''
        if (vnc.length > 0) {
          try {
            const url = new URL(origin)
            const vncUrl = new URL(vnc)
            url.pathname = vncUrl.pathname
            url.protocol = url.protocol === 'https:' ? 'wss:' : 'ws:'
            return url.href
          } catch (error) {
            console.log(error)
            return ''
          }
        }
        return ''
      } catch (e) {
        return ''
      }
    
    Type Safety

    The component uses TypeScript but has incomplete type definitions. The useRef hook uses a generic type with a disconnect method, but the component props lack proper TypeScript interfaces, which could lead to runtime errors.

    function Node (props) {
      const { node, sessions = [], origin } = props
      const [liveViewSessionId, setLiveViewSessionId] = useState('')
      const liveViewRef = useRef<{ disconnect: () => void }>(null)
    
      const vncSession = sessions.find(session => {
        try {
          const capabilities = JSON.parse(session.capabilities)
          return capabilities['se:vnc'] !== undefined && capabilities['se:vnc'] !== ''
        } catch (e) {
          return false
        }
      })
    
    Potential Performance Issue

    The sessions filtering is done in the JSX rendering logic rather than in a memoized variable or useEffect hook, which could cause unnecessary re-filtering on each render cycle.

    sessions={sessionsData?.sessionsInfo?.sessions?.filter(
      session => session.nodeId === node.id
    ) || []}
    origin={window.location.origin}
    

    Copy link
    Contributor

    qodo-merge-pro bot commented May 22, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    General
    Add error handling

    The handleDialogClose function doesn't handle potential errors when
    disconnecting the VNC session. Add try-catch to prevent unhandled exceptions
    that could crash the UI if the disconnect operation fails.

    javascript/grid-ui/src/components/Node/Node.tsx [98-103]

     const handleDialogClose = () => {
    -  if (liveViewRef.current) {
    -    liveViewRef.current.disconnect()
    +  try {
    +    if (liveViewRef.current) {
    +      liveViewRef.current.disconnect()
    +    }
    +  } catch (error) {
    +    console.error('Error disconnecting live view:', error)
    +  } finally {
    +    setLiveViewSessionId('')
       }
    -  setLiveViewSessionId('')
     }
    • Apply / Chat
    Suggestion importance[1-10]: 8

    __

    Why: Adding a try-catch block to handleDialogClose prevents potential UI crashes from unhandled exceptions during disconnect, which is important for robustness and user experience.

    Medium
    Improve error handling

    The error handling in getVncUrl logs errors to console but silently returns
    empty strings. Implement proper error propagation or add more descriptive
    logging to help with debugging VNC connection issues.

    javascript/grid-ui/src/components/Node/Node.tsx [56-76]

     function getVncUrl(session, origin) {
       try {
         const parsed = JSON.parse(session.capabilities)
         let vnc = parsed['se:vnc'] ?? ''
         if (vnc.length > 0) {
           try {
             const url = new URL(origin)
             const vncUrl = new URL(vnc)
             url.pathname = vncUrl.pathname
             url.protocol = url.protocol === 'https:' ? 'wss:' : 'ws:'
             return url.href
           } catch (error) {
    -        console.log(error)
    +        console.error('Failed to construct VNC URL:', error)
             return ''
           }
         }
         return ''
       } catch (e) {
    +    console.error('Failed to parse session capabilities:', e)
         return ''
       }
     }
    • Apply / Chat
    Suggestion importance[1-10]: 7

    __

    Why: Replacing console.log with console.error and providing more descriptive error messages improves debugging, but the functional impact is moderate since the core logic remains unchanged.

    Medium
    Improve type safety

    The TypeScript type annotation for liveViewRef is incomplete. Since it's used
    with the LiveView component and passed as ref={liveViewRef as any}, define a
    proper interface for the ref to avoid the unsafe type assertion.

    javascript/grid-ui/src/components/Node/Node.tsx [81]

    -const liveViewRef = useRef<{ disconnect: () => void }>(null)
    +interface LiveViewRef {
    +  disconnect: () => void;
    +}
    +const liveViewRef = useRef<LiveViewRef>(null)
    • Apply / Chat
    Suggestion importance[1-10]: 6

    __

    Why: Defining a proper interface for the liveViewRef improves type safety and eliminates the need for an unsafe type assertion, which enhances maintainability and reduces the risk of runtime errors.

    Low
    Learned
    best practice
    Add parameter null checks

    Add null checks for session and origin parameters at the beginning of the
    function to prevent potential null reference exceptions. This ensures the
    function handles invalid inputs gracefully.

    javascript/grid-ui/src/components/Node/Node.tsx [56-76]

     function getVncUrl(session, origin) {
    +  if (!session || !origin || !session.capabilities) {
    +    return '';
    +  }
       try {
         const parsed = JSON.parse(session.capabilities)
         let vnc = parsed['se:vnc'] ?? ''
         if (vnc.length > 0) {
           try {
             const url = new URL(origin)
             const vncUrl = new URL(vnc)
             url.pathname = vncUrl.pathname
             url.protocol = url.protocol === 'https:' ? 'wss:' : 'ws:'
             return url.href
           } catch (error) {
             console.log(error)
             return ''
           }
         }
         return ''
       } catch (e) {
         return ''
       }
     }
    • Apply / Chat
    Suggestion importance[1-10]: 6

    __

    Why:
    Relevant best practice - Add null checks for parameters and properties before using them to prevent NullReferenceExceptions

    Low
    • Update

    @VietND96 VietND96 force-pushed the node-live-preview branch from 063644b to afba64e Compare May 22, 2025 12:07
    Copy link
    Contributor

    CI Feedback 🧐

    A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

    Action: Format / Check format script run

    Failed stage: Run Bazel [❌]

    Failure summary:

    The action failed during a code formatting or linting check. The log shows whitespace changes being
    made to a JavaScript test file (lines 3225-3276), where spaces were being replaced with empty lines.
    The process completed with exit code 1 (line 3277), indicating failure. This suggests the PR
    contained code that didn't meet the project's formatting standards, and the automated formatter made
    changes that needed to be committed.

    Relevant error logs:
    1:  ##[group]Runner Image Provisioner
    2:  Hosted Compute Agent
    ...
    
    947:  Package 'php-sql-formatter' is not installed, so not removed
    948:  Package 'php8.3-ssh2' is not installed, so not removed
    949:  Package 'php-ssh2-all-dev' is not installed, so not removed
    950:  Package 'php8.3-stomp' is not installed, so not removed
    951:  Package 'php-stomp-all-dev' is not installed, so not removed
    952:  Package 'php-swiftmailer' is not installed, so not removed
    953:  Package 'php-symfony' is not installed, so not removed
    954:  Package 'php-symfony-asset' is not installed, so not removed
    955:  Package 'php-symfony-asset-mapper' is not installed, so not removed
    956:  Package 'php-symfony-browser-kit' is not installed, so not removed
    957:  Package 'php-symfony-clock' is not installed, so not removed
    958:  Package 'php-symfony-debug-bundle' is not installed, so not removed
    959:  Package 'php-symfony-doctrine-bridge' is not installed, so not removed
    960:  Package 'php-symfony-dom-crawler' is not installed, so not removed
    961:  Package 'php-symfony-dotenv' is not installed, so not removed
    962:  Package 'php-symfony-error-handler' is not installed, so not removed
    963:  Package 'php-symfony-event-dispatcher' is not installed, so not removed
    ...
    
    1141:  Package 'php-twig-html-extra' is not installed, so not removed
    1142:  Package 'php-twig-i18n-extension' is not installed, so not removed
    1143:  Package 'php-twig-inky-extra' is not installed, so not removed
    1144:  Package 'php-twig-intl-extra' is not installed, so not removed
    1145:  Package 'php-twig-markdown-extra' is not installed, so not removed
    1146:  Package 'php-twig-string-extra' is not installed, so not removed
    1147:  Package 'php8.3-uopz' is not installed, so not removed
    1148:  Package 'php-uopz-all-dev' is not installed, so not removed
    1149:  Package 'php8.3-uploadprogress' is not installed, so not removed
    1150:  Package 'php-uploadprogress-all-dev' is not installed, so not removed
    1151:  Package 'php8.3-uuid' is not installed, so not removed
    1152:  Package 'php-uuid-all-dev' is not installed, so not removed
    1153:  Package 'php-validate' is not installed, so not removed
    1154:  Package 'php-vlucas-phpdotenv' is not installed, so not removed
    1155:  Package 'php-voku-portable-ascii' is not installed, so not removed
    1156:  Package 'php-wmerrors' is not installed, so not removed
    1157:  Package 'php-xdebug-all-dev' is not installed, so not removed
    ...
    
    1904:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/example/headless.js 5ms (unchanged)
    1905:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/example/logging.js 4ms (unchanged)
    1906:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/firefox.js 39ms (unchanged)
    1907:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/http/index.js 12ms (unchanged)
    1908:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/http/util.js 6ms (unchanged)
    1909:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/ie.js 19ms (unchanged)
    1910:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/index.js 26ms (unchanged)
    1911:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/io/exec.js 7ms (unchanged)
    1912:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/io/index.js 14ms (unchanged)
    1913:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/io/zip.js 11ms (unchanged)
    1914:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/jsdoc_conf.json 3ms (unchanged)
    1915:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/lib/atoms/make-atoms-module.js 3ms (unchanged)
    1916:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/lib/by.js 20ms (unchanged)
    1917:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/lib/capabilities.js 22ms (unchanged)
    1918:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/lib/command.js 8ms (unchanged)
    1919:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/lib/error.js 28ms (unchanged)
    1920:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/lib/fedcm/account.js 3ms (unchanged)
    ...
    
    1989:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/fingerprint_test.js 4ms (unchanged)
    1990:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/firefox/addon_test.js 9ms (unchanged)
    1991:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/firefox/contextSwitching_test.js 4ms (unchanged)
    1992:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/firefox/full_page_screenshot_test.js 5ms (unchanged)
    1993:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/firefox/options_test.js 16ms (unchanged)
    1994:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/frame_test.js 7ms (unchanged)
    1995:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/http/http_test.js 21ms (unchanged)
    1996:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/http/util_test.js 10ms (unchanged)
    1997:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/ie/options_test.js 8ms (unchanged)
    1998:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/io/io_test.js 28ms (unchanged)
    1999:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/io/zip_test.js 10ms (unchanged)
    2000:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/lib/api_test.js 2ms (unchanged)
    2001:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/lib/by_test.js 9ms (unchanged)
    2002:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/lib/capabilities_test.js 11ms (unchanged)
    2003:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/lib/credentials_test.js 13ms (unchanged)
    2004:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/lib/error_test.js 11ms (unchanged)
    2005:  ../../../../../../../../../../work/selenium/selenium/javascript/selenium-webdriver/test/lib/form_submit_test.js 2ms (unchanged)
    ...
    
    2688:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/Navigation.cs
    2689:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Communication/Json/Converters/Enumerable/GetCookiesResultConverter.cs
    2690:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/DevTools/ResponsePausedEventArgs.cs
    2691:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/ProxyTest.cs
    2692:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Session/StatusCommand.cs
    2693:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/DevTools/DevToolsTestFixture.cs
    2694:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Storage/SetCookieCommand.cs
    2695:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/support/UI/SlowLoadableComponentTest.cs
    2696:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Input/PerformActionsCommand.cs
    2697:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/CssValueTest.cs
    2698:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContextInfo.cs
    2699:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/FormHandlingTests.cs
    2700:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/BiDi/Script/LocalValueConversionTests.cs
    2701:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Script/CallFunctionCommand.cs
    2702:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/BiDi/Script/EvaluateParametersTest.cs
    2703:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/UnknownErrorException.cs
    2704:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/PrintOptions.cs
    ...
    
    2759:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/DevTools/DevToolsEventData.cs
    2760:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/DevTools/v135/V135Network.cs
    2761:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/ILogs.cs
    2762:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Script/PreloadScript.cs
    2763:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/Timeouts.cs
    2764:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Network/NetworkModule.cs
    2765:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/DevTools/v134/V134Target.cs
    2766:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/BiDi/Script/CallFunctionLocalValueTest.cs
    2767:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/WebElementTest.cs
    2768:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/DomMutatedEventArgs.cs
    2769:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/CloseCommand.cs
    2770:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/BiDiException.cs
    2771:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/CommandInfo.cs
    2772:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/Environment/UrlBuilder.cs
    2773:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Script/ScriptModule.cs
    2774:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Network/FetchErrorEventArgs.cs
    2775:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/DevTools/CommandResponseExtensions.cs
    ...
    
    2837:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/TakesScreenshotTest.cs
    2838:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/IJavaScriptEngine.cs
    2839:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/NoSuchElementException.cs
    2840:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/DevTools/AuthRequiredEventArgs.cs
    2841:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Browser/RemoveUserContextCommand.cs
    2842:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Session/ProxyConfiguration.cs
    2843:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/support/UI/SelectElement.cs
    2844:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/Remote/RemoteSessionSettings.cs
    2845:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Network/FailRequestCommand.cs
    2846:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Network/UrlPattern.cs
    2847:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/NetworkRequestSentEventArgs.cs
    2848:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/DevTools/BindingCalledEventArgs.cs
    2849:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Network/ResponseCompletedEventArgs.cs
    2850:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Network/AuthChallenge.cs
    2851:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Script/Channel.cs
    2852:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/ErrorsTest.cs
    2853:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/support/Events/WebDriverNavigationEventArgs.cs
    ...
    
    2856:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/DevTools/Log.cs
    2857:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Communication/EventHandler.cs
    2858:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/GetMultipleAttributeTest.cs
    2859:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContextStorageModule.cs
    2860:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/ObjectStateAssumptionsTest.cs
    2861:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/Internal/Logging/ILogHandlerList.cs
    2862:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Network/ContinueWithAuthCommand.cs
    2863:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/Firefox/FirefoxProfileManager.cs
    2864:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/remote/RemoteWebDriverSpecificTests.cs
    2865:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/BrowsingContext.cs
    2866:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/Internal/Logging/ILogHandler.cs
    2867:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/Firefox/Internal/IniFileReader.cs
    2868:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Script/StackTrace.cs
    2869:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/Internal/Logging/TextWriterHandler.cs
    2870:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/IE/InternetExplorerDriverService.cs
    2871:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/ErrorResponse.cs
    2872:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Communication/Json/Converters/DateTimeOffsetConverter.cs
    ...
    
    3058:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/DevTools/LogEntry.cs
    3059:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/TargetLocator.cs
    3060:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/HttpRequestData.cs
    3061:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/ISearchContext.cs
    3062:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/HttpResponseData.cs
    3063:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/LogLevel.cs
    3064:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/BrowsingContext/CaptureScreenshotCommand.cs
    3065:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/Interactions/KeyInputDevice.cs
    3066:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/DetachedShadowRootException.cs
    3067:  Adding notice to /home/runner/work/selenium/selenium/dotnet/test/common/StaleElementReferenceTest.cs
    3068:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/DevTools/DevToolsSessionLogMessageEventArgs.cs
    3069:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Modules/Session/EndCommand.cs
    3070:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/CommandInfoRepository.cs
    3071:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/BiDi/Communication/Message.cs
    3072:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/Safari/SafariOptions.cs
    3073:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/WebDriverError.cs
    3074:  Adding notice to /home/runner/work/selenium/selenium/dotnet/src/webdriver/Internal/IWebDriverObjectReference.cs
    ...
    
    3225:  -    
    3226:  +
    3227:  const user = userEvent.setup()
    3228:  await user.click(screen.getByTestId('VideocamIcon'))
    3229:  -    
    3230:  +
    3231:  expect(screen.getByText('Node Session Live View')).toBeInTheDocument()
    3232:  -    
    3233:  +
    3234:  await user.click(screen.getByRole('button', { name: /close/i }))
    3235:  -    
    3236:  +
    3237:  expect(screen.queryByText('Node Session Live View')).not.toBeInTheDocument()
    3238:  })
    3239:  @@ -283,15 +298,15 @@ describe('Overview component', () => {
    3240:  error: new Error('Network error')
    3241:  }
    3242:  ]
    3243:  -    
    3244:  +
    3245:  render(
    3246:  <MockedProvider mocks={errorMocks} addTypename={false}>
    3247:  <Overview />
    3248:  </MockedProvider>
    3249:  )
    3250:  -    
    3251:  +
    3252:  await new Promise(resolve => setTimeout(resolve, 0))
    3253:  -    
    3254:  +
    3255:  const errorElement = screen.getByRole('heading', { level: 3 })
    3256:  expect(errorElement).toBeInTheDocument()
    3257:  })
    ...
    
    3262:  -    
    3263:  +
    3264:  render(
    3265:  <MockedProvider mocks={emptyMocks} addTypename={false}>
    3266:  <Overview />
    3267:  </MockedProvider>
    3268:  )
    3269:  -    
    3270:  +
    3271:  await screen.findByText('The Grid has no registered Nodes yet.')
    3272:  -    
    3273:  +
    3274:  expect(screen.getByText('The Grid has no registered Nodes yet.')).toBeInTheDocument()
    3275:  })
    3276:  })
    3277:  ##[error]Process completed with exit code 1.
    3278:  Post job cleanup.
    

    Signed-off-by: Viet Nguyen Duc <[email protected]>
    @VietND96 VietND96 force-pushed the node-live-preview branch from f6776ee to 06cb579 Compare May 23, 2025 12:08
    @diemol diemol merged commit 9f3c923 into trunk May 23, 2025
    32 checks passed
    @diemol diemol deleted the node-live-preview branch May 23, 2025 13:41
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    B-grid Everything grid and server related Review effort 3/5
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants