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

Add an option to direct MyYoast requests to staging. #50

Closed
herregroen opened this issue Sep 18, 2019 · 4 comments · Fixed by #52
Closed

Add an option to direct MyYoast requests to staging. #50

herregroen opened this issue Sep 18, 2019 · 4 comments · Fixed by #52
Assignees
Labels
2 Story points

Comments

@herregroen
Copy link
Contributor

herregroen commented Sep 18, 2019

There should be an option in the test helper which, if enabled, directs any request that would have gone to "https://my.yoast.com" instead to "https://staging-my.yoast.com".

The easiest way to achieve this would be to make the subdomain of all these URLs filterable in the plugin so that it can be replaced with "staging-my" by the test helper.

This would allow us to easily test features such as:

  • New morphology releases
  • Changes to licensing
  • Features such as the new plugin installation flow which feature a lot of interaction between MyYoast and the plugin.
@omarreiss omarreiss self-assigned this Sep 18, 2019
@diedexx
Copy link
Member

diedexx commented Oct 21, 2019

We can use the requests-requests.before_request action to change the $url to the MyYoast staging domain if the original request is going to be sent to my.yoast.com. Here's an example how Jetpack uses this filter to achieve the same goal. https://github.com/Automattic/jetpack/blob/792b26b5539d07cc35fdd93567942f2ad481eef2/_inc/jetpack-server-sandbox.php#L63

@diedexx
Copy link
Member

diedexx commented Oct 21, 2019

The option should be a dropdown of 5 options:

  • live
  • staging
  • staging-plugins
  • staging-platform
  • local (my.yoast.test:3000)

@diedexx
Copy link
Member

diedexx commented Oct 21, 2019

A new tag (1.2.5 or the next minor release) should be created and pushed with
git tag -a 1.2.5 git push origin master --tags

on yoast.com master: run composer require yoast/yoast-test-helper --dev and push this to master and merge this to all both staging-plugins and staging-platform with git checkout staging-plugins && git pull origin master.

@diedexx
Copy link
Member

diedexx commented Oct 21, 2019

When testing this: when visiting the premium page in the plugin, a license request will be fired. If you have a site active on prod, and not active in dev you should quickly verify that the new option works and your license check is redirected to your local site

@omarreiss omarreiss removed their assignment Oct 21, 2019
@Dieterrr Dieterrr self-assigned this Oct 21, 2019
@LisanneKluitmans LisanneKluitmans added the 5 Story points label Oct 22, 2019
@Dieterrr Dieterrr removed their assignment Oct 28, 2019
@danielFangstrom danielFangstrom added 1 Story points 2 Story points and removed 5 Story points 1 Story points labels Oct 28, 2019
@Dieterrr Dieterrr removed their assignment Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 Story points
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants