Skip to content

Tests fail because of autocomplete loading #582

Description

@NeoCoderMatrix86

Describe the bug
End2EndTests fail randomly because loading autocomplete takes some time.

Additional context

Run dotnet test
Running tests from /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.End2EndTests/bin/Debug/net10.0/AudioCuesheetEditor.End2EndTests.dll (net10.0|x64)
Running tests from /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.Tests/bin/Debug/net10.0/AudioCuesheetEditor.Tests.dll (net10.0|x64)
/home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.Tests/bin/Debug/net10.0/AudioCuesheetEditor.Tests.dll (net10.0|x64) passed (1s 136ms)
failed UndoRedo_ShouldRestoreTrackState_WhenUndoAndRedoAreUsed (17s 112ms)
  from /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.End2EndTests/bin/Debug/net10.0/AudioCuesheetEditor.End2EndTests.dll (net10.0|x64)
  Test method AudioCuesheetEditor.End2EndTests.Tests.Desktop.TracingTest.UndoRedo_ShouldRestoreTrackState_WhenUndoAndRedoAreUsed threw exception:
  Microsoft.Playwright.PlaywrightException: Locator expected to match Aria snapshot '- table:
    - rowgroup:
      - 'row "Select all rows # Artist Title Begin End Length Status"':
        - columnheader "Select all rows":
          - checkbox "Select all rows"
        - columnheader "#"
        - columnheader "Artist"
        - columnheader "Title"
        - columnheader "Begin"
        - columnheader "End"
        - columnheader "Length"
        - columnheader "Status"
    - rowgroup:
      - row "Select row 1 00:00:00":
        - cell "Select row":
          - checkbox "Select row"
          - text: Select row
        - cell "1"
        - cell:
          - combobox
          - button
        - cell:
          - combobox
          - button
        - cell "00:00:00":
          - textbox: 00:00:00
        - cell:
          - textbox
        - cell:
          - textbox
        - cell
    - rowgroup:
      - row'
  But was: 'System.Dynamic.ExpandoObject' 
  Call log:
    - Expect "ToMatchAriaSnapshotAsync" with timeout 5000ms
    - waiting for GetByRole(AriaRole.Table)
      13 × locator resolved to <table class="mud-table-root">…</table>
         - unexpected value "- table:
    - rowgroup:
      - 'row "Select all rows # Artist Title Begin End Length Status"':
        - columnheader "Select all rows":
          - checkbox "Select all rows"
        - columnheader "#"
        - columnheader "Artist"
        - columnheader "Title"
        - columnheader "Begin"
        - columnheader "End"
        - columnheader "Length"
        - columnheader "Status"
    - rowgroup:
      - row "Select row 1 0 00:00:00":
        - cell "Select row":
          - checkbox "Select row"
          - text: Select row
        - cell "1"
        - cell "0":
          - combobox
          - progressbar:
            - img
        - cell:
          - combobox
          - button
        - cell "00:00:00":
          - textbox: 00:00:00
        - cell:
          - textbox
        - cell:
          - textbox
        - cell
    - rowgroup:
      - row"
    at Microsoft.Playwright.Core.AssertionsBase.ExpectImplAsync(String expression, FrameExpectOptions expectOptions, Object expected, String message, String title) in /_/src/Playwright/Core/AssertionsBase.cs:97
    at Microsoft.Playwright.Core.AssertionsBase.ExpectImplAsync(String expression, ExpectedTextValue[] expectedText, Object expected, String message, String title, FrameExpectOptions options) in /_/src/Playwright/Core/AssertionsBase.cs:69
    at AudioCuesheetEditor.End2EndTests.Tests.Desktop.TracingTest.UndoRedo_ShouldRestoreTrackState_WhenUndoAndRedoAreUsed() in /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.End2EndTests/Tests/Desktop/TracingTest.cs:40
    at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.ExecuteInternalAsync(Object[] arguments, CancellationTokenSource timeoutTokenSource)
    
failed DownloadText_GeneratesTextFile_WhenCuesheetIsValidAsync (1m 57s 067ms)
  from /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.End2EndTests/bin/Debug/net10.0/AudioCuesheetEditor.End2EndTests.dll (net10.0|x64)
  Test method AudioCuesheetEditor.End2EndTests.Tests.Smartphone.ExportTest.DownloadText_GeneratesTextFile_WhenCuesheetIsValidAsync threw exception:
  System.TimeoutException: Timeout 30000ms exceeded.
  Call log:
    - waiting for Locator("tbody tr:not([aria-hidden='true'])").Nth(10).Locator("td[data-label='Begin']")
      - locator resolved to <td data-label="Begin" class="mud-table-cell edit-mode-cell">…</td>
    - attempting click action
      2 × waiting for element to be visible, enabled and stable
        - element is visible, enabled and stable
        - scrolling into view if needed
        - done scrolling
        - <p class="mud-typography mud-typography-body1">Open The Pit (Intro To “Mortal Kombat 11”)</p> from <div class="mud-popover-provider">…</div> subtree intercepts pointer events
      - retrying click action
      - waiting 20ms
      2 × waiting for element to be visible, enabled and stable
        - element is visible, enabled and stable
        - scrolling into view if needed
        - done scrolling
        - <p class="mud-typography mud-typography-body1">Open The Pit (Intro To “Mortal Kombat 11”)</p> from <div class="mud-popover-provider">…</div> subtree intercepts pointer events
      - retrying click action
        - waiting 100ms
      51 × waiting for element to be visible, enabled and stable
         - element is visible, enabled and stable
         - scrolling into view if needed
         - done scrolling
         - <p class="mud-typography mud-typography-body1">Open The Pit (Intro To “Mortal Kombat 11”)</p> from <div class="mud-popover-provider">…</div> subtree intercepts pointer events
       - retrying click action
         - waiting 500ms
    at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](ChannelOwner object, String method, Dictionary`2 dictionary, Boolean keepNulls, Nullable`1 timeout) in /_/src/Playwright/Transport/Connection.cs:229
    at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func`1 action, Boolean isInternal, String title) in /_/src/Playwright/Transport/Connection.cs:535
    at AudioCuesheetEditor.End2EndTests.Models.DetailView.EditTrackFieldAsync(Int32 trackPosition, String dataLabel, String value) in /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.End2EndTests/Models/DetailView.cs:127
    at AudioCuesheetEditor.End2EndTests.Models.DetailView.EditTrackAsync(String artist, String title, Nullable`1 begin, Nullable`1 end, Int32 trackPosition) in /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.End2EndTests/Models/DetailView.cs:67
    at AudioCuesheetEditor.End2EndTests.Tests.Smartphone.ExportTest.DownloadText_GeneratesTextFile_WhenCuesheetIsValidAsync() in /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.End2EndTests/Tests/Smartphone/ExportTest.cs:114
    at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.ExecuteInternalAsync(Object[] arguments, CancellationTokenSource timeoutTokenSource)
    
/home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.End2EndTests/bin/Debug/net10.0/AudioCuesheetEditor.End2EndTests.dll (net10.0|x64) failed with 2 error(s) (2m 52s 615ms)
Exit code: 2

Test run summary: Failed!
  /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.Tests/bin/Debug/net10.0/AudioCuesheetEditor.Tests.dll (net10.0|x64) passed (1s 136ms)
  /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.End2EndTests/bin/Debug/net10.0/AudioCuesheetEditor.End2EndTests.dll (net10.0|x64) failed with 2 error(s) (2m 52s 615ms)

  total: 254
  failed: 2
  succeeded: 252
  skipped: 0
  duration: 2m 53s 009ms
Test run completed with non-success exit code: 2 (see: https://aka.ms/testingplatform/exitcodes)
Error: Process completed with exit code 2.


Activity

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

Metadata

Metadata

Labels

bugSomething isn't workingreview neededThis issue needs a review (more description, maybe wrong idea)

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions