package.cypress-utils.utils.authentication.js.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neeto-commons-frontend Show documentation
Show all versions of neeto-commons-frontend Show documentation
A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.
{"version":3,"file":"authentication.js","names":["navigationUtils","commonSelectors","profileSelectors","loginSelectors","commonTexts","verifySSOLoginPage","cy","log","get","githubAuthenticationButton","should","twitterAuthenticationButton","appleAuthenticationButton","googleAuthenticationButton","clearAndType","emailTextField","crossSiteScript","submitButton","click","windowAlert","emailInputError","invalidEmailMessage","clear","logout","homeUrl","loader","openProfileOrHelpCenter","tabSelector","tab","subTabLink","logoutLink","count","invoke","url","timeout","authUtils"],"sources":["../../../src/cypress-utils/utils/authentication.js"],"sourcesContent":["import { navigationUtils } from \"./navigation\";\n\nimport {\n commonSelectors,\n profileSelectors,\n} from \"../constants/selectors/common\";\nimport { loginSelectors } from \"../constants/selectors/login\";\nimport { commonTexts } from \"../constants/texts/common\";\n\nconst verifySSOLoginPage = () => {\n cy.log(\"verify Login Page\");\n cy.get(loginSelectors.githubAuthenticationButton).should(\"be.visible\");\n cy.get(loginSelectors.twitterAuthenticationButton).should(\"be.visible\");\n cy.get(loginSelectors.appleAuthenticationButton).should(\"be.visible\");\n cy.get(loginSelectors.googleAuthenticationButton).should(\"be.visible\");\n\n cy.log(\"verify Cross Site scripting\");\n cy.clearAndType(loginSelectors.emailTextField, commonTexts.crossSiteScript);\n cy.get(loginSelectors.submitButton).click();\n cy.get(commonSelectors.windowAlert).should(\"not.exist\");\n\n cy.log(\"verify email login\");\n cy.get(commonSelectors.emailInputError).should(\n \"have.text\",\n commonTexts.invalidEmailMessage\n );\n cy.get(loginSelectors.emailTextField).clear();\n cy.get(loginSelectors.submitButton).click();\n cy.get(commonSelectors.emailInputError).should(\n \"have.text\",\n commonTexts.invalidEmailMessage\n );\n};\n\nconst logout = homeUrl => {\n cy.get(profileSelectors.loader).should(\"not.exist\");\n navigationUtils.openProfileOrHelpCenter({\n tabSelector: profileSelectors.tab,\n subTabLink: profileSelectors.logoutLink,\n count: 5,\n });\n cy.get(profileSelectors.tab).click();\n cy.get(profileSelectors.logoutLink)\n .should(\"have.text\", commonTexts.logout)\n .invoke(\"click\");\n cy.url({ timeout: 15000 }).should(\"not.include\", homeUrl);\n};\n\nexport const authUtils = { verifySSOLoginPage, logout };\n"],"mappings":"AAAA,SAASA,eAAe;AAExB,SACEC,eAAe,EACfC,gBAAgB;AAElB,SAASC,cAAc;AACvB,SAASC,WAAW;AAEpB,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAA,EAAS;EAC/BC,EAAE,CAACC,GAAG,CAAC,mBAAmB,CAAC;EAC3BD,EAAE,CAACE,GAAG,CAACL,cAAc,CAACM,0BAA0B,CAAC,CAACC,MAAM,CAAC,YAAY,CAAC;EACtEJ,EAAE,CAACE,GAAG,CAACL,cAAc,CAACQ,2BAA2B,CAAC,CAACD,MAAM,CAAC,YAAY,CAAC;EACvEJ,EAAE,CAACE,GAAG,CAACL,cAAc,CAACS,yBAAyB,CAAC,CAACF,MAAM,CAAC,YAAY,CAAC;EACrEJ,EAAE,CAACE,GAAG,CAACL,cAAc,CAACU,0BAA0B,CAAC,CAACH,MAAM,CAAC,YAAY,CAAC;EAEtEJ,EAAE,CAACC,GAAG,CAAC,6BAA6B,CAAC;EACrCD,EAAE,CAACQ,YAAY,CAACX,cAAc,CAACY,cAAc,EAAEX,WAAW,CAACY,eAAe,CAAC;EAC3EV,EAAE,CAACE,GAAG,CAACL,cAAc,CAACc,YAAY,CAAC,CAACC,KAAK,EAAE;EAC3CZ,EAAE,CAACE,GAAG,CAACP,eAAe,CAACkB,WAAW,CAAC,CAACT,MAAM,CAAC,WAAW,CAAC;EAEvDJ,EAAE,CAACC,GAAG,CAAC,oBAAoB,CAAC;EAC5BD,EAAE,CAACE,GAAG,CAACP,eAAe,CAACmB,eAAe,CAAC,CAACV,MAAM,CAC5C,WAAW,EACXN,WAAW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