Skip to content

Commit

Permalink
Fix hanging test
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Baldwin committed Jan 19, 2024
1 parent f5e235d commit a382084
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ jobs:
- { name: "ruff", python: "3.11", os: ubuntu-latest, tox: "ruff" }
- { name: "mypy", python: "3.10", os: ubuntu-latest, tox: "mypy" }
# run some integration tests and abort immediately if they fail, for faster feedback
- { name: "fail_fast_test_main", python: "3.12", os: ubuntu-latest, tox: fail_fast_test_main }
- {
name: "fail_fast_test_main",
python: "3.12",
os: ubuntu-latest,
tox: fail_fast_test_main,
}
- { name: "3.12", python: "3.12", os: ubuntu-latest, tox: py312 }
- { name: "3.11", python: "3.11", os: ubuntu-latest, tox: py311 }
- { name: "3.10", python: "3.10", os: ubuntu-latest, tox: py310 }
Expand Down Expand Up @@ -47,7 +52,7 @@ jobs:
- run: python -m pip install tox
- run: python -m tox -e ${{ matrix.tox }}

lint_typecheck_webui:
lint_typecheck_test_webui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('SwarmForm', () => {
fireEvent.click(getByRole('button', { name: 'Save' }));
});

await waitFor(async () => {
waitFor(() => {
const submittedData = updateUserSettings.mock.calls[0][0];
if (submittedData) {
expect(submittedData).toEqual({ ...mockUsers.Example, userClassName: 'Example' });
Expand Down Expand Up @@ -152,7 +152,7 @@ describe('SwarmForm', () => {
fireEvent.click(getByRole('button', { name: 'Save' }));
});

await waitFor(async () => {
waitFor(() => {
const submittedData = updateUserSettings.mock.calls[0][0];
if (submittedData) {
expect(submittedData).toEqual({ ...updatedUser, userClassName: 'Example' });
Expand Down

0 comments on commit a382084

Please sign in to comment.