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

test: add integration test in avatarMenu component #352

Merged
merged 2 commits into from
Oct 27, 2018

Conversation

cmcartaya
Copy link
Collaborator

fix: #332 #334

browser.keys(ESCAPE_KEY);
expect(avatarMenu.hasFocusButton()).toBe(true);
});
it('should open the menu when the button is focused and press Space', () => {

Choose a reason for hiding this comment

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

remove this

browser.keys(SPACE_KEY);
expect(avatarMenu.isOpen()).toBe(true);
});
it('should open the menu when the button is focused and press Enter', () => {

Choose a reason for hiding this comment

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

remove this

const firstMenuItem = avatarMenu.getItem(0);
const lastMenuItem = avatarMenu.getItem(1);
avatarMenu.click();
firstMenuItem.hover();

Choose a reason for hiding this comment

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

here you don't need to put the focus to the first item again since initially the focus is there

const avatarMenu = new PageAvatarMenu(AVATAR_MENU);
avatarMenu.click();
browser.keys(TAB_KEY);
expect(avatarMenu.isOpen()).toBe(false);

Choose a reason for hiding this comment

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

add:
expect(avatarMenu.hasFocusButton()).toBe(false);
and then update the name:
should close the menu and not have focus in the trigger menu button when the menu is opened and press the tab key

@coveralls
Copy link

Pull Request Test Coverage Report for Build 30

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 74.162%

Totals Coverage Status
Change from base Build 25: 0.0%
Covered Lines: 1057
Relevant Lines: 1356

💛 - Coveralls

@LeandroTorresSicilia LeandroTorresSicilia merged commit 87003e2 into master Oct 27, 2018
@TahimiLeonBravo TahimiLeonBravo deleted the avatarMenu-int-test branch September 23, 2019 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: add the test to the avatarMenu component
3 participants