-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(gatsby-source-wordpress): update test deps and fix int tests #35582
Conversation
@@ -22,9 +22,6 @@ install-plugin wp-graphql-gutenberg pristas-peter/wp-graphql-gutenberg ${WPGRAPH | |||
# CPTUI from Github release | |||
install-plugin custom-post-type-ui WebDevStudios/custom-post-type-ui ${CPT_UI_VERSION} && \ | |||
|
|||
# WP GraphQL CPTUI from GitHub release | |||
install-plugin wp-graphql-custom-post-type-ui wp-graphql/wp-graphql-custom-post-type-ui ${WPGRAPHQL_CPT_UI_VERSION} && \ |
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.
WPGraphQL has CPTUI support built in now
# Set timezone | ||
RUN echo 'date.timezone = "UTC"' > /usr/local/etc/php/conf.d/timezone.ini | ||
# install system deps | ||
RUN apt-get update && apt-get install unzip git -y && rm -rf /var/lib/apt/lists/* |
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.
broke these out because one was failing, this way the error message is more helpful
@@ -897,17 +896,23 @@ Array [ | |||
"fields": null, | |||
"name": "WpACF_GoogleMapFilterInput", | |||
}, | |||
Object { |
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 huge diff in this file is from updating all WP test site deps
WPGRAPHQL_VERSION=v1.8.0 | ||
WPGATSBY_VERSION=v2.3.2 | ||
WPGRAPHQL_ACF_VERSION=v0.5.3 | ||
CPT_UI_VERSION=1.11.2 | ||
ACF_VERSION=5.8.7 |
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.
I didn't update ACF because there's no oss mirror of the pro version with a version higher than this
@@ -1,6 +1,8 @@ | |||
#!/bin/bash | |||
set -e | |||
|
|||
echo "define( 'GRAPHQL_DEBUG', true );" >> /var/www/html/wp-config.php |
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.
Put WPGraphQL in debugging mode so there are more helpful errors when tests fail
Settings: { | ||
excludeFieldNames: [`generalSettingsEmail`], | ||
}, | ||
GeneralSettings: { | ||
excludeFieldNames: [`email`], | ||
}, | ||
WPGatsby: { | ||
exclude: true, | ||
}, | ||
PostTypeSEO: { | ||
excludeFieldNames: [`twitterImage`], | ||
}, | ||
BlockAttributesObject: { | ||
exclude: true, | ||
}, | ||
Post: { excludeFieldNames: [`pinged`] }, | ||
} |
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.
On latest versions of plugins these fields cause GraphQL errors. This is normally fine because errors that return data are silenced in source-wordpress. I turned that off for tests (below) so we can see all errors. I also turned on the debugging option to panic on errors - this is so we can see very quickly when a gql error is happening and fail the 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.
See the lines below 👇
writeQueriesToDisk: true, | ||
}, | ||
}, | ||
excludeFieldNames: [`commentCount`, `generalSettingsEmail`], |
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.
Same as the comment above ☝️
twitterImage { | ||
id | ||
title | ||
} |
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.
twitterImage
seems to throw errors on latest WPGraphQL Yoast when you don't have an image set. Since we're panicking on errors I'm omitting this field
Seems WP int tests are broken again. This PR fixes them by upgrading WP deps to latest and updating the snapshots and excluded fields based on the upgraded deps