-
Notifications
You must be signed in to change notification settings - Fork 933
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(blur): don't reset when tabbing between the input and button (#374)
* WIP: test coverage issues with onBlur * fixed existing jest tests, 100% coverage * Update downshift.js * Add data-toggle attribute to getButtonProps * Edit downshiftButtonIsActive in downshift.js
- Loading branch information
1 parent
f6e838b
commit 04635b2
Showing
6 changed files
with
113 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
describe('Semantic-UI', () => { | ||
before(() => { | ||
cy.visitStory('semantic-ui') | ||
}) | ||
|
||
beforeEach(() => { | ||
cy.getInStoryByTestId('semantic-ui-input').type('{selectAll}{del}') | ||
}) | ||
|
||
afterEach(() => { | ||
cy.getInStoryByTestId('semantic-ui-clear-button').click() | ||
}) | ||
|
||
it('does not reset when tabbing from input to button', () => { | ||
cy | ||
.getInStoryByTestId('semantic-ui-input') | ||
.type('Alg') | ||
.getInStoryByTestId('semantic-ui-toggle-button') | ||
.focus() | ||
.getInStoryByTestId('downshift-item-0') | ||
.click() | ||
.getInStoryByTestId('semantic-ui-input') | ||
.should('have.value', 'Algeria') | ||
}) | ||
|
||
it('does not reset when tabbing from button to input', () => { | ||
cy | ||
.getInStoryByTestId('semantic-ui-toggle-button') | ||
.click() | ||
.getInStoryByTestId('semantic-ui-input') | ||
.focus() | ||
.getInStoryByTestId('downshift-item-0') | ||
.click() | ||
.getInStoryByTestId('semantic-ui-input') | ||
.should('have.value', 'Afghanistan') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters