{"_id":"@curity/cypress-commands","_rev":"10-a7679913b4ea2c650c38cc14c803d680","name":"@curity/cypress-commands","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@curity/cypress-commands","version":"1.0.0","author":{"name":"Curity AB"},"license":"Apache-2.0","_id":"@curity/cypress-commands@1.0.0","maintainers":[{"name":"curity-admin","email":"npm@curity.io"},{"name":"anestos","email":"nikos.anestos@curity.io"},{"name":"mtrojanowski","email":"michal@kmt-studio.pl"},{"name":"ideskog","email":"jacob.ideskog@gmail.com"},{"name":"johanfylling","email":"johan.fylling@curity.io"}],"homepage":"https://github.com/curityio/curity-cypress-commands","bugs":{"url":"https://github.com/curityio/curity-cypress-commands/issues"},"dist":{"shasum":"f03bcf3d1b7d5751cd02ff9574b48898da877b54","tarball":"https://registry.npmjs.org/@curity/cypress-commands/-/cypress-commands-1.0.0.tgz","fileCount":5,"integrity":"sha512-kMulAk8Qvkm6lb+oFAd2Fdp4TEmxlYdVKigMMF1eG8LLVSSGExENWaRQ7DLa+9BOc2jYIYwVWxlbgn+VKS1sZw==","signatures":[{"sig":"MEYCIQC2FC1/s5RxDe0Yb0vGKFN32OjViNwQcGFfRww1NJUZqgIhAImKAYFaH647/Bdqg9/1p6VJd63MsLJTMN6pEwZjL1vr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinzBEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmregg//TbiAgwsWwDUDr7blU8Xfupy4LBREi7UO0A3JAZm8ma+WudR/\r\nw9B2OffRzRPW876X++NtdcmC9sfaOLvGN+00DavqKeNlIdzHBiKNcn/VPWsV\r\nS6QBFUVLJcls18NXKnOIQh5nk/YSTzveN6pPhiYDDXNdV+T4GCJcLW8JIkBf\r\nKu+G3sSreTdZabbvw6qOBv/jKnfwQOdsW6dRSL4w1+xGpihv/92ugjqXAizp\r\nVsbL12fKURtrqtD6nX3k2KUSAgcyP5lz62BQ1DkagvaPwPkWgEHJTd093eqM\r\n7lEdbgY8czyemJfFw+t0R3CAj4k3gN8tDARVQk6YRSWRY/luYukSBbZK4BNl\r\n2oymsghoy0YIR4d11k+J2slt5yDkQ0m5aMx55FNyD48IDG9QKRFW1WLKMfR7\r\nsKXNME9xLzJpWiL+FQAAa2R0LzLHiTiE/NsCWp4/RXKthcdYFtl7kxe7+uP9\r\nqkUMKvSc++//DjILY61SKybBGmv8FZekNi6I7+n3v186V3+VGolOYCIsu0ey\r\ndoaU18YHcTfFlTLxp4NVUE5GOVGc/1l6ZUgNW0BY2QzkAmTlAO7WVGDSBGxG\r\nmdsYmLqGnxAnKU71cMdz2Vr0Kw8AHo46oosxA0GRAlvb8tvESvD4OxEKOjpU\r\nVddpDLbklWlsac06yVSR9GuzJKxADS9PhEg=\r\n=ehXI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src","types":"src","gitHead":"65bbe58ce5a6b20c4319caf0f49adb227154e10f","scripts":{"cypress.run":"cypress run --browser chrome","cypress.open":"cypress open","merge-report":"npx mochawesome-merge cypress/reports/separate-reports/*.json > cypress/reports/index.json","generate-report":"npx marge --reportDir cypress/reports/ cypress/reports/index.json","cypress.run.headless":"cypress run --headless --browser chrome","cypress.generate.reports":"npm run merge-report; npm run generate-report"},"_npmUser":{"name":"mtrojanowski","email":"michal@kmt-studio.pl"},"repository":{"url":"git+https://github.com/curityio/curity-cypress-commands.git","type":"git"},"_npmVersion":"8.6.0","description":"Cypress commands used to test the Curity Identity Server plugins","directories":{},"_nodeVersion":"16.13.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"cypress":"^10.0.3","mochawesome":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/cypress-commands_1.0.0_1654599748217_0.29766364836449344","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-06-07T11:02:28.107Z","modified":"2025-05-06T10:18:58.879Z","1.0.0":"2022-06-07T11:02:28.400Z"},"bugs":{"url":"https://github.com/curityio/curity-cypress-commands/issues"},"author":{"name":"Curity AB"},"license":"Apache-2.0","homepage":"https://github.com/curityio/curity-cypress-commands","repository":{"url":"git+https://github.com/curityio/curity-cypress-commands.git","type":"git"},"description":"Cypress commands used to test the Curity Identity Server plugins","maintainers":[{"email":"nikos.anestos@curity.io","name":"anestos"},{"email":"michal@kmt-studio.pl","name":"mtrojanowski"},{"email":"jacob.ideskog@gmail.com","name":"ideskog"},{"email":"surendra.khatana@curity.io","name":"surencurity"},{"email":"d.lindau@gmail.com","name":"d.lindau"},{"email":"paras.joshi@curity.io","name":"parasjoshi24"},{"email":"urban@curity.io","name":"usanden"},{"email":"tmicko@gmail.com","name":"slunker"}],"readme":"# Curity Cypress Commands\n\nCypress commands used when testing the Curity Identity Server plugins.\n\n## Installation\n\nInstall using npm, with\n\n```shell\nnpm install -D @curity/cypress-commands\n```\n\n## Usage\n\nTo use the commands in your tests:\n\n1. Import the registration function in your spec file with `import { registerCurityCommands } from '@curity/cypress-commands`.\n2. Register commands once before running any tests by calling `registerCurityCommands()`.\n3. You can then use the commands as any other Cypress command, e.g. `cy.getIDToken()`.\n\nYou can see the spec files in `cypress/integration` to check how the commands are used in Cypress tests. \n\n### Registering with a Prefix\n\nIf you happen to use other custom Cypress commands with the same names, then you can register the Curity commands with a prefix.\nE.g. `registerCurityCommands('curity')`. All command names from this package will be prefixed with the chosen string and the\nfirst letter of the original command name will be capitalized. E.g. `getIDToken` will become `curityGetIDToken`.\n\nNote that you will not get Typescript support if you register commands with a prefix.\n\n## Available commands\n\n- [buildAuthorizationURL](#buildauthorizationurl)\n- [startAuthorization](#startauthorization)\n- [decodeJWT](#decodejwt)\n- [getIDToken](#getidtoken)\n- [getIDTokenClaims](#getidtokenclaims)\n\n### buildAuthorizationURL\n\nPrepares an authorization URL object based on the passed parameters. See `src/index.d.ts` for the list of currently supported parameters.\n\nExample usage\n\n```javascript\n    cy.buildAuthorizationURL({baseURL: \"https://idsvr.example.com\", clientID: \"client1\"})\n        .then(url => cy.visit(url.toString())).get('#login').should('exist')\n```\n\n### startAuthorization\n\nVisits the Authorization URL. Either the previous subject needs to be a URL or the parameters object must be passed.\nSee `src/index.d.ts` for the list of currently supported parameters.\n\nExample usage\n\n```javascript\n    const parameters = { baseURL: \"https://idsvr.example.com\", clientID: \"client1\" }\n    cy.buildAuthorizationURL(parameters).startAuthorization().get('#login').should('exist')\n    cy.startAuthorization(parameters).get('#login').should('exist')\n```\n\n### decodeJWT         \n\nDecodes a JWT and returns its claims in form of a map. If no parameter is passed then the previous subject is taken as the token.\n\nExample usage\n\n```javascript\n    cy.decodeJWT(token).its('sub').should('equal', 'john.doe')\n```\n\n### getIDToken\n\nGets the ID token from the fragment part of the current URL.\n\nExample usage\n\n```javascript\n    cy.getIDToken().should('not.be.empty')\n```\n\n### getIDTokenClaims\n\nGets the ID token from the fragment part of the current URL, decodes it and returns its claims. It's a shorthand for calling\n`getIDToken` and `decodeJWT` in a chain.\n\nExample usage\n\n```javascript\n    cy.getIDTokenClaims().its('sub').should('equal', 'john.doe')\n```\n","readmeFilename":"README.md"}