Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nastassia committed May 28, 2021
1 parent 4b116a1 commit f531a63
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ describe("MobileNavMenu", () => {

it("calls logout auth action on logout menu click", () => {
const wrapper = getWrapper({ user: { type: "NotAdmin" } })

const MobileLink = wrapper.find("MobileLink")
const length = MobileLink.length
// @ts-expect-error STRICT_NULL_CHECK
wrapper
.find("MobileLink")
.last()
.at(length - 2)
.props()
.onClick({
preventDefault: () => {},
Expand Down Expand Up @@ -115,9 +118,7 @@ describe("MobileNavMenu", () => {
const linkContainer = getMobileMenuLinkContainer("notAdmin")
const mobileSubmenuLinks = linkContainer.children()
let linkText = mobileSubmenuLinks.last().text()
expect(linkText).toContain("Account")

expect(linkText).toContain("Works for you")
expect(linkText).toContain("Get the app")
})
})

Expand Down

0 comments on commit f531a63

Please sign in to comment.