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(tests): fix e2e tests for the Typeahead demo #5644

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cypress/full/typeahead_page_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ describe('Typeahead demo page test suite', () => {
typeahead.isElementVisible(asyncData, typeahead.cardHeader);
typeahead.isPreviewExist(asyncData, formTemplate);
typeahead.isElementVisible(asyncData, typeahead.inputSelector);
typeahead.isInputHaveAttrs(asyncData, [{ attr: 'placeholder', value: 'Locations loaded with timeout' }]);
typeahead.isInputHaveAttrs(asyncData, [{ attr: 'placeholder', value: 'Locations loaded via observable' }]);
});

it('when user starts to type a name of a State a drop-down with matches is shown, only 7 matches are shown',
it('when user starts to type a name of a State a drop-down with matches is shown, only 20 matches are shown',
() => {
typeahead.clearInputAndSendKeys(asyncData, 'a');
typeahead.isElementVisible(asyncData, typeahead.activeDropdown);
typeahead.isDropdownHasNItems(typeahead.dropdownBtn, 7);
typeahead.isDropdownHasNItems(typeahead.dropdownBtn, 20);
});

it('when user clicks on any item in typeahead drop-down, then typeahead container auto-fills with a selected State',
Expand Down Expand Up @@ -436,7 +436,7 @@ describe('Typeahead demo page test suite', () => {
typeahead.isElementVisible(scrollable, typeahead.inputSelector);
});

it.only(`when there are any matches then a drop-down with a list of States matches is shown. user is able to scroll
it(`when there are any matches then a drop-down with a list of States matches is shown. user is able to scroll
down/up to see the matches list`, () => {
typeahead.clearInputAndSendKeys(scrollable, textToInput);
typeahead.isElementVisible(scrollable, typeahead.activeDropdown);
Expand Down