diff --git a/src/components/OnboardingScreen.js b/src/components/OnboardingScreen.js index 8e3737f6..dbb70907 100644 --- a/src/components/OnboardingScreen.js +++ b/src/components/OnboardingScreen.js @@ -148,6 +148,7 @@ export function OnboardingScreen({ href={NewfoldRuntime.siteDetails.url} target="_blank" variant="secondary" + data-cy="view-site" > {__("View your site", "wp-module-ecommerce")} @@ -160,6 +161,7 @@ export function OnboardingScreen({ href={RuntimeSdk.adminUrl('site-editor.php?postType=wp_template&postId='+NewfoldRuntime.currentTheme+'//home')} target="_blank" variant="secondary" + data-cy="edit-site" > {__("Edit your site", "wp-module-ecommerce")} diff --git a/tests/cypress/integration/Home/commerceHomePage.cy.js b/tests/cypress/integration/Home/commerceHomePage.cy.js index 51b16cbe..e610bd6f 100644 --- a/tests/cypress/integration/Home/commerceHomePage.cy.js +++ b/tests/cypress/integration/Home/commerceHomePage.cy.js @@ -46,8 +46,8 @@ describe("Commerce Home Page- Coming soon mode", () => { .should("exist"); cy.get("@sitePreviewFlex") .trigger("mouseover") - .find("a.nfd-button") - .eq(0) + .find('[data-cy="view-site"]') + .should("have.text", "View your site") .invoke("removeAttr", "target") .click(); cy.url().should("eq", Cypress.config().baseUrl + "/");