-
Notifications
You must be signed in to change notification settings - Fork 297
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/10036-duplicate-survey-triggers #10167
base: develop
Are you sure you want to change the base?
Changes from all commits
8591467
586dd87
dd5eab7
75a34cf
08e5b12
c3ad87f
8881208
6ec40fa
3d9934c
3f0d205
cf1ea2f
3f009db
dc72e93
3ef43f0
93ccdb1
662355f
9498e57
abfaf7f
b42a18d
bd4dd63
256306d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,6 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* External dependencies | ||
*/ | ||
import fetchMock from 'fetch-mock'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
|
@@ -91,12 +86,6 @@ export default { | |
'^/google-site-kit/v1/core/user/data/survey-trigger' | ||
) | ||
); | ||
fetchMock.postOnce( | ||
new RegExp( | ||
'^/google-site-kit/v1/core/user/data/survey-timeout' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This endpoint has been entirely removed. |
||
), | ||
{} | ||
); | ||
muteFetch( | ||
new RegExp( | ||
'^/google-site-kit/v1/core/user/data/survey-timeouts' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,7 +118,9 @@ const baseActions = { | |
); | ||
|
||
if ( results?.response?.isEnabled ) { | ||
dispatch( CORE_USER ).triggerSurvey( 'fpm_setup_completed' ); | ||
yield commonActions.await( | ||
dispatch( CORE_USER ).triggerSurvey( 'fpm_setup_completed' ) | ||
); | ||
Comment on lines
+121
to
+123
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While this seems unrelated, it fixes stability issues in other tests where |
||
} | ||
|
||
return results; | ||
|
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.
Not sure how this wasn't broken before. The addition of
requireActual
here is something we do elsewhere and is necessary to preserve the normal function of other hooks from the package. Without this, the test was failing withuseMountedState is not a function
.