-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into kyberai-filter-sort
- Loading branch information
Showing
183 changed files
with
6,924 additions
and
2,702 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,5 @@ | |
} | ||
] | ||
], | ||
"plugins": ["macros"] | ||
"plugins": ["macros", "lodash"] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { FarmLocators, HeaderLocators } from "../selectors/selectors.cy" | ||
|
||
export class FarmPage { | ||
|
||
getTvlValues() { | ||
const arr: string[] = [] | ||
const listData = cy.get(FarmLocators.lblTvl) | ||
listData | ||
.each(item => { | ||
arr.push(item.text().split('$')[1]) | ||
}) | ||
return arr | ||
} | ||
|
||
getAprValues() { | ||
const arr: string[] = [] | ||
const listData = cy.get(FarmLocators.lblApr) | ||
listData | ||
.each(item => { | ||
arr.push(item.text().split('%')[0]) | ||
}) | ||
return arr | ||
} | ||
|
||
countInvalidFarms(arrApr: string[], arrTvl: string[]) { | ||
const totalFarms = arrApr.length | ||
let count = 0; | ||
for (let i = 0; i < totalFarms; i++) { | ||
if (((arrTvl[i]) === undefined || Number(arrTvl[i]) === 0) && Number(arrApr[i]) === 0) { | ||
count = count + 1; | ||
} | ||
} | ||
return count | ||
} | ||
|
||
checkExistData() { | ||
return cy.get(FarmLocators.lblApr, {timeout: 5000}).should(() => { }).then($obj => { | ||
if ($obj.length > 0) { | ||
return true | ||
} | ||
else { | ||
return false | ||
} | ||
}) | ||
} | ||
} |
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
Oops, something went wrong.