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

Cypress tests refactoring: PO model, safe app tests #2522

Merged
merged 18 commits into from
Sep 25, 2023

Conversation

mike10ca
Copy link
Contributor

What it solves

  • Refactoring of existing Cypress tests

Resolves #2521

How this PR fixes it

  • PO model, safe apps tests, finish smoke tests, general refactoring

@github-actions
Copy link

github-actions bot commented Sep 18, 2023

Branch preview

✅ Deploy successful!

https://cypress_tests_refactor_p3--walletweb.review-wallet-web.5afe.dev

@github-actions
Copy link

github-actions bot commented Sep 18, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@mike10ca mike10ca requested a review from katspaugh September 20, 2023 08:02
@mike10ca mike10ca marked this pull request as ready for review September 20, 2023 08:02
@@ -9,7 +9,7 @@ concurrency:

jobs:
e2e:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary? Latest is too new for Cypress? Or too old?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our Cypress tests started to fail due to using latest runner image which conflicts with Cypress version. -latest tag uses image which might not be that stable as previous one, or be in pre-release mode.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need to pin the ubuntu version if we also upgraded cypress?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By specifying a version, we ensure that there will be some control over it. When this version is planned to become unavailable, we will hopefully receive notification that will give us enough time for updating to newer version of Cypress/resolve any conflicts instead of reacting to this when it was unexpected.

@mike10ca mike10ca requested a review from katspaugh September 22, 2023 11:16
cypress/e2e/pages/create_tx.pages.js Outdated Show resolved Hide resolved
cypress/e2e/pages/create_tx.pages.js Outdated Show resolved Hide resolved
cy.contains(expandallbtnStr).click()
}

export function lickOnCollapseAllBtn() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export function lickOnCollapseAllBtn() {
export function clickOnCollapseAllBtn() {

@@ -26,6 +27,8 @@ const editBtnStr = 'Edit'
const executionParamsStr = 'Execution parameters'
const noLaterStr = 'No, later'
const signBtnStr = 'Sign'
const expandallbtnStr = 'Expand all'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const expandallbtnStr = 'Expand all'
const expandAllBtnStr = 'Expand all'

@@ -0,0 +1,193 @@
import * as constants from '../../support/constants'

const searchappInput = 'input[id="search-by-name"]'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const searchappInput = 'input[id="search-by-name"]'
const searchAppInput = 'input[id="search-by-name"]'

@@ -1,25 +1,37 @@
import * as constants from '../../support/constants'
import * as main from '../pages/main.page'
import * as createtx from '../pages/create_tx.pages'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import * as createtx from '../pages/create_tx.pages'
import * as createTx from '../pages/create_tx.pages'

Comment on lines 34 to 36
export const invalidappUrl = 'https://my-invalid-custom-app.com/manifest.json'
export const validappUrlJson = 'https://my-valid-custom-app.com/manifest.json'
export const validappUrl = 'https://my-valid-custom-app.com'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export const invalidappUrl = 'https://my-invalid-custom-app.com/manifest.json'
export const validappUrlJson = 'https://my-valid-custom-app.com/manifest.json'
export const validappUrl = 'https://my-valid-custom-app.com'
export const invalidAppUrl = 'https://my-invalid-custom-app.com/manifest.json'
export const validAppUrlJson = 'https://my-valid-custom-app.com/manifest.json'
export const validAppUrl = 'https://my-valid-custom-app.com'

Comment on lines 38 to 39
export const proposeEndPoint = '/**/propose'
export const appsEndPoint = '/**/safe-apps'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export const proposeEndPoint = '/**/propose'
export const appsEndPoint = '/**/safe-apps'
export const proposeEndpoint = '/**/propose'
export const appsEndpoint = '/**/safe-apps'

Comment on lines 62 to 64
walletconnect: 'walletconnect',
customcontract: 'compose custom contract',
noresults: 'atextwithoutresults',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
walletconnect: 'walletconnect',
customcontract: 'compose custom contract',
noresults: 'atextwithoutresults',
walletConnect: 'walletconnect',
customContract: 'compose custom contract',
noResults: 'atextwithoutresults',

}

export const tokenNames = {
wrapped_ether: 'Wrapped Ether',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
wrapped_ether: 'Wrapped Ether',
wrappedEther: 'Wrapped Ether',

@mike10ca mike10ca self-assigned this Sep 22, 2023
@katspaugh katspaugh merged commit ec9408c into dev Sep 25, 2023
@katspaugh katspaugh deleted the cypress-tests-refactor-p3 branch September 25, 2023 07:29
@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactoring of exiting Cypress tests (P3)
4 participants