Skip to content

initial cypress test for nav img#4

Open
ericpassmore wants to merge 3 commits into
move-to-sveltefrom
ehp/GH-63-init-svelet-cypress-tests
Open

initial cypress test for nav img#4
ericpassmore wants to merge 3 commits into
move-to-sveltefrom
ehp/GH-63-init-svelet-cypress-tests

Conversation

@ericpassmore

@ericpassmore ericpassmore commented Jun 12, 2023

Copy link
Copy Markdown

Resolves VaultaFoundation/frontend-engineering#63

How to Run

First start up the preview service.
yarn preview
Next run cypress (after yarn install && yarn build)
npx cypress run

Screenshot 2023-06-12 at 9 55 50 AM

Configuration and File Layout

  • new file: cypress.config.ts has your base URL and env properties
  • new file: cypress/e2e/base_page_check.cy.ts the test to run
  • new file: cypress/support/commands.ts ignore: custom commands
  • new file: cypress/support/e2e.ts ignore: sources custom commands
  • new file: cypress/tsconfig.json needed to compile custom commands
  • modified: package.json rev minor version of cypress
  • modified: yarn.lock rev minor version of cypress

Comment thread package.json
"@wharfkit/wallet-plugin-privatekey": "latest",
"autoprefixer": "^10.4.7",
"cypress": "^12.11.0",
"cypress": "^12.14.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

any reason we bumped the cypress version?

Comment thread cypress.config.ts
projectId: 'ENF EVM Faucet',
e2e: {
baseUrl: 'http://localhost:4173',
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

shouldn't this port be 5173 as the default svelte port?

@juanm95 juanm95 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

one documentation suggestion

Comment thread README.md
## Testing No newline at end of file
## Cypress Testing
To run the tests use the following command
`npx cypress run`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we add that the user needs to have the server running first with yarn preview?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants