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

My plugins tools page #55

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

My plugins tools page #55

wants to merge 2 commits into from

Conversation

asr0393
Copy link

@asr0393 asr0393 commented Jan 16, 2025

Proposed changes

Type of Change

Production

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update
  • Refactoring / housekeeping (changes to files not directly related to functionality)

Development

  • Tests
  • Dependency update
  • Environment update / refactoring
  • Documentation Update

Video

Checklist

  • I have read the CONTRIBUTING doc
  • I have viewed my change in a web-browser
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Copy link
Member

@circlecube circlecube left a 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')
Copy link
Member

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.

Copy link
Author

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.

@circlecube circlecube requested review from abhijitb and wpscholar and removed request for abhijitb and wpscholar January 30, 2025 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants