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

Travis running cypress #9411

Merged
merged 16 commits into from
Sep 9, 2021
Merged

Conversation

ksolo
Copy link
Contributor

@ksolo ksolo commented Aug 30, 2021

Description

Pulling in pieces of other open PRs to attempt to run cypress tests in CI. The first goal is to run what tests are available (the visit tests)

This adds a script that:

  • sets up ganche to start with a specific mnemonic
  • runs database migrations
  • starts the web application
  • and runs the cypress tests

Adds the Xvfb service to travis along with the chrome addon

@ksolo ksolo marked this pull request as ready for review August 31, 2021 17:05
@ksolo ksolo force-pushed the travis-running-cypress branch from c06dafe to 443aa03 Compare September 1, 2021 21:05
@ksolo ksolo changed the base branch from master to red-squirrel September 3, 2021 16:24
@zlsgh zlsgh merged commit b4f9f97 into gitcoinco:red-squirrel Sep 9, 2021
@ksolo ksolo deleted the travis-running-cypress branch September 10, 2021 14:51
ksolo added a commit to ksolo/web that referenced this pull request Sep 13, 2021
* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* add wait-on package for scripting cypress runs

* travis docs indicate that bionic will start xvfb by adding it as a service

* add migration step

* another attempt at including cypress tests

* redirect webserver logs to /dev/null

* bad idea to move stdout to dev/null

* add NETWORK_NAME to travis env file

* update runserver command to go to background

* updating existing cypress tests to run on ci

* update docker-compose file: use default accounts for ganache

* add set -x to get more visibility into cypress command args

* update call to cypress run to see if travis will recognize flags

* try running cypress directly from node_modules

* remove set -x now that arguments are making their way to cypress
ksolo added a commit to ksolo/web that referenced this pull request Sep 13, 2021
* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* add wait-on package for scripting cypress runs

* travis docs indicate that bionic will start xvfb by adding it as a service

* add migration step

* another attempt at including cypress tests

* redirect webserver logs to /dev/null

* bad idea to move stdout to dev/null

* add NETWORK_NAME to travis env file

* update runserver command to go to background

* updating existing cypress tests to run on ci

* update docker-compose file: use default accounts for ganache

* add set -x to get more visibility into cypress command args

* update call to cypress run to see if travis will recognize flags

* try running cypress directly from node_modules

* remove set -x now that arguments are making their way to cypress
ksolo added a commit to ksolo/web that referenced this pull request Sep 17, 2021
* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* add wait-on package for scripting cypress runs

* travis docs indicate that bionic will start xvfb by adding it as a service

* add migration step

* another attempt at including cypress tests

* redirect webserver logs to /dev/null

* bad idea to move stdout to dev/null

* add NETWORK_NAME to travis env file

* update runserver command to go to background

* updating existing cypress tests to run on ci

* update docker-compose file: use default accounts for ganache

* add set -x to get more visibility into cypress command args

* update call to cypress run to see if travis will recognize flags

* try running cypress directly from node_modules

* remove set -x now that arguments are making their way to cypress
ksolo added a commit to ksolo/web that referenced this pull request Sep 17, 2021
* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* add wait-on package for scripting cypress runs

* travis docs indicate that bionic will start xvfb by adding it as a service

* add migration step

* another attempt at including cypress tests

* redirect webserver logs to /dev/null

* bad idea to move stdout to dev/null

* add NETWORK_NAME to travis env file

* update runserver command to go to background

* updating existing cypress tests to run on ci

* update docker-compose file: use default accounts for ganache

* add set -x to get more visibility into cypress command args

* update call to cypress run to see if travis will recognize flags

* try running cypress directly from node_modules

* remove set -x now that arguments are making their way to cypress
zlsgh pushed a commit that referenced this pull request Sep 17, 2021
* Travis running cypress (#9411)

* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* add wait-on package for scripting cypress runs

* travis docs indicate that bionic will start xvfb by adding it as a service

* add migration step

* another attempt at including cypress tests

* redirect webserver logs to /dev/null

* bad idea to move stdout to dev/null

* add NETWORK_NAME to travis env file

* update runserver command to go to background

* updating existing cypress tests to run on ci

* update docker-compose file: use default accounts for ganache

* add set -x to get more visibility into cypress command args

* update call to cypress run to see if travis will recognize flags

* try running cypress directly from node_modules

* remove set -x now that arguments are making their way to cypress

* Cypress testing/add connection metamask wallet test (#9429)

* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* redirect webserver logs to /dev/null

* update docker-compose file: use default accounts for ganache

* test running connect site with metamask on ci

* attempt at passing in env from config

* add ganache-cli to dev dependencies

* updated script call

* moving where NETWORK_NAME is defined

* build please

* moving network_name again

* remove network_name

* add superuser creation to script

* take two at creating a superuser

* third times a charm - create superuser

* try loading user data from fixtures

* scroll metamask button into view

* add cypress settings to gain access to screenshots/videos

* no longer need the scrolling command

* add updated cypress-run to red-squirrel

* create make target and documentation for running cypress tests
ksolo added a commit to ksolo/web that referenced this pull request Sep 17, 2021
* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* add wait-on package for scripting cypress runs

* travis docs indicate that bionic will start xvfb by adding it as a service

* add migration step

* another attempt at including cypress tests

* redirect webserver logs to /dev/null

* bad idea to move stdout to dev/null

* add NETWORK_NAME to travis env file

* update runserver command to go to background

* updating existing cypress tests to run on ci

* update docker-compose file: use default accounts for ganache

* add set -x to get more visibility into cypress command args

* update call to cypress run to see if travis will recognize flags

* try running cypress directly from node_modules

* remove set -x now that arguments are making their way to cypress
ksolo added a commit to ksolo/web that referenced this pull request Sep 20, 2021
* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* add wait-on package for scripting cypress runs

* travis docs indicate that bionic will start xvfb by adding it as a service

* add migration step

* another attempt at including cypress tests

* redirect webserver logs to /dev/null

* bad idea to move stdout to dev/null

* add NETWORK_NAME to travis env file

* update runserver command to go to background

* updating existing cypress tests to run on ci

* update docker-compose file: use default accounts for ganache

* add set -x to get more visibility into cypress command args

* update call to cypress run to see if travis will recognize flags

* try running cypress directly from node_modules

* remove set -x now that arguments are making their way to cypress
zlsgh pushed a commit that referenced this pull request Sep 21, 2021
* Travis running cypress (#9411)

* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* add wait-on package for scripting cypress runs

* travis docs indicate that bionic will start xvfb by adding it as a service

* add migration step

* another attempt at including cypress tests

* redirect webserver logs to /dev/null

* bad idea to move stdout to dev/null

* add NETWORK_NAME to travis env file

* update runserver command to go to background

* updating existing cypress tests to run on ci

* update docker-compose file: use default accounts for ganache

* add set -x to get more visibility into cypress command args

* update call to cypress run to see if travis will recognize flags

* try running cypress directly from node_modules

* remove set -x now that arguments are making their way to cypress

* grant creation test

update ci to only run grant creation

update migration

this migration has already been executed on production and will
be skipped when migrating deploys.

updated to allow new uses and the ci environment to properly load
the grant categories, which is required when creating a new grant.

remove specifying which spec to run

see if grant test can pass in isolation

whoops - forgot to add the backslash

grant passing in isolation, will all tests pass

fix broken test with tag updates

try running without touching metamask

use npm ci on travis, update before/after hooks in cypress

go back to npm install

remove node_modules from cache

use yarn to install dependencies

remove debugger

* revert template changes to what is on master

* update cypress-metamask versions

* update pageload timeout for grant creation tests

* remove comment to port data in category->tag migration

* conditionally run the port_data function

* update cypress-metamask version to 1.0.10-dev
jeremyschuurmans pushed a commit that referenced this pull request Sep 22, 2021
* Travis running cypress (#9411)

* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* add wait-on package for scripting cypress runs

* travis docs indicate that bionic will start xvfb by adding it as a service

* add migration step

* another attempt at including cypress tests

* redirect webserver logs to /dev/null

* bad idea to move stdout to dev/null

* add NETWORK_NAME to travis env file

* update runserver command to go to background

* updating existing cypress tests to run on ci

* update docker-compose file: use default accounts for ganache

* add set -x to get more visibility into cypress command args

* update call to cypress run to see if travis will recognize flags

* try running cypress directly from node_modules

* remove set -x now that arguments are making their way to cypress

* Cypress testing/add connection metamask wallet test (#9429)

* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* redirect webserver logs to /dev/null

* update docker-compose file: use default accounts for ganache

* test running connect site with metamask on ci

* attempt at passing in env from config

* add ganache-cli to dev dependencies

* updated script call

* moving where NETWORK_NAME is defined

* build please

* moving network_name again

* remove network_name

* add superuser creation to script

* take two at creating a superuser

* third times a charm - create superuser

* try loading user data from fixtures

* scroll metamask button into view

* add cypress settings to gain access to screenshots/videos

* no longer need the scrolling command

* add updated cypress-run to red-squirrel

* create make target and documentation for running cypress tests
ksolo added a commit to ksolo/web that referenced this pull request Sep 23, 2021
* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* add wait-on package for scripting cypress runs

* travis docs indicate that bionic will start xvfb by adding it as a service

* add migration step

* another attempt at including cypress tests

* redirect webserver logs to /dev/null

* bad idea to move stdout to dev/null

* add NETWORK_NAME to travis env file

* update runserver command to go to background

* updating existing cypress tests to run on ci

* update docker-compose file: use default accounts for ganache

* add set -x to get more visibility into cypress command args

* update call to cypress run to see if travis will recognize flags

* try running cypress directly from node_modules

* remove set -x now that arguments are making their way to cypress
ksolo added a commit to ksolo/web that referenced this pull request Sep 27, 2021
* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* add wait-on package for scripting cypress runs

* travis docs indicate that bionic will start xvfb by adding it as a service

* add migration step

* another attempt at including cypress tests

* redirect webserver logs to /dev/null

* bad idea to move stdout to dev/null

* add NETWORK_NAME to travis env file

* update runserver command to go to background

* updating existing cypress tests to run on ci

* update docker-compose file: use default accounts for ganache

* add set -x to get more visibility into cypress command args

* update call to cypress run to see if travis will recognize flags

* try running cypress directly from node_modules

* remove set -x now that arguments are making their way to cypress
ksolo added a commit to ksolo/web that referenced this pull request Sep 28, 2021
* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* add wait-on package for scripting cypress runs

* travis docs indicate that bionic will start xvfb by adding it as a service

* add migration step

* another attempt at including cypress tests

* redirect webserver logs to /dev/null

* bad idea to move stdout to dev/null

* add NETWORK_NAME to travis env file

* update runserver command to go to background

* updating existing cypress tests to run on ci

* update docker-compose file: use default accounts for ganache

* add set -x to get more visibility into cypress command args

* update call to cypress run to see if travis will recognize flags

* try running cypress directly from node_modules

* remove set -x now that arguments are making their way to cypress
thelostone-mc pushed a commit that referenced this pull request Sep 29, 2021
* Travis running cypress (#9411)

* updating dependencies to use custom fork of cypress-metamask

* add script and options for running cypress tests

* add wait-on package for scripting cypress runs

* travis docs indicate that bionic will start xvfb by adding it as a service

* add migration step

* another attempt at including cypress tests

* redirect webserver logs to /dev/null

* bad idea to move stdout to dev/null

* add NETWORK_NAME to travis env file

* update runserver command to go to background

* updating existing cypress tests to run on ci

* update docker-compose file: use default accounts for ganache

* add set -x to get more visibility into cypress command args

* update call to cypress run to see if travis will recognize flags

* try running cypress directly from node_modules

* remove set -x now that arguments are making their way to cypress

* grant creation test

update ci to only run grant creation

update migration

this migration has already been executed on production and will
be skipped when migrating deploys.

updated to allow new uses and the ci environment to properly load
the grant categories, which is required when creating a new grant.

remove specifying which spec to run

see if grant test can pass in isolation

whoops - forgot to add the backslash

grant passing in isolation, will all tests pass

fix broken test with tag updates

try running without touching metamask

use npm ci on travis, update before/after hooks in cypress

go back to npm install

remove node_modules from cache

use yarn to install dependencies

remove debugger

* revert template changes to what is on master

* adjust cypress commands for updates to app

* updated test for contributing to grant

* contributing grant tests are green

* fix linting error

* update tests to ignore the cookie banner

* set metamask version

* bump cypress-metamask

* add make target for running cypress in container

* load dashboard fixtures in attempt to have access to ETH in dropdown

* see if new migration helps us pass

* load economy instead of dashboard fixtures

Co-authored-by: Kevin Solorio <[email protected]>
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.

2 participants