-
Notifications
You must be signed in to change notification settings - Fork 0
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
My plugins tools page #55
base: main
Are you sure you want to change the base?
Conversation
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.
Hey @asr0393 can you summarize the intent of this cypress test? They are not passing in the runner here, even though they may have worked locally for you.
It looks to be testing that the solutions page renders exactly what is represented in the fixture. I believe we have a test that checks one category and product as well as the accordion functionality, so not sure we need to check them all. See: https://github.com/newfold-labs/wp-module-solutions/blob/main/tests/cypress/integration/solutions-app.cy.js#L66-L90
To add more tests, please follow the notes here for adding tests for button states of entitlements: https://github.com/newfold-labs/wp-module-solutions/blob/main/tests/cypress/integration/solutions-app.cy.js#L94-L97
A test on the install plugins link could be useful though, but we should remove the domain from the URL in the test so it will work in every scenario.
.contains('Add a New Plugin') | ||
.should('be.visible') | ||
.click() | ||
cy.url().should('eq', 'https://bjo.kax.mybluehost.me/website_489152c4/wp-admin/plugin-install.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.
This is likely failing because in the runner the href will not match this. Try something more along these lines:
cy.get('a').contains('Add a New Plugin')
.scrollIntoView()
.should( 'be.visible' )
.should( 'have.attr', 'href' )
.and(
'include',
'wp-admin/plugin-install'
);
The test doesn't need to click the link as that will take longer for the new page to load, since it can just check the href.
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 test is to verify the list of categories based on the solution plan as the catergories those are displayed for each solution(ecom,content creator and services) are different. Where in I tried to add the mock data for verify categories based on solution plan.
Proposed changes
Type of Change
Production
Development
Video
Checklist
Further comments