Skip to content

Commit

Permalink
Update test descriptions to match mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
mike10ca committed Nov 9, 2023
1 parent 1ea1877 commit cbe3d32
Show file tree
Hide file tree
Showing 25 changed files with 130 additions and 130 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/safe-apps/apps_list.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ describe('Safe Apps list tests', () => {
safeapps.verifyNoAppsTextPresent()
})

it('Verify apps can be pinned ', () => {
it('Verify apps can be pinned', () => {
safeapps.clearSearchAppInput()
safeapps.pinApp(safeapps.transactionBuilderStr)
safeapps.verifyPinnedAppCount(1)
})

it('Verify apps can be unpinned ', () => {
it('Verify apps can be unpinned', () => {
safeapps.pinApp(safeapps.transactionBuilderStr)
safeapps.pinApp(safeapps.transactionBuilderStr, false)
safeapps.verifyPinnedAppCount(0)
})

it('Verify there is an error when the app manifest is invalid ', () => {
it('Verify there is an error when the app manifest is invalid', () => {
cy.intercept('GET', constants.invalidAppUrl, {
name: constants.testAppData.name,
})
Expand All @@ -52,7 +52,7 @@ describe('Safe Apps list tests', () => {
safeapps.verifyAppNotSupportedMsg()
})

it('Verify an app can be added to the list within the custom apps section ', () => {
it('Verify an app can be added to the list within the custom apps section', () => {
cy.intercept('GET', constants.validAppUrlJson, {
name: constants.testAppData.name,
description: constants.testAppData.descr,
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/safe-apps/browser_permissions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ describe('Browser permissions tests', () => {
main.acceptCookies(1)
})

it('Verify a permissions slide to the user is displayed ', () => {
it('Verify a permissions slide to the user is displayed', () => {
safeapps.clickOnContinueBtn()
safeapps.verifyCameraCheckBoxExists()
safeapps.verifyMicrofoneCheckBoxExists()
})

it('Verify the selection can be changed, accepted and stored ', () => {
it('Verify the selection can be changed, accepted and stored', () => {
safeapps.verifyMicrofoneCheckBoxExists().click()
safeapps.clickOnContinueBtn()
safeapps.verifyWarningDefaultAppMsgIsDisplayed()
Expand Down
18 changes: 9 additions & 9 deletions cypress/e2e/safe-apps/drain_account.spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ describe('Drain Account tests', { defaultCommandTimeout: 12000 }, () => {
safeapps.clickOnContinueBtn()
})

it('Verify drain can be created [C56627]', () => {
it('Verify drain can be created', () => {
cy.enter(iframeSelector).then((getBody) => {
getBody().findByLabelText(safeapps.recipientStr).type(constants.SAFE_APP_ADDRESS_2)
getBody().findAllByText(safeapps.transferEverythingStr).click()
getBody().findAllByText('Test invalid string').click()
})
cy.findByRole('button', { name: safeapps.testTransfer1 })
cy.findByRole('button', { name: safeapps.testNativeTransfer2 })
})

it('Verify partial drain can be created [C56628]', () => {
it('Verify partial drain can be created', () => {
cy.enter(iframeSelector).then((getBody) => {
getBody().findByLabelText(safeapps.selectAllRowsChbxStr).click()
getBody().findAllByLabelText(safeapps.selectRowChbxStr).eq(1).click()
Expand All @@ -40,7 +40,7 @@ describe('Drain Account tests', { defaultCommandTimeout: 12000 }, () => {
cy.findByRole('button', { name: safeapps.testNativeTransfer1 })
})

it('Verify a drain can be created when a ENS is specified [C56629]', () => {
it('Verify a drain can be created when a ENS is specified', () => {
cy.enter(iframeSelector).then((getBody) => {
getBody().findByLabelText(safeapps.recipientStr).type('goerli-test-safe.eth').wait(2000)
getBody().findAllByText(safeapps.transferEverythingStr).click()
Expand All @@ -50,7 +50,7 @@ describe('Drain Account tests', { defaultCommandTimeout: 12000 }, () => {
})

// TODO: Adjust safe - owner
it.skip('Verify when cancelling a drain, previous data is preserved [C56630]', () => {
it.skip('Verify when cancelling a drain, previous data is preserved', () => {
cy.enter(iframeSelector).then((getBody) => {
getBody().findByLabelText(safeapps.recipientStr).type(constants.SAFE_APP_ADDRESS_2)
getBody().findAllByText(safeapps.transferEverythingStr).click()
Expand All @@ -61,30 +61,30 @@ describe('Drain Account tests', { defaultCommandTimeout: 12000 }, () => {
})
})

it('Verify a drain cannot be created with no recipient selected [C56631]', () => {
it('Verify a drain cannot be created with no recipient selected', () => {
cy.enter(iframeSelector).then((getBody) => {
getBody().findAllByText(safeapps.transferEverythingStr).click()
getBody().findByText(safeapps.validRecipientAddressStr)
})
})

it('Verify a drain cannot be created with invalid recipient selected [C56632]', () => {
it('Verify a drain cannot be created with invalid recipient selected', () => {
cy.enter(iframeSelector).then((getBody) => {
getBody().findByLabelText(safeapps.recipientStr).type(constants.SAFE_APP_ADDRESS_2.substring(1))
getBody().findAllByText(safeapps.transferEverythingStr).click()
getBody().findByText(safeapps.validRecipientAddressStr)
})
})

it('Verify a drain cannot be created when no assets are selected [C56633]', () => {
it('Verify a drain cannot be created when no assets are selected', () => {
cy.enter(iframeSelector).then((getBody) => {
getBody().findByLabelText(safeapps.selectAllRowsChbxStr).click()
getBody().findByLabelText(safeapps.recipientStr).type(constants.SAFE_APP_ADDRESS_2)
getBody().findAllByText(safeapps.noTokensSelectedStr).should('be.visible')
})
})

it('should not allow to perform a drain when no assets and recipient are selected', () => {
it('Verify a drain cannot be created when no assets and recipient are selected', () => {
cy.enter(iframeSelector).then((getBody) => {
getBody().findByLabelText(safeapps.selectAllRowsChbxStr).click()
getBody().findAllByText(safeapps.noTokensSelectedStr).should('be.visible')
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/safe-apps/info_modal.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ describe('Info modal tests', () => {
main.acceptCookies()
})

it('Verify the disclaimer is displayed when a Safe App is opened ', () => {
it('Verify the disclaimer is displayed when a Safe App is opened', () => {
safeapps.clickOnApp(safeapps.transactionBuilderStr)
safeapps.clickOnOpenSafeAppBtn()
})

// Skip tests due to changed logic
// TODO: Discuss furthers
it.skip('Verify the permissions slide is shown if the app require permissions ', () => {
it.skip('Verify the permissions slide is shown if the app require permissions', () => {
safeapps.clickOnContinueBtn()
cy.wait(500) // wait for the animation to finish
safeapps.verifyCameraCheckBoxExists()
})

it.skip('Verify the permissions and consents decision are stored when accepted ', () => {
it.skip('Verify the permissions and consents decision are stored when accepted', () => {
safeapps.storeAndVerifyPermissions()
})
})
14 changes: 7 additions & 7 deletions cypress/e2e/safe-apps/permissions_settings.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('Permissions settings tests', () => {
main.acceptCookies()
})

it('Verify for each stored app the permissions configuration is shown ', () => {
it('Verify for each stored app the permissions configuration is shown', () => {
cy.findAllByRole('heading', { level: 5 }).should('have.length', 4)
})

Expand All @@ -60,7 +60,7 @@ describe('Permissions settings tests', () => {
})
})

it('Verify that app1 has camera, full screen and geo permissions ', () => {
it('Verify that app1 has camera, full screen and geo permissions', () => {
const app1Data = [
'app1',
safeapps.permissionCheckboxNames.camera,
Expand All @@ -74,7 +74,7 @@ describe('Permissions settings tests', () => {
main.verifyCheckboxeState(safeapps.permissionCheckboxes.fullscreen, 0, constants.checkboxStates.checked)
})

it('Verify that app2 has address book and microphone permissions ', () => {
it('Verify that app2 has address book and microphone permissions', () => {
const app2Data = [
'app2',
safeapps.permissionCheckboxNames.addressbook,
Expand All @@ -86,21 +86,21 @@ describe('Permissions settings tests', () => {
main.verifyCheckboxeState(safeapps.permissionCheckboxes.addressbook, 0, constants.checkboxStates.checked)
})

it('Verify that app3 has camera permissions ', () => {
it('Verify that app3 has camera permissions', () => {
const app3Data = ['app3', safeapps.permissionCheckboxNames.camera]

main.checkTextsExistWithinElement($dapps[2], app3Data)
main.verifyCheckboxeState(safeapps.permissionCheckboxes.camera, 1, constants.checkboxStates.unchecked)
})

it('Verify that app4 has address book permissions ', () => {
it('Verify that app4 has address book permissions', () => {
const app4Data = ['app4', safeapps.permissionCheckboxNames.addressbook]

main.checkTextsExistWithinElement($dapps[3], app4Data)
main.verifyCheckboxeState(safeapps.permissionCheckboxes.addressbook, 1, constants.checkboxStates.checked)
})

it('Verify Allow all or Clear all the checkboxes at once is permitted ', () => {
it('Verify Allow all or Clear all the checkboxes at once is permitted', () => {
safeapps.uncheckAllPermissions($dapps[1])
main.verifyCheckboxeState(safeapps.permissionCheckboxes.addressbook, 0, constants.checkboxStates.unchecked)
main.verifyCheckboxeState(safeapps.permissionCheckboxes.microphone, 0, constants.checkboxStates.unchecked)
Expand All @@ -110,7 +110,7 @@ describe('Permissions settings tests', () => {
main.verifyCheckboxeState(safeapps.permissionCheckboxes.microphone, 0, constants.checkboxStates.checked)
})

it('Verify it is permitted to remove apps and reflect it in the localStorage ', () => {
it('Verify it is permitted to remove apps and reflect it in the localStorage', () => {
cy.wrap($dapps[0]).find('svg').last().click()
cy.wrap($dapps[2])
.find('svg')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/safe-apps/preview_drawer.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Preview drawer tests', () => {
main.acceptCookies()
})

it('Verify the preview drawer is displayed when opening a Safe App from the app list ', () => {
it('Verify the preview drawer is displayed when opening a Safe App from the app list', () => {
safeapps.clickOnApp(safeapps.transactionBuilderStr)

cy.findByRole('presentation').within(() => {
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/safe-apps/safe_permissions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Safe permissions system tests', () => {
})
})

it('Verify that requesting permissions with wallet_requestPermissions shows the permissions prompt and return the permissions on accept ', () => {
it('Verify that requesting permissions with wallet_requestPermissions shows the permissions prompt and return the permissions on accept', () => {
cy.visitSafeApp(constants.testAppUrl + constants.requestPermissionsUrl)
main.acceptCookies(1)
safeapps.clickOnContinueBtn()
Expand All @@ -38,7 +38,7 @@ describe('Safe permissions system tests', () => {
})
})

it('Verify that trying to get the current permissions with wallet_getPermissions returns the current permissions ', () => {
it('Verify that trying to get the current permissions with wallet_getPermissions returns the current permissions', () => {
cy.on('window:before:load', (window) => {
window.localStorage.setItem(
constants.SAFE_PERMISSIONS_KEY,
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/safe-apps/tx_modal.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('Transaction modal tests', () => {
})

it(
'Verify that the transaction popup is displayed when sending a transaction from an app [C56747]',
'Verify that the transaction popup is displayed when sending a transaction from an app',
{ defaultCommandTimeout: 12000 },
() => {
cy.visitSafeApp(`${constants.testAppUrl}/dummy`)
Expand Down
20 changes: 10 additions & 10 deletions cypress/e2e/smoke/add_owner.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,35 @@ describe('Add Owners tests', () => {
cy.contains(owner.safeAccountNonceStr, { timeout: 10000 })
})

it('Verify the presence of "Add Owner" button [C56219]', () => {
it('Verify the presence of "Add Owner" button', () => {
owner.verifyAddOwnerBtnIsEnabled()
})

it('Verify “Add new owner” button tooltip displays correct message for Non-Owner [C56220]', () => {
it('Verify “Add new owner” button tooltip displays correct message for Non-Owner', () => {
cy.visit(constants.setupUrl + constants.SEPOLIA_TEST_SAFE_2)
owner.verifyAddOwnerBtnIsDisabled()
})

it('Verify Tooltip displays correct message for disconnected user [C56221]', () => {
it('Verify Tooltip displays correct message for disconnected user', () => {
owner.waitForConnectionStatus()
owner.clickOnWalletExpandMoreIcon()
owner.clickOnDisconnectBtn()
owner.verifyAddOwnerBtnIsDisabled()
})

it('Verify the Add New Owner Form can be opened [C56222]', () => {
it('Verify the Add New Owner Form can be opened', () => {
owner.waitForConnectionStatus()
owner.openAddOwnerWindow()
})

it('Verify error message displayed if character limit is exceeded in Name input [C56224]', () => {
it('Verify error message displayed if character limit is exceeded in Name input', () => {
owner.waitForConnectionStatus()
owner.openAddOwnerWindow()
owner.typeOwnerName(main.generateRandomString(51))
owner.verifyErrorMsgInvalidAddress(constants.addressBookErrrMsg.exceedChars)
})

it('Verify that the "Name" field is auto-filled with the relevant name from Address Book [C56225]', () => {
it('Verify that the "Name" field is auto-filled with the relevant name from Address Book', () => {
cy.visit(constants.addressBookUrl + constants.SEPOLIA_TEST_SAFE_1)
addressBook.clickOnCreateEntryBtn()
addressBook.typeInName(constants.addresBookContacts.user1.name)
Expand All @@ -54,15 +54,15 @@ describe('Add Owners tests', () => {
owner.verifyNewOwnerName(constants.addresBookContacts.user1.name)
})

it('Verify that Name field not mandatory [C56226]', () => {
it('Verify that Name field not mandatory', () => {
owner.waitForConnectionStatus()
owner.openAddOwnerWindow()
owner.typeOwnerAddress(constants.SEPOLIA_OWNER_2)
owner.clickOnNextBtn()
owner.verifyConfirmTransactionWindowDisplayed()
})

it('Verify relevant error messages are displayed in Address input [C56227]', () => {
it('Verify relevant error messages are displayed in Address input', () => {
owner.waitForConnectionStatus()
owner.openAddOwnerWindow()
owner.typeOwnerAddress(main.generateRandomString(10))
Expand All @@ -81,14 +81,14 @@ describe('Add Owners tests', () => {
owner.verifyErrorMsgInvalidAddress(constants.addressBookErrrMsg.alreadyAdded)
})

it('Verify default threshold value. Verify correct threshold calculation [C56230]', () => {
it('Verify default threshold value. Verify correct threshold calculation', () => {
owner.waitForConnectionStatus()
owner.openAddOwnerWindow()
owner.typeOwnerAddress(constants.DEFAULT_OWNER_ADDRESS)
owner.verifyThreshold(1, 2)
})

it('Verify valid Address validation [C56229]', () => {
it('Verify valid Address validation', () => {
owner.waitForConnectionStatus()
owner.openAddOwnerWindow()
owner.typeOwnerAddress(constants.SEPOLIA_OWNER_2)
Expand Down
12 changes: 6 additions & 6 deletions cypress/e2e/smoke/address_book.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ describe('Address book tests', () => {
main.acceptCookies(1)
})

it('Verify entry can be added ', () => {
it('Verify entry can be added', () => {
addressBook.clickOnCreateEntryBtn()
addressBook.addEntry(NAME, constants.RECIPIENT_ADDRESS)
})

it('Verify entered entry in Name input can be saved ', () => {
it('Verify entered entry in Name input can be saved', () => {
addressBook.clickOnCreateEntryBtn()
addressBook.addEntry(NAME, constants.RECIPIENT_ADDRESS)
addressBook.clickOnEditEntryBtn()
Expand All @@ -29,7 +29,7 @@ describe('Address book tests', () => {
addressBook.verifyNameWasChanged(NAME, EDITED_NAME)
})

it('Verify entry can be deleted ', () => {
it('Verify entry can be deleted', () => {
addressBook.clickOnCreateEntryBtn()
addressBook.addEntry(NAME, constants.RECIPIENT_ADDRESS)
// Click the delete button in the first entry
Expand All @@ -38,14 +38,14 @@ describe('Address book tests', () => {
addressBook.verifyEditedNameNotExists(EDITED_NAME)
})

it('Verify csv file can be imported (Goerli) ', () => {
it('Verify csv file can be imported (Goerli)', () => {
addressBook.clickOnImportFileBtn()
addressBook.importFile()
addressBook.verifyImportModalIsClosed()
addressBook.verifyDataImported(constants.SEPOLIA_CSV_ENTRY.name, constants.SEPOLIA_CSV_ENTRY.address)
})

it.skip('Verify Gnosis Chain imported address can be found ', () => {
it.skip('Verify Gnosis Chain imported address can be found', () => {
// Go to a Safe on Gnosis Chain
cy.get('header')
.contains(/^G(ö|oe)rli$/)
Expand All @@ -63,7 +63,7 @@ describe('Address book tests', () => {
cy.contains(constants.GNO_CSV_ENTRY.address).should('exist')
})

it('Verify the address book file can be downloaded ', () => {
it('Verify the address book file can be downloaded', () => {
addressBook.clickOnImportFileBtn()
addressBook.importFile()
// Download the export file
Expand Down
Loading

0 comments on commit cbe3d32

Please sign in to comment.