Comments (6)
Yes I really like this idea a lot, thanks for posting! I actually was considering this as a way to support adding login for multiple users by UID (as mentioned in #14 ).
from cypress-firebase.
That would be amazing to have. Now thinking about it, it might be more valuable to directly use your command, kind of like how you use cy.callFirestore. At that point, we could do cy.exec("${npm bin}/createTestEnvFile"). Then we can pass in the uid into this command. Anyway, those are some ideas. After Christmas, I will have more time to help contribute when these type of issues come up. But for now, I can only give ideas since I don't have as much time as I would like.
from cypress-firebase.
Here is a reference I used that gave me this idea.
https://glebbahmutov.com/blog/powerful-cy-task/
from cypress-firebase.
@prescottprue I tried doing my last comment with this code:
Cypress.env("TEST_UID", CypressConfig.users[role].uid)
return cy
.exec(`set TEST_UID=${CypressConfig.users[role].uid}`)
.exec("npm run e2e:set:config", { env: process.env }).its("stdout").should("contain", "cypress.env.json updated successfully")
My script in package.json is:
./node_modules/.bin/cypress-firebase createTestEnvFile
I also tried the second exec command to be node_modules\\.bin\\cypress-firebase createTestEnvFile
. Both commands shut down cypress' browser with no error. If I comment out the second exec command, it runs just fine. It seems that it fails only when I'm running that command. I can run, for example, npm run lint
(I know, I would never run that in cypress, but just as a test).
Any ideas why it would fail with createTestEnvFile?
from cypress-firebase.
Doesn't this issue get resolved with 0.10.0?
from cypress-firebase.
@dhair-seva Yes it does - thanks for posting.
I guess it doesn't necessarily update the value in the environment as described by the title, but a new JWT is generated when passing a UID to cy.login
, it just isn't written to the environment.
from cypress-firebase.
Related Issues (20)
- publish-npm failing Error: Error [ERR_REQUIRE_ESM]: require() of ES Module HOT 1
- Can't use Firestore Emulator HOT 2
- Dependency Dashboard
- cypress v10 migration HOT 7
- bug(docs): unclear explanation of project id + creds loading HOT 9
- README setup causes error HOT 1
- bug: auth emulator returns invalid custom token error HOT 6
- Unable to execute tests with Firebase Web SDK 9 HOT 3
- bug(commands): getAuthUser command not working HOT 4
- bug(docs): README.md setup is not clear about service account HOT 6
- Retry on 401
- bug(firestore): FieldValue.delete() not handled correctly HOT 3
- feat(callFirestore): ability to use batch writes
- bug(firestore): nested Timestamp value not persisting HOT 3
- bug: callFirestore not recognized in NextJS test HOT 1
- feat: support for component testing
- feat: switch to modular firebase sdks internally HOT 2
- bug(core): Webpack error when running cypress tests with cypress-firebase HOT 10
- callFirestore task fails when running in the CI with message "PERMISSION_DENIED: Missing or insufficient permissions." HOT 1
- Problem with Token HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress-firebase.