Skip to content

refactor(site): refactor external auth component #11758

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 3 commits into from
Jan 23, 2024

Conversation

BrunoQuaresma
Copy link
Collaborator

Recommended improvements:

  • Rename component for clarity
  • Simplify interface for contextual relevance
  • Handle polling errors based on section, not every button

Before:
Screenshot 2024-01-22 at 15 24 26

Now:
Screenshot 2024-01-22 at 15 24 41

Copy link
Member

@Parkreiner Parkreiner left a comment

Choose a reason for hiding this comment

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

Code looks good, and big fan of the change!

jest
.spyOn(API, "getTemplateVersionExternalAuth")
.mockResolvedValueOnce([MockTemplateVersionExternalAuthGithub]);

renderCreateWorkspacePage();
await waitForLoaderToBeRemoved();

const nameField = await screen.findByLabelText(nameLabelText);

// have to use fireEvent b/c userEvent isn't cleaning up properly between tests
Copy link
Member

@Parkreiner Parkreiner Jan 23, 2024

Choose a reason for hiding this comment

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

I know that we have the test simplified down now, so this comment wouldn't even be relevant anymore, but do you know if we ever figured out the userEvent issue? This is the first I've heard of it not cleaning up properly, but some digging made it sounds like it was a bug with the library

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't know, to be honest, I just removed it from here because we don't need to fill in the name input to see the error.

@BrunoQuaresma BrunoQuaresma merged commit 910f17f into main Jan 23, 2024
@BrunoQuaresma BrunoQuaresma deleted the bq/refactor-external-auth-api branch January 23, 2024 15:26
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2024
@BrunoQuaresma
Copy link
Collaborator Author

Related to #11742

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants