-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add API tests for CloudinaryImage field type #3467
Conversation
🦋 Changeset is good to goLatest commit: 6201507 We got this. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
0a54045
to
0ef5284
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments and questions below.
.changeset/tiny-rockets-lick.md
Outdated
'@keystonejs/fields-cloudinary-image': patch | ||
--- | ||
|
||
Add `filter`, `isRequired` and CRUD tests for `CloudinaryImage` field type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add `filter`, `isRequired` and CRUD tests for `CloudinaryImage` field type. | |
Added `filter`, `isRequired` and CRUD tests for `CloudinaryImage` field type. |
packages/keystone/package.json
Outdated
@@ -31,7 +31,7 @@ | |||
"express-pino-logger": "^4.0.0", | |||
"falsey": "^1.0.0", | |||
"fs-extra": "^7.0.0", | |||
"globby": "^11.0.0", | |||
"globby": "^11.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package version bumps here should result in a changeset for all the affected packages. In general it's probably best to leave and version bumps out of a feature PR like this unless they're actually required.
|
||
// This function will run after all the tests are completed. | ||
// We use it to cleanup the resources (e.g Cloudinary images) which are no longer required. | ||
export const afterAll = () => cloudinary.v2.api.delete_resources_by_prefix('cloudinary-test'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this code up to the top section of the file. We want to keep all the module config in a single location.
}; | ||
|
||
export const initItems = () => { | ||
let items = testFiles.map((p, i) => ({ name: `file${i}`, image: prepareFile(p) })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let items = testFiles.map((p, i) => ({ name: `file${i}`, image: prepareFile(p) })); | |
const items = testFiles.map((p, i) => ({ name: `file${i}`, image: prepareFile(p) })); |
0ef5284
to
d43ae1c
Compare
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
* Add filter and CRUD test for Unsplash field * Add delete operation API test Unsplash field type
* Removed unsupported filter options for field types (#3501) * Add delete operation API test LocationGoogle
Co-authored-by: Renovate Bot <[email protected]>
* Add filter and CRUD tests for AutoIncrement field * Remove unsupported adapter field type tests
* Add filter & CRUD tests for MongoId field * Fix the _in: null filter operation in mongoid
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Rename demo-projects folder to examples * Update test-projects/README.md Co-authored-by: Tim Leslie <[email protected]> * Fix some strange git ignoreness Co-authored-by: Tim Leslie <[email protected]>
Fixing this mess in another branch. |
CloudinaryImage
field type.