Skip to content

Commit

Permalink
Tests: Fix tests (safe-global#3960)
Browse files Browse the repository at this point in the history
* Fix tests
  • Loading branch information
mike10ca authored Jul 17, 2024
1 parent e66e95f commit 6bc0ef7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions cypress/e2e/pages/swaps.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,10 @@ function selectCurrency(inputSelector, option) {
cy.get(inputSelector).within(() => {
cy.get('button')
.eq(0)
.find('span')
.invoke('text')
.then(($value) => {
cy.log('*** Currency value ' + $value)
if ($value != option) {
if (!$value.includes(option)) {
cy.log('*** Currency value is different from specified')
cy.get('button').eq(0).trigger('mouseover').trigger('click')
cy.wrap(true).as('isAction')
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/regression/create_safe_simple.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ describe('Safe creation tests', () => {
main.addToLocalStorage(constants.localStorageKeys.SAFE_v2__addressBook, ls.addressBookData.sameOwnerName),
)
.then(() => {
wallet.connectSigner(signer)
createwallet.clickOnContinueWithWalletBtn()
createwallet.clickOnCreateNewSafeBtn()
createwallet.clickOnNextBtn()
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/regression/nfts.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ describe('NFTs tests', () => {

it('Verify Send NFT transaction has been created', () => {
cy.visit(constants.balanceNftsUrl + nftsSafes.SEP_NFT_SAFE_1)
wallet.connectSigner(signer)
nfts.verifyInitialNFTData()
nfts.selectNFTs(1)
nfts.sendNFT()
Expand Down
6 changes: 4 additions & 2 deletions cypress/e2e/regression/swaps.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('Swaps tests', () => {
swaps.setInputValue(4)
swaps.selectOutputCurrency(swaps.swapTokens.dai)
swaps.checkSwapBtnIsVisible()
swaps.isInputGreaterZero(swaps.outputurrencyInput).then((isGreaterThanZero) => {
swaps.isInputGreaterZero(swaps.outputCurrencyInput).then((isGreaterThanZero) => {
cy.wrap(isGreaterThanZero).should('be.true')
})
swaps.clickOnExceeFeeChkbox()
Expand Down Expand Up @@ -142,8 +142,9 @@ describe('Swaps tests', () => {
swaps.setExpiry('2')
swaps.clickOnSettingsBtn()
swaps.setInputValue(4)
swaps.selectOutputCurrency(swaps.swapTokens.dai)
swaps.checkSwapBtnIsVisible()
swaps.isInputGreaterZero(swaps.outputurrencyInput).then((isGreaterThanZero) => {
swaps.isInputGreaterZero(swaps.outputCurrencyInput).then((isGreaterThanZero) => {
cy.wrap(isGreaterThanZero).should('be.true')
})
swaps.clickOnExceeFeeChkbox()
Expand Down Expand Up @@ -173,6 +174,7 @@ describe('Swaps tests', () => {
cy.wrap($frame).within(() => {
swaps.selectInputCurrency(swaps.swapTokens.cow)
swaps.setInputValue(4)
swaps.selectOutputCurrency(swaps.swapTokens.dai)
swaps.checkSwapBtnIsVisible()
swaps.clickOnSettingsBtn()

Expand Down

0 comments on commit 6bc0ef7

Please sign in to comment.