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

Refactor internal frame tracking & time handling #29

Merged
merged 19 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
switch CI back to ubuntu-latest & stop using Task.Delay to wait on st…
…ate/component changes in tests
  • Loading branch information
DavidVollmers committed Sep 27, 2023
commit 5fda6e3790c9f993545a2d0519f1e24e2c6a1231
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

jobs:
Test:
runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
Expand Down
6 changes: 2 additions & 4 deletions tests/Ignis.Tests.Components.HeadlessUI/DialogTests.razor
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,12 @@
var openButton = cut.Find($"#{openButtonId}");
openButton.Click();

await Task.Delay(400);

var closeButton = cut.Find($"#{closeButtonId}");
var closeButton = cut.WaitForElement($"#{closeButtonId}");
Assert.True(outlet.Contains(closeButton));

closeButton.Click();

await Task.Delay(300);
await Task.Delay(400);

outlet = cut.Find($"#{outletId}");
Assert.Empty(outlet.Children);
Expand Down
17 changes: 8 additions & 9 deletions tests/Ignis.Tests.Components.HeadlessUI/ListboxTests.razor
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,26 @@
Services.AddSingleton<IHostContext, TestHostContext>();

JSInterop.Mode = JSRuntimeMode.Loose;

const string openButtonId = "open-button";
const string listboxButtonId = "listbox-button";
const string intOptionId = nameof(Int32);

var cut = Render(@<ListboxInDialogTest></ListboxInDialogTest>);

var openButton = cut.Find($"#{openButtonId}");
openButton.Click();

await Task.Delay(400);

var listboxButton = cut.Find($"#{listboxButtonId}");
var listboxButton = cut.WaitForElement($"#{listboxButtonId}");
listboxButton.Click();

var intOption = cut.Find($"#{intOptionId}");
intOption.Click();

await Task.Delay(200);

var listbox = cut.FindComponent<Listbox<Type>>();
Assert.Equal(typeof(int), listbox.Instance.Value);
cut.WaitForAssertion(() =>
{
var listbox = cut.FindComponent<Listbox<Type>>();
Assert.Equal(typeof(int), listbox.Instance.Value);
});
}
}