-
Notifications
You must be signed in to change notification settings - Fork 8
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
Set Permalink Structure command #17
Conversation
if ('' !== type) { | ||
cy.get('#permalink_structure').click().type(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.
@cadic Should we check for this earlier? If users pass the empty type, we do nothing.
Or if the type is required, let's remove the default value!
Setting the default to /%postname%/
is another good direction IMO.
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.
Empty string is for "Plain" structure. Setting /%postname%/ as default will break the logic, because Plain is default in WordPress core. I will remove the default value.
The "clear before type" workaround is required because Cypress doesn't allow to type empty string.
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.
LGTM!
…nk-structure Set Permalink Structure command
Description of the Change
Adds
setPermalinkStructure
commandChecklist:
Changelog Entry
Credits
Props @