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

Clearly document APP_SECRET for e2e testing to run on GitHub #153

Open
code-jenn-or opened this issue Jun 4, 2021 · 1 comment
Open
Labels
documentation Improvements or additions to documentation

Comments

@code-jenn-or
Copy link
Contributor

When initializing a bison app the e2e Logout test is failing on CI due to missing APP_SECRET in the workflow yml.

Should document and determine how to best use this for request tests as well.

Error:
`Setting up DB ***localhost/myapp_test
Logout
1) properly logs out a user

0 passing (2s)
1 failing

  1. Logout
    properly logs out a user:
    CypressError: cy.task('login') failed with the following error:

Cannot destructure property 'token' of '(intermediate value)(intermediate value)(intermediate value)' as it is null.
at http://localhost:3001/__cypress/runner/cypress_runner.js:160995:19
at tryCatcher (http://localhost:3001/__cypress/runner/cypress_runner.js:10765:23)
at Promise._settlePromiseFromHandler (http://localhost:3001/__cypress/runner/cypress_runner.js:8700:31)
at Promise._settlePromise (http://localhost:3001/__cypress/runner/cypress_runner.js:8757:18)
at Promise._settlePromise0 (http://localhost:3001/__cypress/runner/cypress_runner.js:8802:10)
at Promise._settlePromises (http://localhost:3001/__cypress/runner/cypress_runner.js:8878:18)
at _drainQueueStep (http://localhost:3001/__cypress/runner/cypress_runner.js:5472:12)
at _drainQueue (http://localhost:3001/__cypress/runner/cypress_runner.js:5465:9)
at Async.../../node_modules/bluebird/js/release/async.js.Async._drainQueues (http://localhost:3001/__cypress/runner/cypress_runner.js:5481:5)
at Async.drainQueues (http://localhost:3001/__cypress/runner/cypress_runner.js:5351:14)
From Your Spec Code:
at login (http://localhost:3001/__cypress/tests?p=cypress/support/index.ts:708:10)
at Context.eval (http://localhost:3001/__cypress/tests?p=cypress/support/index.ts:719:16)

From Node.js Internals:
TypeError: Cannot destructure property 'token' of '(intermediate value)(intermediate value)(intermediate value)' as it is null.
at /home/runner/work/alc-design-system/alc-design-system/cypress/plugins/index.ts:82:17`

   Resolved by adding APP_SECRET: foo to the main.js.yml file

image

@cball cball added the documentation Improvements or additions to documentation label Jun 9, 2021
@kgajera
Copy link
Contributor

kgajera commented Jul 9, 2021

I ran into this issue while implementing #185. I think this might not be a documentation issue, but instead we should find a way to load an .env file when running the cypress tests.

I think in real usages of bison, you will most likely need to add additional environment variables. Updating the main.js.yml file doesn't seem like the ideal way to handle that.

@kgajera kgajera mentioned this issue Aug 13, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants