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

Fix issue that requires multiple logout clicks #123

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

katybaulch
Copy link
Contributor

What's changed

Fix issue that requires multiple logout clicks

Proposed version

Please select the option below that is most relevant from the list below. This
will be used to generate the next tag version name during auto-tagging.

  • Skip auto-tagging
  • Patch
  • Minor version
  • Major version

Visit the Semver website to understand the
difference between MAJOR, MINOR, and PATCH versions.

Notes:

  • If none of these options are selected, auto-tagging will fail
  • Where multiple options are selected, the most senior option ticked will be
    used -- e.g. Major > Minor > Patch
  • If you are selecting the version in the list above using the textbox, make
    sure your selected option is marked [x] with no spaces in between the
    brackets and the x

@katybaulch katybaulch requested a review from a team as a code owner December 3, 2024 15:04
Copy link

linear bot commented Dec 3, 2024

Copy link
Contributor

@annaCPR annaCPR left a comment

Choose a reason for hiding this comment

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

Can we add a test for this?

@katybaulch
Copy link
Contributor Author

Can we add a test for this?

Done @annaCPR

@katybaulch katybaulch requested a review from annaCPR December 3, 2024 15:57
annaCPR
annaCPR previously requested changes Dec 3, 2024
Copy link
Contributor

@annaCPR annaCPR left a comment

Choose a reason for hiding this comment

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

Nearly there :)

src/tests/components/Logout.test.tsx Outdated Show resolved Hide resolved
vi.runAllTimers()

// Assert
expect(mockLogout).toHaveBeenCalledTimes(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

I also wonder if we could replace all these mocks with the fake API? have a look in the mocks directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that's a fab idea, though I don't think we have a logout route in our API?

Copy link
Collaborator

@PatFawbertMills PatFawbertMills left a comment

Choose a reason for hiding this comment

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

Looks good. I think a good candidate to talk about as a group as to how we want to approach the trickier tests whilst keeping them black boxed.

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

Successfully merging this pull request may close these issues.

3 participants