change header dropdown behaviour
This commit is contained in:
parent
15bd48ce3b
commit
ef823df8eb
|
|
@ -25,7 +25,7 @@ describe("Top Navigation", () => {
|
|||
showSubscribeToUpdates()
|
||||
})
|
||||
|
||||
it("not allowed to projected page", () => {
|
||||
it("not allowed to protected page", () => {
|
||||
cy.visit('/friends')
|
||||
cy.url().should('include', '/authentication/basic/login')
|
||||
cy.contains("Sign in")
|
||||
|
|
@ -47,7 +47,7 @@ describe("Top Navigation", () => {
|
|||
})
|
||||
|
||||
it('sign out', () => {
|
||||
cy.get('[data-testid=navbarTopProfileDropdown]').contains('Peter Pan').trigger('mouseover')
|
||||
cy.get('[data-testid=navbarTopProfileDropdown]').contains('Peter Pan').click()
|
||||
cy.stubUnauthenticate()
|
||||
cy.get('[data-testid=navbarTopProfileDropdown]').contains('Sign Out').click()
|
||||
cy.get('[data-testid=navbarTopProfileDropdown]').should('not.exist')
|
||||
|
|
@ -65,7 +65,7 @@ describe("Top Navigation", () => {
|
|||
|
||||
it('shows notifications', () => {
|
||||
cy.get('[data-testid=notificationDropdown]').should('not.be.visible')
|
||||
cy.get('.notification-indicator').trigger('mouseover')
|
||||
cy.get('.notification-indicator').click()
|
||||
cy.get('[data-testid=notificationDropdown]').should('be.visible')
|
||||
cy.get('[data-testid=notificationDropdown] .list-group-item').should('have.length', 3)
|
||||
cy.get('[data-testid=notificationDropdown]').contains('View all').click() //view all notifications
|
||||
|
|
|
|||
|
|
@ -60,14 +60,14 @@ const JKNotificationDropdown = () => {
|
|||
className="mx-3"
|
||||
isOpen={isOpen}
|
||||
toggle={handleToggle}
|
||||
onMouseOver={() => {
|
||||
let windowWidth = window.innerWidth;
|
||||
windowWidth > 992 && setIsOpen(true);
|
||||
}}
|
||||
onMouseLeave={() => {
|
||||
let windowWidth = window.innerWidth;
|
||||
windowWidth > 992 && setIsOpen(false);
|
||||
}}
|
||||
// onMouseOver={() => {
|
||||
// let windowWidth = window.innerWidth;
|
||||
// windowWidth > 992 && setIsOpen(true);
|
||||
// }}
|
||||
// onMouseLeave={() => {
|
||||
// let windowWidth = window.innerWidth;
|
||||
// windowWidth > 992 && setIsOpen(false);
|
||||
// }}
|
||||
>
|
||||
<DropdownToggle
|
||||
nav
|
||||
|
|
|
|||
|
|
@ -34,14 +34,14 @@ const ProfileDropdown = () => {
|
|||
data-testid="navbarTopProfileDropdown"
|
||||
isOpen={dropdownOpen}
|
||||
toggle={toggle}
|
||||
onMouseOver={() => {
|
||||
let windowWidth = window.innerWidth;
|
||||
windowWidth > 992 && setDropdownOpen(true);
|
||||
}}
|
||||
onMouseLeave={() => {
|
||||
let windowWidth = window.innerWidth;
|
||||
windowWidth > 992 && setDropdownOpen(false);
|
||||
}}
|
||||
// onMouseOver={() => {
|
||||
// let windowWidth = window.innerWidth;
|
||||
// windowWidth > 992 && setDropdownOpen(true);
|
||||
// }}
|
||||
// onMouseLeave={() => {
|
||||
// let windowWidth = window.innerWidth;
|
||||
// windowWidth > 992 && setDropdownOpen(false);
|
||||
// }}
|
||||
>
|
||||
<DropdownToggle nav className="pr-0">
|
||||
<JKProfileAvatar url={currentUser.photo_url} className="d-block d-lg-none d-xl-none" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue