All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.cjs.cypress-utils.utils.authentication.js.map Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
{"version":3,"file":"authentication.js","names":["_navigation","require","_common","_login","_common2","verifySSOLoginPage","cy","log","get","loginSelectors","githubAuthenticationButton","should","twitterAuthenticationButton","appleAuthenticationButton","googleAuthenticationButton","clearAndType","emailTextField","commonTexts","crossSiteScript","submitButton","click","commonSelectors","windowAlert","emailInputError","invalidEmailMessage","clear","logout","homeUrl","profileSelectors","loader","navigationUtils","openProfileOrHelpCenter","tabSelector","tab","subTabLink","logoutLink","count","invoke","url","timeout","authUtils","exports"],"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,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAIA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAEA,IAAMI,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAA,EAAS;EAC/BC,EAAE,CAACC,GAAG,CAAC,mBAAmB,CAAC;EAC3BD,EAAE,CAACE,GAAG,CAACC,qBAAc,CAACC,0BAA0B,CAAC,CAACC,MAAM,CAAC,YAAY,CAAC;EACtEL,EAAE,CAACE,GAAG,CAACC,qBAAc,CAACG,2BAA2B,CAAC,CAACD,MAAM,CAAC,YAAY,CAAC;EACvEL,EAAE,CAACE,GAAG,CAACC,qBAAc,CAACI,yBAAyB,CAAC,CAACF,MAAM,CAAC,YAAY,CAAC;EACrEL,EAAE,CAACE,GAAG,CAACC,qBAAc,CAACK,0BAA0B,CAAC,CAACH,MAAM,CAAC,YAAY,CAAC;EAEtEL,EAAE,CAACC,GAAG,CAAC,6BAA6B,CAAC;EACrCD,EAAE,CAACS,YAAY,CAACN,qBAAc,CAACO,cAAc,EAAEC,oBAAW,CAACC,eAAe,CAAC;EAC3EZ,EAAE,CAACE,GAAG,CAACC,qBAAc,CAACU,YAAY,CAAC,CAACC,KAAK,CAAC,CAAC;EAC3Cd,EAAE,CAACE,GAAG,CAACa,uBAAe,CAACC,WAAW,CAAC,CAACX,MAAM,CAAC,WAAW,CAAC;EAEvDL,EAAE,CAACC,GAAG,CAAC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