-
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
PRESS2-1489 Add Cypress Tests for site-logo step #410
Conversation
const sampleLogoPath = `vendor/newfold-labs/wp-module-onboarding/tests/cypress/fixtures/image.png`; | ||
const LogoPreviewClass = '.nfd-onboarding-image-uploader--with-text__site_logo__preview'; | ||
if( | ||
cy.get('.nfd-onboarding-button--site-gen-next--disabled') |
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 an assertion, will it have a return value true/false?
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.
Yes, if the element is not visible, it'll return false.
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.
We have used this in basic info step also, in earlier onboarding flow.
.scrollIntoView() | ||
.should( 'be.visible' ); | ||
} ); | ||
}); |
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.
What would be the else condition? Next is enabled which means Logo is already uploaded.
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.
Yes
.click(); | ||
cy.url().should('not.contain', currURL); | ||
cy.go('back'); | ||
}; |
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.
Click Back meaning you are in site-detail step and cy.go('back') will take us to site-logo again right? Just checking.
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.
Yess.
} ); | ||
}); | ||
|
||
}); |
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.
Click on next and verify if its going to social media step or not.
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.
I'll add this.
|
||
it( 'Check for the skip button and click', () => { | ||
SkipButtonCheck('sitgen/step/site-logo'); | ||
} ); |
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.
Verifying upon skip, url is not current URL is okay.
We need to also check if it is exactly going to next right step or not. Please verify next expected step url too.
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.
As I commented on the other PR as well. We are not checking the next page URL as in future the order of pages might change and this will lead to failing of tests. Checking the curr URL is sufficient, I guess whether the current URL changes or not.
PRESS2-1485 Cypress Tests for SiteGen Welcome Step
No description provided.