-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
strip leading and trailing quotes from search (#759)
- Loading branch information
1 parent
3182eba
commit 99f00d1
Showing
2 changed files
with
24 additions
and
4 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 |
---|---|---|
|
@@ -47,6 +47,9 @@ describe('Search component', () => { | |
const paystring = 'blunden$paystring.crypto.com' | ||
const paystringWithAt = '[email protected]' | ||
const validator = 'nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p' | ||
const addressWithQuotes = '"rGFuMiw48HdbnrUbkRYuitXTmfrDBNTCnX"' | ||
const addressWithSpace = ' rGFuMiw48HdbnrUbkRYuitXTmfrDBNTCnX ' | ||
const addressWithSingleQuote = '"rGFuMiw48HdbnrUbkRYuitXTmfrDBNTCnX' | ||
|
||
const hash = | ||
'59239EA78084F6E2F288473F8AE02F3E6FC92F44BDE59668B5CAE361D3D32838' | ||
|
@@ -73,6 +76,21 @@ describe('Search component', () => { | |
await flushPromises() | ||
expect(window.location.pathname).toEqual(`/accounts/${rippleAddress}`) | ||
|
||
input.instance().value = addressWithQuotes | ||
input.simulate('keyDown', { key: 'Enter' }) | ||
await flushPromises() | ||
expect(window.location.pathname).toEqual(`/accounts/${rippleAddress}`) | ||
|
||
input.instance().value = addressWithSingleQuote | ||
input.simulate('keyDown', { key: 'Enter' }) | ||
await flushPromises() | ||
expect(window.location.pathname).toEqual(`/accounts/${rippleAddress}`) | ||
|
||
input.instance().value = addressWithSpace | ||
input.simulate('keyDown', { key: 'Enter' }) | ||
await flushPromises() | ||
expect(window.location.pathname).toEqual(`/accounts/${rippleAddress}`) | ||
|
||
input.instance().value = rippleXAddress | ||
input.simulate('keyDown', { key: 'Enter' }) | ||
await flushPromises() | ||
|