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

Mitigate failed test cleanups by logging in if the user already exists #399

Merged
merged 4 commits into from
Feb 13, 2025

Conversation

jmoggr
Copy link
Collaborator

@jmoggr jmoggr commented Feb 12, 2025

Closes #395

This does cause the following test to sometimes fail:

    const defaultProfile = unwrap(await rpc.get_active_user_profile.query());
    test.sequential("should get empty profile after user creation", () => {
        assert.strictEqual(defaultProfile.username, null);
        assert.strictEqual(defaultProfile.displayName, null);
    });

ideas:

  • this test might not be that important, so it could be removed
  • conditionally perform this test if the account was actually created

@jmoggr jmoggr added the bug Something isn't working label Feb 12, 2025
@jmoggr jmoggr requested a review from epatters February 12, 2025 23:10
Copy link

github-actions bot commented Feb 12, 2025

Copy link
Member

@epatters epatters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this will notably improve the robustness of the tests!

  • To your question about the test that now sometimes fails, I'm fine with just deleting it since get_active_user_profile will still be tested elsewhere, which seems the most important thing.
  • As a GitHub thing, if you write "Closes [my issue number]" instead of "Addresses [my issue number]", merging the PR will automatically close the issue, which is convenient

@epatters epatters added the frontend TypeScript frontend and Rust-wasm integrations label Feb 13, 2025
@epatters epatters force-pushed the fix-user-creation-in-tests branch from b61c4f3 to 1d25d78 Compare February 13, 2025 18:31
@epatters epatters merged commit 01c1b8c into main Feb 13, 2025
10 checks passed
@epatters epatters deleted the fix-user-creation-in-tests branch February 13, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend TypeScript frontend and Rust-wasm integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vite test runner cleanup unreliable
2 participants