Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Update skipped tests #2723

Merged
merged 4 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions cypress/e2e/pages/dashboard.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,8 @@ export function verifyFeaturedAppsSection() {
cy.contains(transactionBuilderStr)
cy.get(txBuilder).should('exist')

// WalletConnect app
cy.contains(walletConnectStr)
cy.get(walletConnect).should('exist')

// Featured apps have a Safe-specific link
cy.get(safeSpecificLink).should('have.length', 2)
cy.get(safeSpecificLink).should('have.length', 1)
})
}

Expand Down
6 changes: 4 additions & 2 deletions cypress/e2e/pages/nfts.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ export function verifyDataInTable(name, address, tokenID) {
cy.get('tbody tr:first-child').contains('td:nth-child(2)', tokenID)
}

export function openFirstNFT() {
cy.get('tbody tr:first-child td:nth-child(2)').click()
export function openNFT(index) {
cy.get('tbody').within(() => {
cy.get('tr').eq(index).click()
})
}

export function verifyNameInNFTModal(name) {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/pages/safeapps.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function verifyDisclaimerIsVisible() {
}

export function clickOnContinueBtn() {
return cy.findByRole('button', { name: continueBtnStr }).click()
return cy.findByRole('button', { name: continueBtnStr }).click().wait(1000)
}

export function verifyCameraCheckBoxExists() {
Expand Down
5 changes: 3 additions & 2 deletions cypress/e2e/safe-apps/browser_permissions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ describe('Browser permissions tests', () => {
safe_apps_permissions: ['camera', 'microphone'],
})
})
cy.visitSafeApp(`${constants.testAppUrl}/app`)
main.acceptCookies(1)
})

it('Verify a permissions slide to the user is displayed [C56137]', () => {
cy.visitSafeApp(`${constants.testAppUrl}/app`)
main.acceptCookies()
safeapps.clickOnContinueBtn()
safeapps.verifyCameraCheckBoxExists()
safeapps.verifyMicrofoneCheckBoxExists()
Expand All @@ -29,6 +29,7 @@ describe('Browser permissions tests', () => {
safeapps.clickOnContinueBtn()
safeapps.verifyWarningDefaultAppMsgIsDisplayed()
safeapps.verifyCameraCheckBoxExists()
safeapps.clickOnContinueBtn()
safeapps.clickOnContinueBtn().should(() => {
expect(window.localStorage.getItem(constants.BROWSER_PERMISSIONS_KEY)).to.eq(safeapps.localStorageItem)
})
Expand Down
6 changes: 2 additions & 4 deletions cypress/e2e/safe-apps/safe_permissions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import * as safeapps from '../pages/safeapps.pages'
import * as main from '../pages/main.page'

describe('Safe permissions system tests', () => {
before(() => {
cy.clearLocalStorage()
})
beforeEach(() => {
cy.clearLocalStorage()
cy.fixture('safe-app').then((html) => {
cy.intercept('GET', `${constants.testAppUrl}/*`, html)
cy.intercept('GET', `*/manifest.json`, {
Expand Down Expand Up @@ -58,7 +56,7 @@ describe('Safe permissions system tests', () => {
})

cy.visitSafeApp(constants.testAppUrl + constants.getPermissionsUrl)
main.acceptCookies()
main.acceptCookies(1)
safeapps.clickOnContinueBtn()
safeapps.verifyWarningDefaultAppMsgIsDisplayed()
safeapps.clickOnContinueBtn()
Expand Down
12 changes: 6 additions & 6 deletions cypress/e2e/smoke/dashboard.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ import * as dashboard from '../pages/dashboard.pages'
import * as main from '../pages/main.page'

describe('Dashboard tests', () => {
before(() => {
beforeEach(() => {
cy.clearLocalStorage()
cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_5)
main.acceptCookies()
main.acceptCookies(2)
main.clickOnSideMenuItem(constants.mainSideMenuOptions.home)
dashboard.verifyConnectTransactStrIsVisible()
})

it.skip('Verify the overview widget is displayed [C56107]', () => {
it('Verify the overview widget is displayed [C56107]', () => {
dashboard.verifyOverviewWidgetData()
})

it.skip('Verify the transaction queue widget is displayed [C56108]', () => {
it('Verify the transaction queue widget is displayed [C56108]', () => {
dashboard.verifyTxQueueWidget()
})

it.skip('Verify the featured Safe Apps are displayed [C56109]', () => {
it('Verify the featured Safe Apps are displayed [C56109]', () => {
dashboard.verifyFeaturedAppsSection()
})

it.skip('Verify the Safe Apps Section is displayed [C56110]', () => {
it('Verify the Safe Apps Section is displayed [C56110]', () => {
dashboard.verifySafeAppsSection()
})
})
16 changes: 8 additions & 8 deletions cypress/e2e/smoke/nfts.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,34 @@ const nftsAddress = '0x373B...866c'
const nftsTokenID = 'CF'

describe('NFTs tests', () => {
before(() => {
beforeEach(() => {
cy.clearLocalStorage()
cy.visit(constants.BALANCE_URL + constants.SEPOLIA_TEST_SAFE_5)
main.acceptCookies()
main.acceptCookies(2)
nfts.clickOnNftsTab()
})

it.skip('Verify that NFTs exist in the table [C56123]', () => {
it('Verify that NFTs exist in the table [C56123]', () => {
nfts.verifyNFTNumber(20)
})

it.skip('Verify NFT row contains data [C56124]', () => {
it('Verify NFT row contains data [C56124]', () => {
nfts.verifyDataInTable(nftsName, nftsAddress, nftsTokenID)
})

it.skip('Verify NFT preview window can be opened [C56125]', () => {
nfts.openFirstNFT()
it('Verify NFT preview window can be opened [C56125]', () => {
nfts.openNFT(1)
nfts.verifyNameInNFTModal(nftsTokenID)
nfts.verifySelectedNetwrokSepolia()
nfts.closeNFTModal()
})

it.skip('Verify NFT open does not open if no NFT exits [C56126]', () => {
it('Verify NFT open does not open if no NFT exits [C56126]', () => {
nfts.clickOn6thNFT()
nfts.verifyNFTModalDoesNotExist()
})

it.skip('Verify multipls NFTs can be selected and reviewed [C56127]', () => {
it('Verify multipls NFTs can be selected and reviewed [C56127]', () => {
nfts.verifyInitialNFTData()
nfts.selectNFTs(3)
nfts.deselectNFTs([2], 3)
Expand Down
115 changes: 17 additions & 98 deletions cypress/e2e/smoke/tx_history.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ import * as constants from '../../support/constants'
import * as main from '../pages/main.page'
import * as createTx from '../pages/create_tx.pages'

const INCOMING = 'Received'
const OUTGOING = 'Sent'
const CONTRACT_INTERACTION = 'Contract interaction'

const str1 = 'Received'
const str2 = 'Executed'
const str3 = 'Transaction hash'

describe('Transaction history tests', () => {
before(() => {
beforeEach(() => {
cy.clearLocalStorage()
// Go to the test Safe transaction history
cy.visit(constants.transactionsHistoryUrl + constants.SEPOLIA_TEST_SAFE_5)
Expand All @@ -22,110 +20,31 @@ describe('Transaction history tests', () => {
main.acceptCookies(1)
})

//Skipping this due to test data creation
it.skip('Verify October 9th transactions are displayed [C56128]', () => {
const DATE = 'Oct 9, 2023'
const NEXT_DATE_LABEL = 'Oct 11, 2023'
const amount = '0.1 ETH'
const amount2 = '15 TT_A'
const amount3 = '21 TT_B'
const amount4 = '82 DAI'
const amount5 = '73 USDC'
const amount6 = '27 AAVE'
const amount7 = '35.94 LINK'
const amount8 = '< 0.00001 ETH'
const time = '2:56 AM'
const time2 = '12:59 AM'
const time3 = '1:00 AM'
const time4 = '1:01 AM'
it('Verify October 9th transactions are displayed [C56128]', () => {
const DATE = 'Oct 29, 2023'
const NEXT_DATE_LABEL = 'Oct 20, 2023'
const amount = '0.00001 ETH'
const time = '10:39 PM'
const success = 'Success'

createTx.verifyDateExists(DATE)
createTx.verifyDateExists(NEXT_DATE_LABEL)

main.scrollToBottomAndWaitForPageLoad()
// Transaction summaries from October 9th
const rows = cy.contains('div', DATE).nextUntil(`div:contains(${NEXT_DATE_LABEL})`)

rows.should('have.length', 3)
rows.should('have.length', 10)

rows
.last()
.prev()
.within(() => {
// Type
createTx.verifyImageAltTxt(0, INCOMING)
createTx.verifyStatus(constants.transactionStatus.received)
rows.eq(0).within(() => {
// Type
createTx.verifyImageAltTxt(0, OUTGOING)
createTx.verifyStatus(constants.transactionStatus.sent)

// Info
createTx.verifyImageAltTxt(1, constants.tokenAbbreviation.sep)
createTx.verifyTransactionStrExists(amount)
createTx.verifyTransactionStrExists(time)
createTx.verifyTransactionStrExists(success)
})
.prev()
.within(() => {
createTx.verifyImageAltTxt(0, INCOMING)
createTx.verifyStatus(constants.transactionStatus.received)
createTx.verifyImageAltTxt(1, constants.tokenAbbreviation.tta)
createTx.verifyTransactionStrExists(amount2)
createTx.verifyTransactionStrExists(time2)
createTx.verifyTransactionStrExists(success)
})
.prev()
.within(() => {
createTx.verifyImageAltTxt(0, INCOMING)
createTx.verifyStatus(constants.transactionStatus.received)
createTx.verifyImageAltTxt(1, constants.tokenAbbreviation.ttb)
createTx.verifyTransactionStrExists(amount3)
createTx.verifyTransactionStrExists(time2)
createTx.verifyTransactionStrExists(success)
})
.prev()
.within(() => {
createTx.verifyImageAltTxt(0, INCOMING)
createTx.verifyStatus(constants.transactionStatus.received)
createTx.verifyImageAltTxt(1, constants.tokenAbbreviation.dai)
createTx.verifyTransactionStrExists(amount4)
createTx.verifyTransactionStrExists(time2)
createTx.verifyTransactionStrExists(success)
})
.prev()
.within(() => {
createTx.verifyImageAltTxt(0, INCOMING)
createTx.verifyStatus(constants.transactionStatus.received)
createTx.verifyImageAltTxt(1, constants.tokenAbbreviation.usds)
createTx.verifyTransactionStrExists(amount5)
createTx.verifyTransactionStrExists(time3)
createTx.verifyTransactionStrExists(success)
})
.prev()
.within(() => {
createTx.verifyImageAltTxt(0, INCOMING)
createTx.verifyStatus(constants.transactionStatus.received)
createTx.verifyImageAltTxt(1, constants.tokenAbbreviation.aave)
createTx.verifyTransactionStrExists(amount6)
createTx.verifyTransactionStrExists(time3)
createTx.verifyTransactionStrExists(success)
})
.prev()
.within(() => {
createTx.verifyImageAltTxt(0, INCOMING)
createTx.verifyStatus(constants.transactionStatus.received)
createTx.verifyImageAltTxt(1, constants.tokenAbbreviation.link)
createTx.verifyTransactionStrExists(amount7)
createTx.verifyTransactionStrExists(time3)
createTx.verifyTransactionStrExists(success)
})
.prev()
.within(() => {
createTx.verifyImageAltTxt(0, INCOMING)
createTx.verifyStatus(constants.transactionStatus.received)
createTx.verifyImageAltTxt(1, constants.tokenAbbreviation.sep)
createTx.verifyTransactionStrExists(amount8)
createTx.verifyTransactionStrExists(time4)
createTx.verifyTransactionStrExists(success)
})
// Info
createTx.verifyImageAltTxt(1, constants.tokenAbbreviation.sep)
createTx.verifyTransactionStrExists(amount)
createTx.verifyTransactionStrExists(time)
createTx.verifyTransactionStrExists(success)
})
})

it('Verify transaction can be expanded/collapsed [C56129]', () => {
Expand Down
Loading