Comments (7)
Bingo! @prescottprue
Coming back to this with a clear head on Monday morning. It was file location.
I moved the command and plugin stuff to a cypress directory in the root. Even though cypress is configured to pickup tests in the nested folder.
Thanks for your help
from cypress-firebase.
@scowling quick question about the setup - do you need the file:preprocessor? I was under the impression that cypress handles typescript out of the box now - thought I saw that in their release notes a short while back.
As for the main issue, looks like there is a problem with the custom commands not being loaded, which is separate from the plugin (which adds tasks called by custom commands). Are you sure you followed all of the setup steps in the README (specifically step number 5):
Add the following your custom commands file (
cypress/support/commands.js
):import firebase from "firebase/app"; import "firebase/auth"; import "firebase/database"; import "firebase/firestore"; import { attachCustomCommands } from "cypress-firebase"; const fbConfig = { // Your config from Firebase Console }; firebase.initializeApp(fbConfig); attachCustomCommands({ Cypress, cy, firebase });
from cypress-firebase.
Yep that is in there, although VS code is complaining that
cypress-firebase/index.d.ts' is not a module.ts(2306)
The only other stuff in commands.ts is the example boilerplate that cypress has in there
Regarding the preprocessor - I only installed cypress yesterday and that is the default setup. I can remove it if you think it might be the problem (edit: I removed it and the problem persists)
from cypress-firebase.
any thoughts here @prescottprue ?
I've tried alternate ways to import the attachCustomCommands module into commands.ts but cypress is having none of it. And VS Code still complains that cypress-firebase is not a module.
from cypress-firebase.
@scowling Did you log in that file to make sure it is being called? If cy.callFirestore is not set, then I'm almost positive it is coming down to something with attachCustomCommands
The not finding the module seems really weird - since you just started are you able to share your repo so that the issue can be reproduced? Going to try to repro on my end again later today as well
from cypress-firebase.
sorry @prescottprue it's not an empty project - just that I have just added cypress - I can't share it
Could the complication be related to the fact that it's in an NX workspace?
Folder structure is like this:
- apps
- main_app
- main_app-e2e
- src
- fixtures
- integration
- plugins
- support
- cypress.json
- src
I dismissed that as a problem because cypress actually runs and performs the smoke test - and then fails on expect(cy.callFirestore).to.be.a('function')
from cypress-firebase.
Happy to hear, thanks for the update. Now I know to mention checking for that in the future!
from cypress-firebase.
Related Issues (20)
- publish-npm failing Error: Error [ERR_REQUIRE_ESM]: require() of ES Module HOT 1
- bug: cannot read properties of undefined (reading 'includes') HOT 4
- Login after a logout happening the application fails
- Cypress e2e test fails initialization HOT 1
- feat(build): native esm support
- fix: drop support for node pre 16 HOT 2
- 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.