graphql-engine/console/cypress/e2e/_onboarding/spec.ts
Stefano Magni fc753ffb42 console: Update Cypress to v10 and run the migration guide
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4849
GitOrigin-RevId: 10e0fd62344a0c5c7028ad480b747b7f64c9c773
2022-07-05 08:51:35 +00:00

26 lines
896 B
TypeScript

import { getElementFromAlias } from '../../helpers/dataHelpers';
export const viewOnboarding = () => {
// Click on create
cy.get(getElementFromAlias('onboarding-popup'))
.should('be.visible')
.should('contain.text', `Hi there, let's get started with Hasura!`);
// cy.get(getElementFromAlias('btn-hide-for-now')).click();
};
export const hideNow = () => {
// Click on create
cy.get(getElementFromAlias('btn-hide-for-now')).click();
cy.get(getElementFromAlias('onboarding-popup')).should('not.exist');
};
export const dontShowAgain = () => {
// Click on create
cy.reload();
cy.get(getElementFromAlias('onboarding-popup')).should('be.visible');
cy.get(getElementFromAlias('btn-ob-dont-show-again')).click();
cy.get(getElementFromAlias('onboarding-popup')).should('not.exist');
cy.reload();
cy.get(getElementFromAlias('onboarding-popup')).should('not.exist');
};