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

Firestore test error shows: Ref at provided path 'xxx/yyy' does not have action "add" #7

Closed
axacheng opened this issue Jan 26, 2019 · 4 comments

Comments

@axacheng
Copy link
Contributor

I assume it's something missing while i follow along the doc, so i can not add test data to Firestore.
Plus, I checked my Firestore rule that allows write with everyone(bad, but just for testing for now.).
Please try to help us.

Thanks

CypressError: cy.exec('$(npm bin)/firebase-extra firestore add axatest/HUD9SxZHjmrBkGFo5Fl6') failed because the command exited with a non-zero code.

Pass {failOnNonZeroExit: false} to ignore exit code failures.

Information about the failure:
Code: 1

Stderr:
Error running firebase action: Ref at provided path "axatest/HUD9SxZHjmrBkGFo5Fl6" does not have action "add"
@prescottprue
Copy link
Owner

You are trying to call add on a document instead of on a collection. add creates a new document with a unique key, so providing the key makes.

@axacheng
Copy link
Contributor Author

Hi Scott,

Thanks for your reply. It makes sense to me. I was updated the README example please see my PR.

Examples
Basic
cy.callFirestore('add', 'project/test-project', 'fakeProject.json')

@prescottprue
Copy link
Owner

@axacheng Thanks for the PR!

@prescottprue prescottprue mentioned this issue Feb 1, 2019
prescottprue added a commit that referenced this issue Feb 2, 2019
* fix(logout): remove returning of promise (handled by Cypress) - #9
* fix(callFirestore): support calling `update` by passing data - #10, #11 - @bettinatop22
* feat(docs): add full example for `callFirestore` - #7, #8 - @axacheng
@prescottprue
Copy link
Owner

Merged and released as part of v0.1.1, thanks for the PR.

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

No branches or pull requests

2 participants