Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
8592a4a5
Unverified
Commit
8592a4a5
authored
Jul 24, 2023
by
Nate Wienert
Committed by
GitHub
Jul 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: flaky test covering searchbar (#7002)
fix flaky test covering searchbar
parent
ccc94fdf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
18 deletions
+29
-18
universal-search.test.ts
cypress/e2e/universal-search.test.ts
+29
-18
No files found.
cypress/e2e/universal-search.test.ts
View file @
8592a4a5
...
...
@@ -25,31 +25,42 @@ describe('Universal search bar', () => {
cy
.
location
(
'
hash
'
).
should
(
'
equal
'
,
'
#/tokens/ethereum/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984
'
)
})
it
(
'
should go to the selected result when recent results are shown
'
,
()
=>
{
// Search for uni token by name.
getSearchBar
().
type
(
'
uni
'
)
cy
.
get
(
'
[data-cy="searchbar-token-row-UNI"]
'
)
it
(
'
should go to the selected result when recent results are shown
'
,
// this test is experiencing flake despite being correct, i can see the right value in DOM
// but for some reason cypress doesn't find it, so adding retries for now :/
{
retries
:
{
runMode
:
3
,
openMode
:
3
,
},
},
()
=>
{
// Search for uni token by name.
getSearchBar
().
type
(
'
uni
'
)
cy
.
get
(
'
[data-cy="searchbar-token-row-UNI"]
'
)
// Clear search
getSearchBar
().
clear
()
// Clear search
getSearchBar
().
clear
()
// Close search
getSearchBar
().
type
(
'
{esc}
'
)
// Close search
getSearchBar
().
type
(
'
{esc}
'
)
openSearch
()
openSearch
()
// Search a different token by name.
getSearchBar
().
type
(
'
eth
'
)
// Search a different token by name.
getSearchBar
().
type
(
'
eth
'
)
// Validate ETH result now exists.
cy
.
get
(
'
[data-cy="searchbar-token-row-ETH"]
'
)
// Validate ETH result now exists.
cy
.
get
(
'
[data-cy="searchbar-token-row-ETH"]
'
)
// Hit enter
getSearchBar
().
type
(
'
{enter}
'
)
// Hit enter
getSearchBar
().
type
(
'
{enter}
'
)
// Validate we went to ethereum address
cy
.
url
().
should
(
'
contain
'
,
'
tokens/ethereum/NATIVE
'
)
})
// Validate we went to ethereum address
cy
.
url
().
should
(
'
contain
'
,
'
tokens/ethereum/NATIVE
'
)
}
)
it
.
skip
(
'
should show recent tokens and popular tokens with empty search term
'
,
()
=>
{
cy
.
get
(
'
[data-cy="magnifying-icon"]
'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment