diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..51cb51c3 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,45 @@ +module.exports = { + env: { + "cypress/globals": true, + browser: true, + commonjs: true, + es2021: true, + }, + extends: ["airbnb-base", "plugin:prettier/recommended"], + ignorePatterns: ["build/", "dist/", "libs/", "node_modules/"], + globals: { + validate: "readonly", + JSZip: "readonly", + }, + overrides: [ + { + env: { + node: true, + }, + files: [".eslintrc.{js,cjs}"], + parserOptions: { + sourceType: "script", + }, + }, + ], + parserOptions: { + ecmaVersion: "latest", + }, + plugins: ["cypress", "prettier"], + rules: { + "class-methods-use-this": 0, + "func-names": 0, + "max-len": 0, + "no-console": ["error", { allow: ["error"] }], + "no-param-reassign": 0, + "no-restricted-globals": 0, + "no-use-before-define": 0, + "no-useless-escape": 0, + "one-var": ["error", "never"], + "prefer-destructuring": 0, + "prettier/prettier": "error", + camelcase: 0, + indent: 0, + strict: 0, + }, +}; diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 40987781..f6af5126 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,3 +15,5 @@ jobs: cache: 'npm' - run: npm ci - run: npm run lint:html + - name: lint js + run: npm run lint diff --git a/cypress.config.js b/cypress.config.js index a72685f9..167d9708 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -1,13 +1,14 @@ -const { defineConfig } = require('cypress') +const { defineConfig } = require("cypress"); // eslint-disable-line import/no-extraneous-dependencies module.exports = defineConfig({ e2e: { // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. setupNodeEvents(on, config) { - return require('./cypress/plugins/index.js')(on, config) + // eslint-disable-next-line global-require + return require("./cypress/plugins/index")(on, config); }, - baseUrl: 'http://localhost:8000', - specPattern: 'cypress/tests/**/*.cy.{js,jsx,ts,tsx}', + baseUrl: "http://localhost:8000", + specPattern: "cypress/tests/**/*.cy.{js,jsx,ts,tsx}", }, -}) +}); diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js index 59b2bab6..8229063a 100644 --- a/cypress/plugins/index.js +++ b/cypress/plugins/index.js @@ -19,4 +19,4 @@ module.exports = (on, config) => { // `on` is used to hook into various events Cypress emits // `config` is the resolved Cypress config -} +}; diff --git a/cypress/support/commands.js b/cypress/support/commands.js index f2960512..5c33389d 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -25,288 +25,195 @@ // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) // -- Get iFrame body -Cypress.Commands.add('getIFrameBody', () => { - cy.log('getIFrameBody'); - - return cy - .get('iframe[data-cy="smile-identity-hosted-web-integration"]', { log: false }) - .its('0.contentDocument.body', { log: false }) - .should('not.be.empty') - .then(body => cy.wrap(body, { log: false })); +Cypress.Commands.add("getIFrameBody", () => { + cy.log("getIFrameBody"); + + return cy + .get('iframe[data-cy="smile-identity-hosted-web-integration"]', { + log: false, + }) + .its("0.contentDocument.body", { log: false }) + .should("not.be.empty") + .then((body) => cy.wrap(body, { log: false })); }); -Cypress.Commands.add('loadIDOptions', () => { - cy.log('loadingIDOptions'); - - cy - .intercept('GET', '**/v1/services', { fixture: 'services.json' }); - - cy - .intercept('POST', '**/v1/products_config', { fixture: 'products_config.json' }); - - cy - .intercept('POST', '**/v1/totp_consent', { - statusCode: 200, - body: { - message: 'Select OTP Delivery Mode', - modes: [ - { - sms: '08001****67', - }, - { - email: 'fa*****il@gmail.com', - } - ], - session_id: '0000000000000', - success: true, - } - }); - - cy - .intercept('POST', '**/v1/totp_consent/mode', { - statusCode: 200, - body: { - message: 'OTP Delivery Mode Selected', - success: true, - } - }); - - cy - .intercept('POST', '**/v1/totp_consent/otp', { - statusCode: 200, - body: { - message: 'OTP Confirmed', - success: true, - } - }); +Cypress.Commands.add("loadIDOptions", () => { + cy.log("loadingIDOptions"); + + cy.intercept("GET", "**/v1/services", { fixture: "services.json" }); + + cy.intercept("POST", "**/v1/products_config", { + fixture: "products_config.json", + }); + + cy.intercept("POST", "**/v1/totp_consent", { + statusCode: 200, + body: { + message: "Select OTP Delivery Mode", + modes: [ + { + sms: "08001****67", + }, + { + email: "fa*****il@gmail.com", + }, + ], + session_id: "0000000000000", + success: true, + }, + }); + + cy.intercept("POST", "**/v1/totp_consent/mode", { + statusCode: 200, + body: { + message: "OTP Delivery Mode Selected", + success: true, + }, + }); + + cy.intercept("POST", "**/v1/totp_consent/otp", { + statusCode: 200, + body: { + message: "OTP Confirmed", + success: true, + }, + }); }); -Cypress.Commands.add('selectBVNIDType', () => { - cy - .loadIDOptions(); +Cypress.Commands.add("selectBVNIDType", () => { + cy.loadIDOptions(); - cy.log('selectingBVNIDType'); + cy.log("selectingBVNIDType"); - cy - .getIFrameBody() - .find('#country') - .select('NG') + cy.getIFrameBody().find("#country").select("NG"); - cy - .getIFrameBody() - .find('#id_type') - .select('BVN') + cy.getIFrameBody().find("#id_type").select("BVN"); - cy - .getIFrameBody() - .find('#submitConfig') - .click(); + cy.getIFrameBody().find("#submitConfig").click(); }); -Cypress.Commands.add('selectBVNMFAIDType', () => { - cy - .loadIDOptions(); +Cypress.Commands.add("selectBVNMFAIDType", () => { + cy.loadIDOptions(); - cy.log('selectingBVNMFAIDType'); + cy.log("selectingBVNMFAIDType"); - cy - .getIFrameBody() - .find('#country') - .select('NG') + cy.getIFrameBody().find("#country").select("NG"); - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); - cy - .getIFrameBody() - .find('#submitConfig') - .click(); + cy.getIFrameBody().find("#submitConfig").click(); }); -Cypress.Commands.add('selectNINIDType', () => { - cy - .loadIDOptions(); +Cypress.Commands.add("selectNINIDType", () => { + cy.loadIDOptions(); - cy.log('selectingNINIDType'); + cy.log("selectingNINIDType"); - cy - .getIFrameBody() - .find('#country') - .select('NG') + cy.getIFrameBody().find("#country").select("NG"); - cy - .getIFrameBody() - .find('#id_type') - .select('NIN') + cy.getIFrameBody().find("#id_type").select("NIN"); - cy - .getIFrameBody() - .find('#submitConfig') - .click(); + cy.getIFrameBody().find("#submitConfig").click(); }); -Cypress.Commands.add('selectVOTERIDType', () => { - cy - .loadIDOptions(); +Cypress.Commands.add("selectVOTERIDType", () => { + cy.loadIDOptions(); - cy.log('selectingVoterIdType'); + cy.log("selectingVoterIdType"); - cy - .getIFrameBody() - .find('#country') - .select('NG') + cy.getIFrameBody().find("#country").select("NG"); - cy - .getIFrameBody() - .find('#id_type') - .select('VOTER_ID') + cy.getIFrameBody().find("#id_type").select("VOTER_ID"); - cy - .getIFrameBody() - .find('#submitConfig') - .click(); + cy.getIFrameBody().find("#submitConfig").click(); }); -Cypress.Commands.add('selectPASSPORTIDType', () => { - cy - .loadIDOptions(); +Cypress.Commands.add("selectPASSPORTIDType", () => { + cy.loadIDOptions(); - cy.log('selectingPASSPORTIDType'); + cy.log("selectingPASSPORTIDType"); - cy - .getIFrameBody() - .find('#country') - .select('NG') + cy.getIFrameBody().find("#country").select("NG"); - cy - .getIFrameBody() - .find('#id_type') - .select('PASSPORT') + cy.getIFrameBody().find("#id_type").select("PASSPORT"); - cy - .getIFrameBody() - .find('#submitConfig') - .click(); + cy.getIFrameBody().find("#submitConfig").click(); }); -Cypress.Commands.add('selectKRAType', () => { - cy - .loadIDOptions(); +Cypress.Commands.add("selectKRAType", () => { + cy.loadIDOptions(); - cy.log('selectKRAType'); + cy.log("selectKRAType"); - cy - .getIFrameBody() - .find('#country') - .select('KE') + cy.getIFrameBody().find("#country").select("KE"); - cy - .getIFrameBody() - .find('#id_type') - .select('KRA_PIN') + cy.getIFrameBody().find("#id_type").select("KRA_PIN"); - cy - .getIFrameBody() - .find('#submitConfig') - .click(); + cy.getIFrameBody().find("#submitConfig").click(); }); -Cypress.Commands.add('selectKEDriversLicenseType', () => { - cy - .loadIDOptions(); +Cypress.Commands.add("selectKEDriversLicenseType", () => { + cy.loadIDOptions(); - cy.log('selectDriversLicenseType'); + cy.log("selectDriversLicenseType"); - cy - .getIFrameBody() - .find('#country') - .select('KE') + cy.getIFrameBody().find("#country").select("KE"); - cy - .getIFrameBody() - .find('#id_type') - .select('DRIVERS_LICENSE') + cy.getIFrameBody().find("#id_type").select("DRIVERS_LICENSE"); - cy - .getIFrameBody() - .find('#submitConfig') - .click(); + cy.getIFrameBody().find("#submitConfig").click(); }); -Cypress.Commands.add('getTotpConsentApp', () => { - cy.getIFrameBody() - .find('end-user-consent') - .shadow() - .find('totp-consent-app') - .shadow() +Cypress.Commands.add("getTotpConsentApp", () => { + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("totp-consent-app") + .shadow(); }); -Cypress.Commands.add('navigateThroughTotpConsentApp', () => { - cy.getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); +Cypress.Commands.add("navigateThroughTotpConsentApp", () => { + cy.getIFrameBody().find("end-user-consent").shadow().find("#allow").click(); - cy.getTotpConsentApp() - .find('#id_number') - .type('00000000000'); + cy.getTotpConsentApp().find("#id_number").type("00000000000"); - cy.getTotpConsentApp() - .find('#query-otp-modes') - .click(); + cy.getTotpConsentApp().find("#query-otp-modes").click(); - cy.getTotpConsentApp() - .find('form[name="select-mode-form"]') - .should('be.visible'); + cy.getTotpConsentApp() + .find('form[name="select-mode-form"]') + .should("be.visible"); - cy.getTotpConsentApp() - .find('[type="radio"]') - .check('email'); + cy.getTotpConsentApp().find('[type="radio"]').check("email"); - cy.getTotpConsentApp() - .find('#select-otp-mode') - .click(); + cy.getTotpConsentApp().find("#select-otp-mode").click(); - cy.getTotpConsentApp() - .find('#submit-otp') - .should('be.visible'); + cy.getTotpConsentApp().find("#submit-otp").should("be.visible"); - cy.getTotpConsentApp() - .find('#totp-token') - .type('000000'); + cy.getTotpConsentApp().find("#totp-token").type("000000"); - cy.getTotpConsentApp() - .find('#submit-otp') - .click(); + cy.getTotpConsentApp().find("#submit-otp").click(); }); -Cypress.Commands.add('navigateThroughCameraScreens', () => { - cy.log('navigatingThroughCameraScreens'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#request-camera-access') - .click(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#start-image-capture') - .click(); - - cy - .wait(4000); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#select-selfie') - .click(); +Cypress.Commands.add("navigateThroughCameraScreens", () => { + cy.log("navigatingThroughCameraScreens"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#request-camera-access") + .click(); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#start-image-capture") + .click(); + + cy.wait(4000); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#select-selfie") + .click(); }); diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index d68db96d..d076cec9 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -14,7 +14,7 @@ // *********************************************************** // Import commands.js using ES2015 syntax: -import './commands' +import "./commands"; // Alternatively you can use CommonJS syntax: // require('./commands') diff --git a/cypress/tests/back-button.cy.js b/cypress/tests/back-button.cy.js index b2ff8030..94b5aaed 100644 --- a/cypress/tests/back-button.cy.js +++ b/cypress/tests/back-button.cy.js @@ -1,254 +1,183 @@ -describe('back-button', () => { - beforeEach(() => { - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }).as('getUploadURL'); - - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 200 - }).as('successfulUpload'); - - cy - .loadIDOptions(); - }); - - describe('for basic kyc', () => { - it('should show the select id page when back is clicked', () => { - cy.visit('/basic_kyc_preview_bvn_mfa'); - cy.loadIDOptions(); - cy - .getIFrameBody() - .find('#country') - .select('NG') - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') - - cy - .getIFrameBody() - .find('#submitConfig') - .click(); - - cy.navigateThroughTotpConsentApp(); - - cy - .getIFrameBody() - .find('#back-button') - .click(); - - cy.getTotpConsentApp() - .find('.try-another-method') - .click(); - - cy.getTotpConsentApp() - .find('#back-to-entry-button') - .click(); - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#back-button') - .click(); - - cy - .getIFrameBody() - .find('#select-id-type') - .should('be.visible'); - }); - }); - - describe('for biometric kyc', () => { - beforeEach(() => { - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }).as('getUploadURL'); - - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 200 - }).as('successfulUpload'); - }); - - it('should show the select id page when back is clicked', () => { - cy.visit('/biometric_kyc_preview_bvn_mfa'); - cy.loadIDOptions(); - - cy - .getIFrameBody() - .find('#country') - .select('NG') - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') - - cy - .getIFrameBody() - .find('#id_type') - .should('contain', 'with OTP'); - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') - - cy - .getIFrameBody() - .find('#submitConfig') - .click(); - - cy.navigateThroughTotpConsentApp(); - - cy.getIFrameBody() - .find('end-user-consent') - .should('not.be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#request-camera-access') - .click(); - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('.back-button-exit') - .last() - .click(); - - cy.getTotpConsentApp() - .find('.try-another-method') - .click(); - - cy.getTotpConsentApp() - .find('#back-to-entry-button') - .click(); - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#back-button') - .click(); - - cy - .getIFrameBody() - .find('#select-id-type') - .should('be.visible'); - }); - }); - - describe('for enhanced kyc', () => { - beforeEach(() => { - cy - .intercept({ - method: 'POST', - url: '*v1/async_id_verification*' - }, { - statusCode: 200, - body: { success: true } - }).as('submitEnhancedKYC'); - }); - - it('should set "Bank Verification Number (with OTP)" in the id selection list when previewBVNMFA is true', () => { - cy.visit('/enhanced_kyc_preview_bvn_mfa'); - cy.loadIDOptions(); - - cy - .getIFrameBody() - .find('#country') - .select('NG') - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') - - cy - .getIFrameBody() - .find('#id_type') - .should('contain', 'with OTP'); - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') - - cy - .getIFrameBody() - .find('#submitConfig') - .click(); - - cy.getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - - cy.getTotpConsentApp() - .find('#id_number') - .type('00000000000'); - - cy.getTotpConsentApp() - .find('#query-otp-modes') - .click(); - - cy.getTotpConsentApp() - .find('form[name="select-mode-form"]') - .should('be.visible'); - - cy.getTotpConsentApp() - .find('[type="radio"]') - .check('email'); - - cy.getTotpConsentApp() - .find('#select-otp-mode') - .click(); - - cy.getTotpConsentApp() - .find('#submit-otp') - .should('be.visible'); - - cy.getTotpConsentApp() - .find('#totp-token') - .type('000000'); - - cy.getTotpConsentApp() - .find('.try-another-method') - .click(); - - cy.getTotpConsentApp() - .find('#back-to-entry-button') - .click(); - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#back-button') - .click(); - - cy - .getIFrameBody() - .find('#select-id-type') - .should('be.visible'); - }); - }); +describe("back-button", () => { + beforeEach(() => { + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ).as("getUploadURL"); + + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 200, + }, + ).as("successfulUpload"); + + cy.loadIDOptions(); + }); + + describe("for basic kyc", () => { + it("should show the select id page when back is clicked", () => { + cy.visit("/basic_kyc_preview_bvn_mfa"); + cy.loadIDOptions(); + cy.getIFrameBody().find("#country").select("NG"); + + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); + + cy.getIFrameBody().find("#submitConfig").click(); + + cy.navigateThroughTotpConsentApp(); + + cy.getIFrameBody().find("#back-button").click(); + + cy.getTotpConsentApp().find(".try-another-method").click(); + + cy.getTotpConsentApp().find("#back-to-entry-button").click(); + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#back-button") + .click(); + + cy.getIFrameBody().find("#select-id-type").should("be.visible"); + }); + }); + + describe("for biometric kyc", () => { + beforeEach(() => { + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ).as("getUploadURL"); + + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 200, + }, + ).as("successfulUpload"); + }); + + it("should show the select id page when back is clicked", () => { + cy.visit("/biometric_kyc_preview_bvn_mfa"); + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").select("NG"); + + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); + + cy.getIFrameBody().find("#id_type").should("contain", "with OTP"); + + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); + + cy.getIFrameBody().find("#submitConfig").click(); + + cy.navigateThroughTotpConsentApp(); + + cy.getIFrameBody().find("end-user-consent").should("not.be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#request-camera-access") + .click(); + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find(".back-button-exit") + .last() + .click(); + + cy.getTotpConsentApp().find(".try-another-method").click(); + + cy.getTotpConsentApp().find("#back-to-entry-button").click(); + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#back-button") + .click(); + + cy.getIFrameBody().find("#select-id-type").should("be.visible"); + }); + }); + + describe("for enhanced kyc", () => { + beforeEach(() => { + cy.intercept( + { + method: "POST", + url: "*v1/async_id_verification*", + }, + { + statusCode: 200, + body: { success: true }, + }, + ).as("submitEnhancedKYC"); + }); + + it('should set "Bank Verification Number (with OTP)" in the id selection list when previewBVNMFA is true', () => { + cy.visit("/enhanced_kyc_preview_bvn_mfa"); + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").select("NG"); + + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); + + cy.getIFrameBody().find("#id_type").should("contain", "with OTP"); + + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); + + cy.getIFrameBody().find("#submitConfig").click(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#allow") + .click(); + + cy.getTotpConsentApp().find("#id_number").type("00000000000"); + + cy.getTotpConsentApp().find("#query-otp-modes").click(); + + cy.getTotpConsentApp() + .find('form[name="select-mode-form"]') + .should("be.visible"); + + cy.getTotpConsentApp().find('[type="radio"]').check("email"); + + cy.getTotpConsentApp().find("#select-otp-mode").click(); + + cy.getTotpConsentApp().find("#submit-otp").should("be.visible"); + + cy.getTotpConsentApp().find("#totp-token").type("000000"); + + cy.getTotpConsentApp().find(".try-another-method").click(); + + cy.getTotpConsentApp().find("#back-to-entry-button").click(); + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#back-button") + .click(); + + cy.getIFrameBody().find("#select-id-type").should("be.visible"); + }); + }); }); diff --git a/cypress/tests/consent-denied.cy.js b/cypress/tests/consent-denied.cy.js index 13d7d0a8..40803dfb 100644 --- a/cypress/tests/consent-denied.cy.js +++ b/cypress/tests/consent-denied.cy.js @@ -1,133 +1,103 @@ beforeEach(() => { - cy.loadIDOptions(); + cy.loadIDOptions(); }); it('should ask to confirm "consent denial"', () => { - cy.visit('/'); - - cy - .selectNINIDType() - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#cancel') - .click(); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('not.be.visible'); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-rejected-screen') - .should('be.visible'); + cy.visit("/"); + + cy.selectNINIDType(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("be.visible"); + + cy.getIFrameBody().find("end-user-consent").shadow().find("#cancel").click(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("not.be.visible"); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-rejected-screen") + .should("be.visible"); }); it('should restore consent screen when user clicks "go back"', () => { - cy.visit('/'); - - cy - .selectNINIDType() - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#cancel') - .click(); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('not.be.visible'); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-rejected-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#back-to-consent') - .click(); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('be.visible'); + cy.visit("/"); + + cy.selectNINIDType(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("be.visible"); + + cy.getIFrameBody().find("end-user-consent").shadow().find("#cancel").click(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("not.be.visible"); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-rejected-screen") + .should("be.visible"); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#back-to-consent") + .click(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("be.visible"); }); -it('should close the iframe when user confirms consent denial', () => { - cy.visit('/'); - - cy - .selectNINIDType() - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#cancel') - .click(); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('not.be.visible'); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-rejected-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#confirm-consent-rejection') - .click(); - - cy - .get('[data-cy="smile-identity-hosted-web-integration"]') - .should('not.exist'); +it("should close the iframe when user confirms consent denial", () => { + cy.visit("/"); + + cy.selectNINIDType(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("be.visible"); + + cy.getIFrameBody().find("end-user-consent").shadow().find("#cancel").click(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("not.be.visible"); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-rejected-screen") + .should("be.visible"); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#confirm-consent-rejection") + .click(); + + cy.get('[data-cy="smile-identity-hosted-web-integration"]').should( + "not.exist", + ); }); diff --git a/cypress/tests/consent-granted.cy.js b/cypress/tests/consent-granted.cy.js index 1396baf2..69306119 100644 --- a/cypress/tests/consent-granted.cy.js +++ b/cypress/tests/consent-granted.cy.js @@ -1,35 +1,26 @@ -it('should grant consent, and navigate to image capture screen', () => { - cy.loadIDOptions(); +it("should grant consent, and navigate to image capture screen", () => { + cy.loadIDOptions(); - cy.visit('/'); - cy. - selectNINIDType(); + cy.visit("/"); + cy.selectNINIDType(); - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('be.visible'); + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("be.visible"); - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); + cy.getIFrameBody().find("end-user-consent").shadow().find("#allow").click(); - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('not.be.visible'); + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("not.be.visible"); - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#request-screen') - .should('be.visible'); + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#request-screen") + .should("be.visible"); }); diff --git a/cypress/tests/consent-required.cy.js b/cypress/tests/consent-required.cy.js index a4f0e4c3..b0766e86 100644 --- a/cypress/tests/consent-required.cy.js +++ b/cypress/tests/consent-required.cy.js @@ -1,76 +1,47 @@ -it('should show consent screen for the required id type', () => { - cy.visit('/consent-required'); +it("should show consent screen for the required id type", () => { + cy.visit("/consent-required"); - cy - .selectBVNIDType(); + cy.selectBVNIDType(); - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('be.visible'); + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("be.visible"); }); -it('should NOT show consent screen for the non-required id type', () => { - cy.visit('/consent-required'); +it("should NOT show consent screen for the non-required id type", () => { + cy.visit("/consent-required"); - cy - .loadIDOptions(); + cy.loadIDOptions(); - cy - .getIFrameBody() - .find('#country') - .select('Nigeria') - .should('have.value', 'NG'); + cy.getIFrameBody() + .find("#country") + .select("Nigeria") + .should("have.value", "NG"); - cy - .getIFrameBody() - .find('#id_type') - .select('NIN') - .should('have.value', 'NIN'); + cy.getIFrameBody().find("#id_type").select("NIN").should("have.value", "NIN"); - cy - .getIFrameBody() - .find('#submitConfig') - .click(); + cy.getIFrameBody().find("#submitConfig").click(); - cy - .getIFrameBody() - .find('end-user-consent') - .should('not.exist'); + cy.getIFrameBody().find("end-user-consent").should("not.exist"); }); -it('should NOT show consent screen when configuration is absent', () => { - cy.visit('/consent-not-required'); +it("should NOT show consent screen when configuration is absent", () => { + cy.visit("/consent-not-required"); - cy - .loadIDOptions(); + cy.loadIDOptions(); - cy - .getIFrameBody() - .find('#country') - .select('Nigeria') - .should('have.value', 'NG'); + cy.getIFrameBody() + .find("#country") + .select("Nigeria") + .should("have.value", "NG"); - cy - .getIFrameBody() - .find('#id_type') - .select('NIN') - .should('have.value', 'NIN'); + cy.getIFrameBody().find("#id_type").select("NIN").should("have.value", "NIN"); - cy - .getIFrameBody() - .find('#submitConfig') - .click(); + cy.getIFrameBody().find("#submitConfig").click(); - cy - .getIFrameBody() - .find('end-user-consent') - .should('not.exist'); + cy.getIFrameBody().find("end-user-consent").should("not.exist"); - cy - .getIFrameBody() - .find('smart-camera-web') - .should('exist') + cy.getIFrameBody().find("smart-camera-web").should("exist"); }); diff --git a/cypress/tests/data-input.cy.js b/cypress/tests/data-input.cy.js index 0286376e..e30997d4 100644 --- a/cypress/tests/data-input.cy.js +++ b/cypress/tests/data-input.cy.js @@ -1,83 +1,56 @@ -describe('id-info screen', () => { - beforeEach(() => { - cy.visit('/'); +describe("id-info screen", () => { + beforeEach(() => { + cy.visit("/"); - cy - .selectNINIDType() + cy.selectNINIDType(); - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }); + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ); - cy - .intercept({ - method: 'PUT', - url: '*amazonaws.com*' - }, { - statusCode: 200 - }); + cy.intercept( + { + method: "PUT", + url: "*amazonaws.com*", + }, + { + statusCode: 200, + }, + ); - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); + cy.getIFrameBody().find("end-user-consent").shadow().find("#allow").click(); - cy - .navigateThroughCameraScreens(); + cy.navigateThroughCameraScreens(); - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - }); + cy.getIFrameBody().find("#id-info").should("be.visible"); + }); - it('should show an error message when input is invalid', () => { - cy - .getIFrameBody() - .get('#id_number-hint') - .should('not.exist'); + it("should show an error message when input is invalid", () => { + cy.getIFrameBody().get("#id_number-hint").should("not.exist"); - cy - .getIFrameBody() - .find('#id_number') - .type('12345'); + cy.getIFrameBody().find("#id_number").type("12345"); - cy - .getIFrameBody() - .find('#submitForm') - .click(); + cy.getIFrameBody().find("#submitForm").click(); - cy - .getIFrameBody() - .find('#id_number-hint') - .should('be.visible'); + cy.getIFrameBody().find("#id_number-hint").should("be.visible"); - cy - .getIFrameBody() - .find('#id_number-hint') - .should('contain', 'Id number is invalid'); - }); + cy.getIFrameBody() + .find("#id_number-hint") + .should("contain", "Id number is invalid"); + }); - it('should progress when input is valid', () => { - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); + it("should progress when input is valid", () => { + cy.getIFrameBody().find("#id_number").type("12345678901"); - cy - .getIFrameBody() - .find('#submitForm') - .click(); + cy.getIFrameBody().find("#submitForm").click(); - cy - .getIFrameBody() - .find('#id-info') - .should('not.be.visible'); - }); + cy.getIFrameBody().find("#id-info").should("not.be.visible"); + }); }); diff --git a/cypress/tests/demo-mode.cy.js b/cypress/tests/demo-mode.cy.js index 185e574a..ec3fdbb5 100644 --- a/cypress/tests/demo-mode.cy.js +++ b/cypress/tests/demo-mode.cy.js @@ -1,57 +1,33 @@ -it('should show content for demo mode', () => { - cy - .loadIDOptions(); - - cy.visit('/demo'); - - cy - .getIFrameBody() - .find('#country') - .select('Nigeria'); - - cy - .getIFrameBody() - .find('#id_type') - .select('DRIVERS_LICENSE'); - - cy - .getIFrameBody() - .find('#submitConfig') - .click(); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('.demo-tip') - .should('be.visible'); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - - cy - .navigateThroughCameraScreens(); - - cy - .getIFrameBody() - .find('#id-info') - .as('IDInfoForm'); - - cy - .get('@IDInfoForm') - .find('.demo-tip') - .should('be.visible'); - - cy - .get('@IDInfoForm') - .find('input') - .then(inputs => { - Array.prototype.forEach.call(inputs, input => { - expect(input).to.have.prop('readonly', true); - }); - }); +it("should show content for demo mode", () => { + cy.loadIDOptions(); + + cy.visit("/demo"); + + cy.getIFrameBody().find("#country").select("Nigeria"); + + cy.getIFrameBody().find("#id_type").select("DRIVERS_LICENSE"); + + cy.getIFrameBody().find("#submitConfig").click(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find(".demo-tip") + .should("be.visible"); + + cy.getIFrameBody().find("end-user-consent").shadow().find("#allow").click(); + + cy.navigateThroughCameraScreens(); + + cy.getIFrameBody().find("#id-info").as("IDInfoForm"); + + cy.get("@IDInfoForm").find(".demo-tip").should("be.visible"); + + cy.get("@IDInfoForm") + .find("input") + .then((inputs) => { + Array.prototype.forEach.call(inputs, (input) => { + expect(input).to.have.prop("readonly", true); + }); + }); }); diff --git a/cypress/tests/document-verification.cy.js b/cypress/tests/document-verification.cy.js index 5049cbdd..805af359 100644 --- a/cypress/tests/document-verification.cy.js +++ b/cypress/tests/document-verification.cy.js @@ -1,111 +1,93 @@ -describe('document verification', () => { - beforeEach(() => { - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }).as('getUploadURL'); - - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 200 - }).as('successfulUpload'); - - cy.loadIDOptions(); - - cy.visit('/document-verification'); - - cy - .getIFrameBody() - .find('#country') - .select('NG') - - cy - .getIFrameBody() - .find('#id_type') - .select('NATIONAL_ID') - - cy - .getIFrameBody() - .find('#submitConfig') - .click(); - - cy.navigateThroughCameraScreens(); - }); - - it('should capture selfie and id image', () => { - cy - .getIFrameBody() - .find('smart-camera-web') - .invoke('attr', 'document-type') - .should('eq', 'NATIONAL_ID') - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-entry-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-entry-screen #take-photo') - .click(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-camera-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#capture-id-image') - .click(); - - cy - .wait(2000); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-camera-screen') - .should('not.be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#select-id-image') - .click(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-review-screen') - .should('not.be.visible'); - - cy - .wait('@getUploadURL'); - - cy - .wait('@successfulUpload'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - }); +describe("document verification", () => { + beforeEach(() => { + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ).as("getUploadURL"); + + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 200, + }, + ).as("successfulUpload"); + + cy.loadIDOptions(); + + cy.visit("/document-verification"); + + cy.getIFrameBody().find("#country").select("NG"); + + cy.getIFrameBody().find("#id_type").select("NATIONAL_ID"); + + cy.getIFrameBody().find("#submitConfig").click(); + + cy.navigateThroughCameraScreens(); + }); + + it("should capture selfie and id image", () => { + cy.getIFrameBody() + .find("smart-camera-web") + .invoke("attr", "document-type") + .should("eq", "NATIONAL_ID"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-entry-screen") + .should("be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-entry-screen #take-photo") + .click(); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-camera-screen") + .should("be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#capture-id-image") + .click(); + + cy.wait(2000); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-camera-screen") + .should("not.be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#select-id-image") + .click(); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-review-screen") + .should("not.be.visible"); + + cy.wait("@getUploadURL"); + + cy.wait("@successfulUpload"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + }); }); diff --git a/cypress/tests/enhanced-document-verification.cy.js b/cypress/tests/enhanced-document-verification.cy.js index b4218662..c52adb48 100644 --- a/cypress/tests/enhanced-document-verification.cy.js +++ b/cypress/tests/enhanced-document-verification.cy.js @@ -1,98 +1,89 @@ -describe('enhanced document verification', () => { - beforeEach(() => { - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }).as('getUploadURL'); - - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 200 - }).as('successfulUpload'); - - cy.loadIDOptions(); - - cy.visit('/enhanced_document_verification'); - - cy.selectVOTERIDType(); - - cy.navigateThroughCameraScreens(); - }); - - it('should capture selfie and id image', () => { - cy - .getIFrameBody() - .find('smart-camera-web') - .invoke('attr', 'document-type') - .should('eq', 'VOTER_ID') - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-entry-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-entry-screen #take-photo') - .click(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-camera-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#capture-id-image') - .click(); - - cy - .wait(2000); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-camera-screen') - .should('not.be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#select-id-image') - .click(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-review-screen') - .should('not.be.visible'); - - cy - .wait('@getUploadURL'); - - cy - .wait('@successfulUpload'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - }); +describe("enhanced document verification", () => { + beforeEach(() => { + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ).as("getUploadURL"); + + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 200, + }, + ).as("successfulUpload"); + + cy.loadIDOptions(); + + cy.visit("/enhanced_document_verification"); + + cy.selectVOTERIDType(); + + cy.navigateThroughCameraScreens(); + }); + + it("should capture selfie and id image", () => { + cy.getIFrameBody() + .find("smart-camera-web") + .invoke("attr", "document-type") + .should("eq", "VOTER_ID"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-entry-screen") + .should("be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-entry-screen #take-photo") + .click(); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-camera-screen") + .should("be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#capture-id-image") + .click(); + + cy.wait(2000); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-camera-screen") + .should("not.be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#select-id-image") + .click(); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-review-screen") + .should("not.be.visible"); + + cy.wait("@getUploadURL"); + + cy.wait("@successfulUpload"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + }); }); diff --git a/cypress/tests/enhanced-kyc.cy.js b/cypress/tests/enhanced-kyc.cy.js index b996fede..d902fba1 100644 --- a/cypress/tests/enhanced-kyc.cy.js +++ b/cypress/tests/enhanced-kyc.cy.js @@ -1,87 +1,57 @@ -describe('enhanced kyc', () => { - beforeEach(() => { - cy.loadIDOptions(); - cy.visit('/enhanced_kyc'); +describe("enhanced kyc", () => { + beforeEach(() => { + cy.loadIDOptions(); + cy.visit("/enhanced_kyc"); - cy - .selectBVNIDType() + cy.selectBVNIDType(); - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - }); + cy.getIFrameBody().find("#id-info").should("be.visible"); + }); - it('should show an error message when input is invalid', () => { - cy - .getIFrameBody() - .get('#id_number-hint') - .should('not.exist'); + it("should show an error message when input is invalid", () => { + cy.getIFrameBody().get("#id_number-hint").should("not.exist"); - cy - .getIFrameBody() - .find('#id_number') - .type('12345'); + cy.getIFrameBody().find("#id_number").type("12345"); - cy - .getIFrameBody() - .find('#submitForm') - .click(); + cy.getIFrameBody().find("#submitForm").click(); - cy - .getIFrameBody() - .find('#id_number-hint') - .should('be.visible'); + cy.getIFrameBody().find("#id_number-hint").should("be.visible"); - cy - .getIFrameBody() - .find('#id_number-hint') - .should('contain', 'Id number is invalid'); - }); + cy.getIFrameBody() + .find("#id_number-hint") + .should("contain", "Id number is invalid"); + }); - it('should progress when input is valid', () => { - cy - .intercept({ - method: 'POST', - url: '*v1/async_id_verification*' - }, {}).as('submitEnhancedKYC'); + it("should progress when input is valid", () => { + cy.intercept( + { + method: "POST", + url: "*v1/async_id_verification*", + }, + {}, + ).as("submitEnhancedKYC"); - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); + cy.getIFrameBody().find("#id_number").type("12345678901"); - cy - .getIFrameBody() - .find('#submitForm') - .click(); - cy - .wait('@submitEnhancedKYC'); - }); + cy.getIFrameBody().find("#submitForm").click(); + cy.wait("@submitEnhancedKYC"); + }); - it('should show consent screen for the required id type', () => { - cy.visit('/ekyc-consent-required'); + it("should show consent screen for the required id type", () => { + cy.visit("/ekyc-consent-required"); - cy - .selectBVNIDType(); + cy.selectBVNIDType(); - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('be.visible'); - }); + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("be.visible"); + }); - it('should show the select id page', ()=>{ - cy - .getIFrameBody() - .find('#back-button') - .click(); + it("should show the select id page", () => { + cy.getIFrameBody().find("#back-button").click(); - cy - .getIFrameBody() - .find('#select-id-type') - .should('be.visible'); - }); + cy.getIFrameBody().find("#select-id-type").should("be.visible"); + }); }); diff --git a/cypress/tests/id-selection.cy.js b/cypress/tests/id-selection.cy.js index 174e26c1..73defb59 100644 --- a/cypress/tests/id-selection.cy.js +++ b/cypress/tests/id-selection.cy.js @@ -1,883 +1,667 @@ -describe('No ID Selection', () => { - beforeEach(() => { - cy.loadIDOptions(); - }); - - it('basic_kyc', () => { - cy.visit('/basic_kyc'); - - cy - .selectNINIDType() - - cy - .intercept({ - method: 'POST', - url: '*v2/verify*' - }, { - statusCode: 200, - body: { success: true } - }).as('submitBasicKYC'); - - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@submitBasicKYC'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#thank-you-message') - .should('be.visible') - .should('contain', 'Nigeria') - .should('contain', 'National ID'); - }); - - it('biometric_kyc', () => { - cy.visit('/biometric_kyc'); - - cy - .selectBVNIDType() - - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }).as('getUploadURL'); - - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 200 - }).as('successfulUpload'); - - cy - .navigateThroughCameraScreens(); - - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy - .getIFrameBody() - .get('#id_number-hint') - .should('not.exist'); - - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@getUploadURL'); - - cy - .wait('@successfulUpload'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#thank-you-message') - .should('be.visible') - .should('contain', 'Nigeria') - .should('contain', 'Bank Verification'); - }); - - it('document_verification', () => { - cy.visit('/document-verification'); - - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }).as('getUploadURL'); - - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 200 - }).as('successfulUpload'); - - cy - .selectPASSPORTIDType() - - cy - .navigateThroughCameraScreens(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .invoke('attr', 'document-type') - .should('eq', 'PASSPORT') - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-entry-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-entry-screen #take-photo') - .click(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-camera-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#capture-id-image') - .click(); - - cy - .wait(2000); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-camera-screen') - .should('not.be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#select-id-image') - .click(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-review-screen') - .should('not.be.visible'); - - cy - .wait('@getUploadURL'); - - cy - .wait('@successfulUpload'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - }); - - it('enhanced_kyc', () => { - cy.visit('/enhanced_kyc'); - - cy - .selectNINIDType() - - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy - .intercept({ - method: 'POST', - url: '*v1/async_id_verification*' - }, { - statusCode: 200, - body: { success: true } - }).as('submitEnhancedKYC'); - - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@submitEnhancedKYC'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#thank-you-message') - .should('be.visible') - .should('contain', 'Nigeria') - .should('contain', 'National ID'); - }); +describe("No ID Selection", () => { + beforeEach(() => { + cy.loadIDOptions(); + }); + + it("basic_kyc", () => { + cy.visit("/basic_kyc"); + + cy.selectNINIDType(); + + cy.intercept( + { + method: "POST", + url: "*v2/verify*", + }, + { + statusCode: 200, + body: { success: true }, + }, + ).as("submitBasicKYC"); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@submitBasicKYC"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.getIFrameBody() + .find("#thank-you-message") + .should("be.visible") + .should("contain", "Nigeria") + .should("contain", "National ID"); + }); + + it("biometric_kyc", () => { + cy.visit("/biometric_kyc"); + + cy.selectBVNIDType(); + + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ).as("getUploadURL"); + + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 200, + }, + ).as("successfulUpload"); + + cy.navigateThroughCameraScreens(); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.getIFrameBody().get("#id_number-hint").should("not.exist"); + + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@getUploadURL"); + + cy.wait("@successfulUpload"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.getIFrameBody() + .find("#thank-you-message") + .should("be.visible") + .should("contain", "Nigeria") + .should("contain", "Bank Verification"); + }); + + it("document_verification", () => { + cy.visit("/document-verification"); + + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ).as("getUploadURL"); + + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 200, + }, + ).as("successfulUpload"); + + cy.selectPASSPORTIDType(); + + cy.navigateThroughCameraScreens(); + + cy.getIFrameBody() + .find("smart-camera-web") + .invoke("attr", "document-type") + .should("eq", "PASSPORT"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-entry-screen") + .should("be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-entry-screen #take-photo") + .click(); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-camera-screen") + .should("be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#capture-id-image") + .click(); + + cy.wait(2000); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-camera-screen") + .should("not.be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#select-id-image") + .click(); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-review-screen") + .should("not.be.visible"); + + cy.wait("@getUploadURL"); + + cy.wait("@successfulUpload"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + }); + + it("enhanced_kyc", () => { + cy.visit("/enhanced_kyc"); + + cy.selectNINIDType(); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.intercept( + { + method: "POST", + url: "*v1/async_id_verification*", + }, + { + statusCode: 200, + body: { success: true }, + }, + ).as("submitEnhancedKYC"); + + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@submitEnhancedKYC"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.getIFrameBody() + .find("#thank-you-message") + .should("be.visible") + .should("contain", "Nigeria") + .should("contain", "National ID"); + }); }); -describe('Preselected Country', () => { - it('basic_kyc', () => { - cy.visit('/basic_kyc_pre_select_country'); - - cy - .loadIDOptions(); - - cy - .getIFrameBody() - .find('#country') - .should('contain', 'Nigeria') - - cy - .getIFrameBody() - .find('#id_type') - .select('NIN') - - cy - .getIFrameBody() - .find('#submitConfig') - .click(); - - cy - .intercept({ - method: 'POST', - url: '*v2/verify*' - }, { - statusCode: 200, - body: { success: true } - }).as('submitBasicKYC'); - - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@submitBasicKYC'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#thank-you-message') - .should('be.visible') - .should('contain', 'Nigeria') - .should('contain', 'National ID'); - }); - - it('biometric_kyc', () => { - cy.visit('/biometric_kyc_pre_select_country'); - - cy - .loadIDOptions(); - - cy - .getIFrameBody() - .find('#country') - .should('contain', 'Nigeria') - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN') - - cy - .getIFrameBody() - .find('#submitConfig') - .click(); - - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }).as('getUploadURL'); - - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 200 - }).as('successfulUpload'); - - cy - .navigateThroughCameraScreens(); - - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy - .getIFrameBody() - .get('#id_number-hint') - .should('not.exist'); - - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@getUploadURL'); - - cy - .wait('@successfulUpload'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#thank-you-message') - .should('be.visible') - .should('contain', 'Nigeria') - .should('contain', 'Bank Verification'); - }); - - it('document_verification', () => { - cy.visit('/document-verification-pre-select-country'); - - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }).as('getUploadURL'); - - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 200 - }).as('successfulUpload'); - - cy - .loadIDOptions(); - - cy - .getIFrameBody() - .find('#country') - .should('contain', 'Nigeria') - - cy - .getIFrameBody() - .find('#id_type') - .select('PASSPORT') - - cy - .getIFrameBody() - .find('#submitConfig') - .click(); - - cy - .navigateThroughCameraScreens(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .invoke('attr', 'document-type') - .should('eq', 'PASSPORT') - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-entry-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-entry-screen #take-photo') - .click(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-camera-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#capture-id-image') - .click(); - - cy - .wait(2000); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-camera-screen') - .should('not.be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#select-id-image') - .click(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-review-screen') - .should('not.be.visible'); - - cy - .wait('@getUploadURL'); - - cy - .wait('@successfulUpload'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - }); - - it('enhanced_kyc', () => { - cy.visit('/enhanced_kyc_pre_select_country'); - - cy - .loadIDOptions(); - - cy - .getIFrameBody() - .find('#country') - .should('contain', 'Nigeria') - - cy - .getIFrameBody() - .find('#id_type') - .select('NIN') - - cy - .getIFrameBody() - .find('#submitConfig') - .click(); - - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy - .intercept({ - method: 'POST', - url: '*v1/async_id_verification*' - }, { - statusCode: 200, - body: { success: true } - }).as('submitEnhancedKYC'); - - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@submitEnhancedKYC'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#thank-you-message') - .should('be.visible') - .should('contain', 'Nigeria') - .should('contain', 'National ID'); - }); +describe("Preselected Country", () => { + it("basic_kyc", () => { + cy.visit("/basic_kyc_pre_select_country"); + + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").should("contain", "Nigeria"); + + cy.getIFrameBody().find("#id_type").select("NIN"); + + cy.getIFrameBody().find("#submitConfig").click(); + + cy.intercept( + { + method: "POST", + url: "*v2/verify*", + }, + { + statusCode: 200, + body: { success: true }, + }, + ).as("submitBasicKYC"); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@submitBasicKYC"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.getIFrameBody() + .find("#thank-you-message") + .should("be.visible") + .should("contain", "Nigeria") + .should("contain", "National ID"); + }); + + it("biometric_kyc", () => { + cy.visit("/biometric_kyc_pre_select_country"); + + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").should("contain", "Nigeria"); + + cy.getIFrameBody().find("#id_type").select("BVN"); + + cy.getIFrameBody().find("#submitConfig").click(); + + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ).as("getUploadURL"); + + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 200, + }, + ).as("successfulUpload"); + + cy.navigateThroughCameraScreens(); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.getIFrameBody().get("#id_number-hint").should("not.exist"); + + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@getUploadURL"); + + cy.wait("@successfulUpload"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.getIFrameBody() + .find("#thank-you-message") + .should("be.visible") + .should("contain", "Nigeria") + .should("contain", "Bank Verification"); + }); + + it("document_verification", () => { + cy.visit("/document-verification-pre-select-country"); + + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ).as("getUploadURL"); + + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 200, + }, + ).as("successfulUpload"); + + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").should("contain", "Nigeria"); + + cy.getIFrameBody().find("#id_type").select("PASSPORT"); + + cy.getIFrameBody().find("#submitConfig").click(); + + cy.navigateThroughCameraScreens(); + + cy.getIFrameBody() + .find("smart-camera-web") + .invoke("attr", "document-type") + .should("eq", "PASSPORT"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-entry-screen") + .should("be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-entry-screen #take-photo") + .click(); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-camera-screen") + .should("be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#capture-id-image") + .click(); + + cy.wait(2000); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-camera-screen") + .should("not.be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#select-id-image") + .click(); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-review-screen") + .should("not.be.visible"); + + cy.wait("@getUploadURL"); + + cy.wait("@successfulUpload"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + }); + + it("enhanced_kyc", () => { + cy.visit("/enhanced_kyc_pre_select_country"); + + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").should("contain", "Nigeria"); + + cy.getIFrameBody().find("#id_type").select("NIN"); + + cy.getIFrameBody().find("#submitConfig").click(); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.intercept( + { + method: "POST", + url: "*v1/async_id_verification*", + }, + { + statusCode: 200, + body: { success: true }, + }, + ).as("submitEnhancedKYC"); + + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@submitEnhancedKYC"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.getIFrameBody() + .find("#thank-you-message") + .should("be.visible") + .should("contain", "Nigeria") + .should("contain", "National ID"); + }); }); -describe('Preselected Country and ID Type', () => { - it('basic_kyc', () => { - cy.visit('/basic_kyc_pre_select_id_type'); - - cy.loadIDOptions(); - - cy.getIFrameBody() - .find('#country') - .should('not.be.visible'); - - cy.getIFrameBody() - .find('#id_type') - .should('not.be.visible'); - - cy.getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy.getIFrameBody() - .find('#back-button') - .should('not.be.visible'); - - cy - .intercept({ - method: 'POST', - url: '*v2/verify*' - }, { - statusCode: 200, - body: { success: true } - }).as('submitBasicKYC'); - - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@submitBasicKYC'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#thank-you-message') - .should('be.visible') - .should('contain', 'Nigeria') - .should('contain', 'National ID'); - }); - - it('biometric_kyc', () => { - cy.visit('/biometric_kyc_pre_select_id_type'); - - cy.loadIDOptions(); - - cy.getIFrameBody() - .find('#country') - .should('not.be.visible'); - - cy.getIFrameBody() - .find('#id_type') - .should('not.be.visible'); - - cy.getIFrameBody() - .find('smart-camera-web') - .should('be.visible'); - - cy.getIFrameBody() - .find('smart-camera-web') - .find('#back-button-exit') - .should('not.be.exist'); - - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }).as('getUploadURL'); - - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 200 - }).as('successfulUpload'); - - cy - .navigateThroughCameraScreens(); - - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy - .getIFrameBody() - .get('#id_number-hint') - .should('not.exist'); - - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@getUploadURL'); - - cy - .wait('@successfulUpload'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#thank-you-message') - .should('be.visible') - .should('contain', 'Nigeria') - .should('contain', 'Bank Verification'); - }); - - it('document_verification', () => { - cy.visit('/document-verification-pre-select-id-type'); - - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }).as('getUploadURL'); - - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 200 - }).as('successfulUpload'); - - cy.loadIDOptions(); - - cy.getIFrameBody() - .find('#country') - .should('not.be.visible'); - - cy.getIFrameBody() - .find('#id_type') - .should('not.be.visible'); - - cy.getIFrameBody() - .find('smart-camera-web') - .should('be.visible'); - - cy.getIFrameBody() - .find('smart-camera-web') - .find('#back-button-exit') - .should('not.be.exist'); - cy - .navigateThroughCameraScreens(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .invoke('attr', 'document-type') - .should('eq', 'PASSPORT') - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-entry-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-entry-screen #take-photo') - .click(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-camera-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#capture-id-image') - .click(); - - cy - .wait(2000); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-camera-screen') - .should('not.be.visible'); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#select-id-image') - .click(); - - cy - .getIFrameBody() - .find('smart-camera-web') - .shadow() - .find('#id-review-screen') - .should('not.be.visible'); - - cy - .wait('@getUploadURL'); - - cy - .wait('@successfulUpload'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - }); - - it('enhanced_kyc', () => { - cy.visit('/enhanced_kyc_pre_select_id_type'); - - cy.loadIDOptions(); - - cy.getIFrameBody() - .find('#country') - .should('not.be.visible'); - - cy.getIFrameBody() - .find('#id_type') - .should('not.be.visible'); - - cy.getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy.getIFrameBody() - .find('#back-button') - .should('not.be.visible'); - - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy - .intercept({ - method: 'POST', - url: '*v1/async_id_verification*' - }, { - statusCode: 200, - body: { success: true } - }).as('submitEnhancedKYC'); - - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@submitEnhancedKYC'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#thank-you-message') - .should('be.visible') - .should('contain', 'Nigeria') - .should('contain', 'National ID'); - }); +describe("Preselected Country and ID Type", () => { + it("basic_kyc", () => { + cy.visit("/basic_kyc_pre_select_id_type"); + + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").should("not.be.visible"); + + cy.getIFrameBody().find("#id_type").should("not.be.visible"); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.getIFrameBody().find("#back-button").should("not.be.visible"); + + cy.intercept( + { + method: "POST", + url: "*v2/verify*", + }, + { + statusCode: 200, + body: { success: true }, + }, + ).as("submitBasicKYC"); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@submitBasicKYC"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.getIFrameBody() + .find("#thank-you-message") + .should("be.visible") + .should("contain", "Nigeria") + .should("contain", "National ID"); + }); + + it("biometric_kyc", () => { + cy.visit("/biometric_kyc_pre_select_id_type"); + + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").should("not.be.visible"); + + cy.getIFrameBody().find("#id_type").should("not.be.visible"); + + cy.getIFrameBody().find("smart-camera-web").should("be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .find("#back-button-exit") + .should("not.be.exist"); + + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ).as("getUploadURL"); + + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 200, + }, + ).as("successfulUpload"); + + cy.navigateThroughCameraScreens(); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.getIFrameBody().get("#id_number-hint").should("not.exist"); + + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@getUploadURL"); + + cy.wait("@successfulUpload"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.getIFrameBody() + .find("#thank-you-message") + .should("be.visible") + .should("contain", "Nigeria") + .should("contain", "Bank Verification"); + }); + + it("document_verification", () => { + cy.visit("/document-verification-pre-select-id-type"); + + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ).as("getUploadURL"); + + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 200, + }, + ).as("successfulUpload"); + + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").should("not.be.visible"); + + cy.getIFrameBody().find("#id_type").should("not.be.visible"); + + cy.getIFrameBody().find("smart-camera-web").should("be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .find("#back-button-exit") + .should("not.be.exist"); + cy.navigateThroughCameraScreens(); + + cy.getIFrameBody() + .find("smart-camera-web") + .invoke("attr", "document-type") + .should("eq", "PASSPORT"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-entry-screen") + .should("be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-entry-screen #take-photo") + .click(); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-camera-screen") + .should("be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#capture-id-image") + .click(); + + cy.wait(2000); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-camera-screen") + .should("not.be.visible"); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#select-id-image") + .click(); + + cy.getIFrameBody() + .find("smart-camera-web") + .shadow() + .find("#id-review-screen") + .should("not.be.visible"); + + cy.wait("@getUploadURL"); + + cy.wait("@successfulUpload"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + }); + + it("enhanced_kyc", () => { + cy.visit("/enhanced_kyc_pre_select_id_type"); + + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").should("not.be.visible"); + + cy.getIFrameBody().find("#id_type").should("not.be.visible"); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.getIFrameBody().find("#back-button").should("not.be.visible"); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.intercept( + { + method: "POST", + url: "*v1/async_id_verification*", + }, + { + statusCode: 200, + body: { success: true }, + }, + ).as("submitEnhancedKYC"); + + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@submitEnhancedKYC"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.getIFrameBody() + .find("#thank-you-message") + .should("be.visible") + .should("contain", "Nigeria") + .should("contain", "National ID"); + }); }); diff --git a/cypress/tests/id-verification.cy.js b/cypress/tests/id-verification.cy.js index a81b8ba5..ce701870 100644 --- a/cypress/tests/id-verification.cy.js +++ b/cypress/tests/id-verification.cy.js @@ -1,87 +1,57 @@ -describe('ID verification', () => { - beforeEach(() => { - cy.loadIDOptions(); - cy.visit('/identity-verification'); +describe("ID verification", () => { + beforeEach(() => { + cy.loadIDOptions(); + cy.visit("/identity-verification"); - cy - .selectNINIDType() + cy.selectNINIDType(); - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - }); + cy.getIFrameBody().find("#id-info").should("be.visible"); + }); - it('should show an error message when input is invalid', () => { - cy - .getIFrameBody() - .get('#id_number-hint') - .should('not.exist'); + it("should show an error message when input is invalid", () => { + cy.getIFrameBody().get("#id_number-hint").should("not.exist"); - cy - .getIFrameBody() - .find('#id_number') - .type('12345'); + cy.getIFrameBody().find("#id_number").type("12345"); - cy - .getIFrameBody() - .find('#submitForm') - .click(); + cy.getIFrameBody().find("#submitForm").click(); - cy - .getIFrameBody() - .find('#id_number-hint') - .should('be.visible'); + cy.getIFrameBody().find("#id_number-hint").should("be.visible"); - cy - .getIFrameBody() - .find('#id_number-hint') - .should('contain', 'Id number is invalid'); - }); + cy.getIFrameBody() + .find("#id_number-hint") + .should("contain", "Id number is invalid"); + }); - it('should progress when input is valid', () => { - cy - .intercept({ - method: 'POST', - url: '*v2/verify_async*' - }, {}).as('submitIdVerification'); + it("should progress when input is valid", () => { + cy.intercept( + { + method: "POST", + url: "*v2/verify_async*", + }, + {}, + ).as("submitIdVerification"); - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); + cy.getIFrameBody().find("#id_number").type("12345678901"); - cy - .getIFrameBody() - .find('#submitForm') - .click(); - cy - .wait('@submitIdVerification'); - }); + cy.getIFrameBody().find("#submitForm").click(); + cy.wait("@submitIdVerification"); + }); - it('should show consent screen for the required id type', () => { - cy.visit('/identity-verification'); + it("should show consent screen for the required id type", () => { + cy.visit("/identity-verification"); - cy - .selectBVNIDType(); + cy.selectBVNIDType(); - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('be.visible'); - }); + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("be.visible"); + }); - it('should show the select id page', ()=>{ - cy - .getIFrameBody() - .find('#back-button') - .click(); + it("should show the select id page", () => { + cy.getIFrameBody().find("#back-button").click(); - cy - .getIFrameBody() - .find('#select-id-type') - .should('be.visible'); - }); + cy.getIFrameBody().find("#select-id-type").should("be.visible"); + }); }); diff --git a/cypress/tests/index.cy.js b/cypress/tests/index.cy.js index 7eaa29d9..6d2ade4c 100644 --- a/cypress/tests/index.cy.js +++ b/cypress/tests/index.cy.js @@ -1,7 +1,5 @@ -it('should load an iframe', () => { - cy.visit('/'); +it("should load an iframe", () => { + cy.visit("/"); - cy - .getIFrameBody() - .should('be.visible') + cy.getIFrameBody().should("be.visible"); }); diff --git a/cypress/tests/kra-verification.cy.js b/cypress/tests/kra-verification.cy.js index 1b0ce110..fe81a4a7 100644 --- a/cypress/tests/kra-verification.cy.js +++ b/cypress/tests/kra-verification.cy.js @@ -1,252 +1,157 @@ -describe('KE Drivers License verification basic kyc', () => { - beforeEach(() => { - cy - .intercept({ - method: 'POST', - url: '*v2/verify*' - }, { - statusCode: 200, - body: { success: true } - }).as('submitIdVerification'); - - cy - .loadIDOptions(); - - cy.visit('/kra-verification-basic-kyc'); - - cy - .selectKEDriversLicenseType() - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - }); - - it('should show an error message when input is invalid', () => { - cy - .getIFrameBody() - .get('#id_number-hint') - .should('not.exist'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .getIFrameBody() - .find('#id_number-hint') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#id_number-hint') - .should('contain', 'Id number is required'); - cy - .getIFrameBody() - .find('#citizenship-hint') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#citizenship-hint') - .should('contain', 'Citizenship is required'); - - cy - .getIFrameBody() - .find('#id_number') - .type('1234567890'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .getIFrameBody() - .find('#id_number-hint') - .should('contain', 'Id number is invalid'); - - }); - - it('should progress when input is valid', () => { - cy - .getIFrameBody() - .find('#id_number') - .type('1234'); - - cy - .getIFrameBody() - .find('#citizenship') - .select('Kenyan'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - cy - .wait('@submitIdVerification'); - }); - - it('should show consent screen for the required id type', () => { - cy.visit('/kra-verification-basic-kyc'); - - cy - .selectKEDriversLicenseType(); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('be.visible'); - }); - - it('should show the select id page', () => { - cy - .getIFrameBody() - .find('#back-button') - .click(); - cy - .getIFrameBody() - .find('end-user-consent') - .shadow().find('#back-button') - .click(); - - cy - .getIFrameBody() - .find('#select-id-type') - .should('be.visible'); - }); +describe("KE Drivers License verification basic kyc", () => { + beforeEach(() => { + cy.intercept( + { + method: "POST", + url: "*v2/verify*", + }, + { + statusCode: 200, + body: { success: true }, + }, + ).as("submitIdVerification"); + + cy.loadIDOptions(); + + cy.visit("/kra-verification-basic-kyc"); + + cy.selectKEDriversLicenseType(); + cy.getIFrameBody().find("end-user-consent").shadow().find("#allow").click(); + cy.getIFrameBody().find("#id-info").should("be.visible"); + }); + + it("should show an error message when input is invalid", () => { + cy.getIFrameBody().get("#id_number-hint").should("not.exist"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.getIFrameBody().find("#id_number-hint").should("be.visible"); + + cy.getIFrameBody() + .find("#id_number-hint") + .should("contain", "Id number is required"); + cy.getIFrameBody().find("#citizenship-hint").should("be.visible"); + + cy.getIFrameBody() + .find("#citizenship-hint") + .should("contain", "Citizenship is required"); + + cy.getIFrameBody().find("#id_number").type("1234567890"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.getIFrameBody() + .find("#id_number-hint") + .should("contain", "Id number is invalid"); + }); + + it("should progress when input is valid", () => { + cy.getIFrameBody().find("#id_number").type("1234"); + + cy.getIFrameBody().find("#citizenship").select("Kenyan"); + + cy.getIFrameBody().find("#submitForm").click(); + cy.wait("@submitIdVerification"); + }); + + it("should show consent screen for the required id type", () => { + cy.visit("/kra-verification-basic-kyc"); + + cy.selectKEDriversLicenseType(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("be.visible"); + }); + + it("should show the select id page", () => { + cy.getIFrameBody().find("#back-button").click(); + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#back-button") + .click(); + + cy.getIFrameBody().find("#select-id-type").should("be.visible"); + }); }); -describe('KRA PIN verification enhanced kyc', () => { - beforeEach(() => { - cy - .intercept({ - method: 'POST', - url: '*v1/async_id_verification*' - }, { - statusCode: 200, - body: { success: true } - }).as('submitIdVerification'); - - cy.visit('/kra-verification-ekyc'); - - cy - .selectKRAType() - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - }); - - it('should show an error message when input is invalid', () => { - cy - .getIFrameBody() - .get('#id_number-hint') - .should('not.exist'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .getIFrameBody() - .find('#id_number-hint') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#id_number-hint') - .should('contain', 'Id number is required'); - cy - .getIFrameBody() - .find('#citizenship-hint') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#citizenship-hint') - .should('contain', 'Citizenship is required'); - - cy - .getIFrameBody() - .find('#id_number') - .type('1234567890'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .getIFrameBody() - .find('#id_number-hint') - .should('contain', 'Id number is invalid'); - - }); - - it('should progress when input is valid', () => { - cy - .getIFrameBody() - .find('#id_number') - .type('1234'); - - cy - .getIFrameBody() - .find('#citizenship') - .select('Kenyan'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - cy - .wait('@submitIdVerification'); - }); - - it('should show consent screen for the required id type', () => { - cy.visit('/kra-verification-ekyc'); - - cy - .selectKRAType(); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#consent-screen') - .should('be.visible'); - }); - - it('should show the select id page', () => { - cy - .getIFrameBody() - .find('#back-button') - .click(); - cy - .getIFrameBody() - .find('end-user-consent') - .shadow().find('#back-button') - .click(); - - cy - .getIFrameBody() - .find('#select-id-type') - .should('be.visible'); - }); +describe("KRA PIN verification enhanced kyc", () => { + beforeEach(() => { + cy.intercept( + { + method: "POST", + url: "*v1/async_id_verification*", + }, + { + statusCode: 200, + body: { success: true }, + }, + ).as("submitIdVerification"); + + cy.visit("/kra-verification-ekyc"); + + cy.selectKRAType(); + cy.getIFrameBody().find("end-user-consent").shadow().find("#allow").click(); + cy.getIFrameBody().find("#id-info").should("be.visible"); + }); + + it("should show an error message when input is invalid", () => { + cy.getIFrameBody().get("#id_number-hint").should("not.exist"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.getIFrameBody().find("#id_number-hint").should("be.visible"); + + cy.getIFrameBody() + .find("#id_number-hint") + .should("contain", "Id number is required"); + cy.getIFrameBody().find("#citizenship-hint").should("be.visible"); + + cy.getIFrameBody() + .find("#citizenship-hint") + .should("contain", "Citizenship is required"); + + cy.getIFrameBody().find("#id_number").type("1234567890"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.getIFrameBody() + .find("#id_number-hint") + .should("contain", "Id number is invalid"); + }); + + it("should progress when input is valid", () => { + cy.getIFrameBody().find("#id_number").type("1234"); + + cy.getIFrameBody().find("#citizenship").select("Kenyan"); + + cy.getIFrameBody().find("#submitForm").click(); + cy.wait("@submitIdVerification"); + }); + + it("should show consent screen for the required id type", () => { + cy.visit("/kra-verification-ekyc"); + + cy.selectKRAType(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#consent-screen") + .should("be.visible"); + }); + + it("should show the select id page", () => { + cy.getIFrameBody().find("#back-button").click(); + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#back-button") + .click(); + + cy.getIFrameBody().find("#select-id-type").should("be.visible"); + }); }); diff --git a/cypress/tests/on-close.cy.js b/cypress/tests/on-close.cy.js index 921cc249..55218eb0 100644 --- a/cypress/tests/on-close.cy.js +++ b/cypress/tests/on-close.cy.js @@ -1,74 +1,58 @@ -describe('web integration - onClose', () => { - beforeEach(() => { - cy.loadIDOptions(); - cy.visit('/basic_kyc'); - }); +describe("web integration - onClose", () => { + beforeEach(() => { + cy.loadIDOptions(); + cy.visit("/basic_kyc"); + }); - it('should execute the `onClose` handler when the close button is clicked', () => { - cy.getIFrameBody() - .find('#select-id-type .close-iframe') - .click(); + it("should execute the `onClose` handler when the close button is clicked", () => { + cy.getIFrameBody().find("#select-id-type .close-iframe").click(); - cy.get('iframe') - .should('not.exist'); + cy.get("iframe").should("not.exist"); - cy.get('.validation-message') - .should('be.visible'); + cy.get(".validation-message").should("be.visible"); - cy.get('.validation-message') - .should('contain.text', 'User triggered'); - }); + cy.get(".validation-message").should("contain.text", "User triggered"); + }); - it('should not execute the `onClose` handler when consent is denied', () => { - cy.selectBVNMFAIDType(); - cy.getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#cancel') - .click(); + it("should not execute the `onClose` handler when consent is denied", () => { + cy.selectBVNMFAIDType(); + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#cancel") + .click(); - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#confirm-consent-rejection') - .click(); + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#confirm-consent-rejection") + .click(); - cy.get('iframe') - .should('not.exist'); + cy.get("iframe").should("not.exist"); - cy.get('.validation-message') - .should('be.visible'); + cy.get(".validation-message").should("be.visible"); - cy.get('.validation-message') - .should('not.contain.text', 'User triggered'); - }); + cy.get(".validation-message").should("not.contain.text", "User triggered"); + }); - it.only('should not execute the `onClose` handler when verification is successful', () => { - cy.selectNINIDType(); + it.only("should not execute the `onClose` handler when verification is successful", () => { + cy.selectNINIDType(); - cy - .intercept({ - method: 'POST', - url: '*v2/verify_async*' - }, { statusCode: 200, body: { success: true } }).as('submitIdVerification'); + cy.intercept( + { + method: "POST", + url: "*v2/verify_async*", + }, + { statusCode: 200, body: { success: true } }, + ).as("submitIdVerification"); - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); + cy.getIFrameBody().find("#id_number").type("12345678901"); - cy - .getIFrameBody() - .find('#submitForm') - .click(); - cy - .wait('@submitIdVerification'); + cy.getIFrameBody().find("#submitForm").click(); + cy.wait("@submitIdVerification"); - cy.get('iframe') - .should('not.exist'); + cy.get("iframe").should("not.exist"); - cy.get('.validation-message') - .should('not.exist'); - }); + cy.get(".validation-message").should("not.exist"); + }); }); diff --git a/cypress/tests/on-error.cy.js b/cypress/tests/on-error.cy.js index 0b7ffac3..440806c0 100644 --- a/cypress/tests/on-error.cy.js +++ b/cypress/tests/on-error.cy.js @@ -1,38 +1,26 @@ -describe('web-integration onError', () => { - beforeEach(() => { - cy.loadIDOptions(); - }); - - it('should run when an error is published from the integration', () => { - cy.visit('/basic_kyc'); - cy.selectBVNMFAIDType(); - - cy.getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - - cy.getTotpConsentApp() - .find('#id_number') - .type('00000000000'); - - cy.getTotpConsentApp() - .find('#query-otp-modes') - .click(); - - cy.getTotpConsentApp() - .find('form[name="select-mode-form"]') - .should('be.visible'); - - cy.getTotpConsentApp() - .find('#contact-methods-outdated') - .click(); - - cy.get('iframe') - .should('not.exist'); - - cy.get('.validation-message') - .should('be.visible'); - }) -}) +describe("web-integration onError", () => { + beforeEach(() => { + cy.loadIDOptions(); + }); + + it("should run when an error is published from the integration", () => { + cy.visit("/basic_kyc"); + cy.selectBVNMFAIDType(); + + cy.getIFrameBody().find("end-user-consent").shadow().find("#allow").click(); + + cy.getTotpConsentApp().find("#id_number").type("00000000000"); + + cy.getTotpConsentApp().find("#query-otp-modes").click(); + + cy.getTotpConsentApp() + .find('form[name="select-mode-form"]') + .should("be.visible"); + + cy.getTotpConsentApp().find("#contact-methods-outdated").click(); + + cy.get("iframe").should("not.exist"); + + cy.get(".validation-message").should("be.visible"); + }); +}); diff --git a/cypress/tests/smartselfie-auth.cy.js b/cypress/tests/smartselfie-auth.cy.js index 61e4d5fe..152ae19e 100644 --- a/cypress/tests/smartselfie-auth.cy.js +++ b/cypress/tests/smartselfie-auth.cy.js @@ -1,20 +1,23 @@ -describe('smartselfie authentication ', () => { - beforeEach(() => { +describe("smartselfie authentication ", () => { + beforeEach(() => { cy.visit("/smartselfie"); cy.getIFrameBody().should("be.visible"); - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/smartselfie.zip" - }).as('getUploadURL'); - }); + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/smartselfie.zip", + }, + ).as("getUploadURL"); + }); - describe('when a successful upload happens', () => { - beforeEach(() => { + describe("when a successful upload happens", () => { + beforeEach(() => { cy.intercept( { method: "PUT", @@ -22,52 +25,53 @@ describe('smartselfie authentication ', () => { }, { statusCode: 200, - } + }, ).as("successfulUpload"); - cy - .navigateThroughCameraScreens(); - }); + cy.navigateThroughCameraScreens(); + }); - it('should show the completion screen', () => { + it("should show the completion screen", () => { cy.wait("@getUploadURL"); - + cy.wait("@successfulUpload"); cy.getIFrameBody().find("#complete-screen").should("be.visible"); - }); - }); + }); + }); - describe('when the upload fails', () => { - beforeEach(() => { - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/smartselfie.zip' - }, { - statusCode: 412 - }).as('failedUploadRequest'); - cy - .navigateThroughCameraScreens(); - }); + describe("when the upload fails", () => { + beforeEach(() => { + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/smartselfie.zip", + }, + { + statusCode: 412, + }, + ).as("failedUploadRequest"); + cy.navigateThroughCameraScreens(); + }); it("should show the upload failure screen", () => { cy.wait("@getUploadURL"); - - cy.getIFrameBody().find("#upload-progress-screen").should("not.be.visible"); - + + cy.getIFrameBody() + .find("#upload-progress-screen") + .should("not.be.visible"); + cy.wait("@failedUploadRequest"); - + cy.getIFrameBody().find("#upload-failure-screen").should("be.visible"); }); - + it('should should retry upload when "try again" button is clicked', () => { - cy.wait("@getUploadURL"); - + cy.wait("@failedUploadRequest"); - + cy.getIFrameBody().find("#retry-upload").click(); - + cy.wait("@failedUploadRequest"); }); - }); + }); }); diff --git a/cypress/tests/thank-you-message.cy.js b/cypress/tests/thank-you-message.cy.js index 4cbe003f..04ce1bc7 100644 --- a/cypress/tests/thank-you-message.cy.js +++ b/cypress/tests/thank-you-message.cy.js @@ -1,163 +1,122 @@ -describe('Thank you message', () => { - describe('should contain country and id type', () => { - beforeEach(() => { - cy.loadIDOptions(); - }); - - it('for basic kyc', () => { - cy.visit('/basic_kyc'); - - cy - .selectNINIDType() - - cy - .intercept({ - method: 'POST', - url: '*v2/verify*' - }, { - statusCode: 200, - body: { success: true } - }).as('submitBasicKYC'); - - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@submitBasicKYC'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#thank-you-message') - .should('be.visible') - .should('contain', 'Nigeria') - .should('contain', 'National ID'); - }); - - it('for biometric kyc', () => { - cy.visit('/biometric_kyc'); - - cy - .selectBVNIDType() - - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }).as('getUploadURL'); - - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 200 - }).as('successfulUpload'); - - cy - .navigateThroughCameraScreens(); - - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy - .getIFrameBody() - .get('#id_number-hint') - .should('not.exist'); - - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@getUploadURL'); - - cy - .wait('@successfulUpload'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#thank-you-message') - .should('be.visible') - .should('contain', 'Nigeria') - .should('contain', 'Bank Verification'); - }); - - it('for enhanced kyc', () => { - cy.visit('/enhanced_kyc'); - - cy - .selectNINIDType() - - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy - .intercept({ - method: 'POST', - url: '*v1/async_id_verification*' - }, { - statusCode: 200, - body: { success: true } - }).as('submitEnhancedKYC'); - - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@submitEnhancedKYC'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy - .getIFrameBody() - .find('#thank-you-message') - .should('be.visible') - .should('contain', 'Nigeria') - .should('contain', 'National ID'); - }); - }); +describe("Thank you message", () => { + describe("should contain country and id type", () => { + beforeEach(() => { + cy.loadIDOptions(); + }); + + it("for basic kyc", () => { + cy.visit("/basic_kyc"); + + cy.selectNINIDType(); + + cy.intercept( + { + method: "POST", + url: "*v2/verify*", + }, + { + statusCode: 200, + body: { success: true }, + }, + ).as("submitBasicKYC"); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@submitBasicKYC"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.getIFrameBody() + .find("#thank-you-message") + .should("be.visible") + .should("contain", "Nigeria") + .should("contain", "National ID"); + }); + + it("for biometric kyc", () => { + cy.visit("/biometric_kyc"); + + cy.selectBVNIDType(); + + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ).as("getUploadURL"); + + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 200, + }, + ).as("successfulUpload"); + + cy.navigateThroughCameraScreens(); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.getIFrameBody().get("#id_number-hint").should("not.exist"); + + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@getUploadURL"); + + cy.wait("@successfulUpload"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.getIFrameBody() + .find("#thank-you-message") + .should("be.visible") + .should("contain", "Nigeria") + .should("contain", "Bank Verification"); + }); + + it("for enhanced kyc", () => { + cy.visit("/enhanced_kyc"); + + cy.selectNINIDType(); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.intercept( + { + method: "POST", + url: "*v1/async_id_verification*", + }, + { + statusCode: 200, + body: { success: true }, + }, + ).as("submitEnhancedKYC"); + + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@submitEnhancedKYC"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.getIFrameBody() + .find("#thank-you-message") + .should("be.visible") + .should("contain", "Nigeria") + .should("contain", "National ID"); + }); + }); }); diff --git a/cypress/tests/totp-consent.cy.js b/cypress/tests/totp-consent.cy.js index 4b4ae254..17494b6d 100644 --- a/cypress/tests/totp-consent.cy.js +++ b/cypress/tests/totp-consent.cy.js @@ -1,543 +1,396 @@ -describe('totpConsent', () => { - beforeEach(() => { - cy.loadIDOptions(); - }); - - describe('core', () => { - it('should not show up for non-BVN_MFA id types', () => { - cy.visit('/'); - - cy.selectNINIDType(); - - cy.getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - - cy.getTotpConsentApp() - .should('not.be.visible'); - }); - - it('should show up for BVN_MFA id types', () => { - cy.visit('/'); - cy.selectBVNMFAIDType(); - - cy.getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - - cy.getTotpConsentApp() - .find('#id-entry') - .should('be.visible'); - }); - - describe('queryOtpModes', () => { - it('should display a validation error message when the input is invalid', () => { - cy.visit('/'); - cy.selectBVNMFAIDType(); - - cy.getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - - cy.getTotpConsentApp() - .find('#id_number') - .type('000000'); - - cy.getTotpConsentApp() - .find('#query-otp-modes') - .click(); - - cy.getTotpConsentApp() - .find('#id_number-hint') - .should('be.visible'); - }); - - it('should display a network error message when there is a network error', () => { - cy.visit('/'); - cy.selectBVNMFAIDType(); - - cy.intercept('POST', '**/v1/totp_consent', { - statusCode: 400, - body: { - error: 'Result Not Found', - success: false - } - }); - - cy.getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - - cy.getTotpConsentApp() - .find('#id_number') - .type('00000000000'); - - cy.getTotpConsentApp() - .find('#query-otp-modes') - .click(); - - cy.getTotpConsentApp() - .find('.validation-message') - .should('be.visible'); - }); - }); - - describe('selectOtpMode', () => { - it('should display a network error message when there is a network error', () => { - cy.visit('/'); - cy.selectBVNMFAIDType(); - - cy.intercept('POST', '**/v1/totp_consent/mode', { - statusCode: 400, - body: { - error: 'Invalid Mode', - success: false - } - }); - - cy.getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - - cy.getTotpConsentApp() - .find('#id_number') - .type('00000000000'); - - cy.getTotpConsentApp() - .find('#query-otp-modes') - .click(); - - cy.getTotpConsentApp() - .find('[type="radio"]') - .check('sms'); - - cy.getTotpConsentApp() - .find('#select-otp-mode') - .click(); - - cy.getTotpConsentApp() - .find('.validation-message') - .should('be.visible') - .should('contain', 'Invalid Mode'); - }); - - it('should close if the user does not have access to any of the contact methods', () => { - cy.visit('/'); - cy.selectBVNMFAIDType(); - - cy.getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - - cy.getTotpConsentApp() - .find('#id_number') - .type('00000000000'); - - cy.getTotpConsentApp() - .find('#query-otp-modes') - .click(); - - cy.getTotpConsentApp() - .find('form[name="select-mode-form"]') - .should('be.visible'); - - cy.getTotpConsentApp() - .find('#contact-methods-outdated') - .click(); - - cy.get('iframe') - .should('not.exist'); - }); - }); - - describe('submitOtp', () => { - it('should display a network error message when there is a network error', () => { - cy.visit('/'); - cy.selectBVNMFAIDType(); - - cy.intercept('POST', '**/v1/totp_consent/otp', { - statusCode: 400, - body: { - error: 'Invalid OTP', - success: false - } - }); - - cy.getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - - cy.getTotpConsentApp() - .find('#id_number') - .type('00000000000'); - - cy.getTotpConsentApp() - .find('#query-otp-modes') - .click(); - - cy.getTotpConsentApp() - .find('form[name="select-mode-form"]') - .should('be.visible'); - - cy.getTotpConsentApp() - .find('[type="radio"]') - .check('sms'); - - cy.getTotpConsentApp() - .find('#select-otp-mode') - .click(); - - cy.getTotpConsentApp() - .find('form[name="select-mode-form"]') - .should('not.be.visible'); - - cy.getTotpConsentApp() - .find('#totp-token') - .type('123456') - - cy.getTotpConsentApp() - .find('#submit-otp') - .click(); - - cy.getTotpConsentApp() - .find('.validation-message') - .should('be.visible') - .should('contain', 'Invalid OTP'); - }); - - it('should navigate to the selectOtpMode screen when the user chooses to try another contact method', () => { - cy.visit('/'); - cy.selectBVNMFAIDType(); - - cy.getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - - cy.getTotpConsentApp() - .find('#id_number') - .type('00000000000'); - - cy.getTotpConsentApp() - .find('#query-otp-modes') - .click(); - - cy.getTotpConsentApp() - .find('[type="radio"]') - .check('sms'); - - cy.getTotpConsentApp() - .find('#select-otp-mode') - .click(); - - cy.getTotpConsentApp() - .find('.try-another-method') - .should('be.visible'); - - cy.getTotpConsentApp() - .find('.try-another-method') - .click(); - - cy.getTotpConsentApp() - .find('.try-another-method') - .should('not.be.visible'); - - cy.getTotpConsentApp() - .find('form[name="select-mode-form"]') - .should('be.visible') - }); - }); - }); - - describe('for basic kyc', () => { - beforeEach(() => { - cy - .intercept({ - method: 'POST', - url: '*v2/verify*' - }, {}).as('submitBasicKYC'); - }); - - it('should navigate to the id form after totp consent is granted, without the need to re-enter the id-number', () => { - cy.visit('/basic_kyc'); - cy.selectBVNMFAIDType(); - cy.navigateThroughTotpConsentApp(); - - cy.getIFrameBody() - .find('#id-info') - .should('be.visible'); - - cy.getIFrameBody() - .find('#id-number') - .should('not.be.visible'); - }); - - it('should set "Bank Verification Number (with OTP)" in the id selection list when previewBVNMFA is true', () => { - cy.visit('/basic_kyc_preview_bvn_mfa'); - cy.loadIDOptions(); - - cy - .getIFrameBody() - .find('#country') - .select('NG') - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') - - cy - .getIFrameBody() - .find('#id_type') - .should('contain', 'with OTP'); - - cy.visit('/basic_kyc'); - cy.loadIDOptions(); - - cy - .getIFrameBody() - .find('#country') - .select('NG') - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') - - cy - .getIFrameBody() - .find('#id_type') - .should('not.contain', 'with OTP'); - }); - }); - - describe('for biometric kyc', () => { - beforeEach(() => { - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }).as('getUploadURL'); - - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 200 - }).as('successfulUpload'); - }); - - it('should navigate to the camera screen, and submit after images are captured', () => { - cy.visit('/biometric_kyc'); - cy.selectBVNMFAIDType(); - cy.navigateThroughTotpConsentApp(); - - cy.getIFrameBody() - .find('end-user-consent') - .should('not.be.visible'); - - cy.navigateThroughCameraScreens(); - - cy.getIFrameBody() - .find('#id-info') - .should('not.be.visible'); - - cy - .wait('@getUploadURL'); - - cy - .wait('@successfulUpload'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - }); - - it('should set "Bank Verification Number (with OTP)" in the id selection list when previewBVNMFA is true', () => { - cy.visit('/biometric_kyc_preview_bvn_mfa'); - cy.loadIDOptions(); - - cy - .getIFrameBody() - .find('#country') - .select('NG') - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') - - cy - .getIFrameBody() - .find('#id_type') - .should('contain', 'with OTP'); - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') - - cy - .getIFrameBody() - .find('#submitConfig') - .click(); - - cy.navigateThroughTotpConsentApp(); - - cy.getIFrameBody() - .find('end-user-consent') - .should('not.be.visible'); - - cy.navigateThroughCameraScreens(); - - cy.getIFrameBody() - .find('#id-info') - .should('not.be.visible'); - - cy - .wait('@getUploadURL'); - - cy - .wait('@successfulUpload'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy.visit('/biometric_kyc'); - cy.loadIDOptions(); - - cy - .getIFrameBody() - .find('#country') - .select('NG') - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') - - cy - .getIFrameBody() - .find('#id_type') - .should('not.contain', 'with OTP'); - }); - }); - - describe('for enhanced kyc', () => { - beforeEach(() => { - cy - .intercept({ - method: 'POST', - url: '*v1/async_id_verification*' - }, { - statusCode: 200, - body: { success: true } - }).as('submitEnhancedKYC'); - }); - - it('should submit after totp consent is granted', () => { - cy.visit('/enhanced_kyc'); - cy.selectBVNMFAIDType(); - cy.navigateThroughTotpConsentApp(); - - cy.getIFrameBody() - .find('#id-info') - .should('not.be.visible'); - - cy - .wait('@submitEnhancedKYC'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - }); - - it('should set "Bank Verification Number (with OTP)" in the id selection list when previewBVNMFA is true', () => { - cy.visit('/enhanced_kyc_preview_bvn_mfa'); - cy.loadIDOptions(); - - cy - .getIFrameBody() - .find('#country') - .select('NG') - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') - - cy - .getIFrameBody() - .find('#id_type') - .should('contain', 'with OTP'); - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') - - cy - .getIFrameBody() - .find('#submitConfig') - .click(); - - cy.navigateThroughTotpConsentApp(); - - cy.getIFrameBody() - .find('end-user-consent') - .should('not.be.visible'); - - cy.getIFrameBody() - .find('#id-info') - .should('not.be.visible'); - - cy - .wait('@submitEnhancedKYC'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - - cy.visit('/enhanced_kyc'); - cy.loadIDOptions(); - - cy - .getIFrameBody() - .find('#country') - .select('NG') - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN_MFA') - - cy - .getIFrameBody() - .find('#id_type') - .should('not.contain', 'with OTP'); - }); - }); +describe("totpConsent", () => { + beforeEach(() => { + cy.loadIDOptions(); + }); + + describe("core", () => { + it("should not show up for non-BVN_MFA id types", () => { + cy.visit("/"); + + cy.selectNINIDType(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#allow") + .click(); + + cy.getTotpConsentApp().should("not.be.visible"); + }); + + it("should show up for BVN_MFA id types", () => { + cy.visit("/"); + cy.selectBVNMFAIDType(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#allow") + .click(); + + cy.getTotpConsentApp().find("#id-entry").should("be.visible"); + }); + + describe("queryOtpModes", () => { + it("should display a validation error message when the input is invalid", () => { + cy.visit("/"); + cy.selectBVNMFAIDType(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#allow") + .click(); + + cy.getTotpConsentApp().find("#id_number").type("000000"); + + cy.getTotpConsentApp().find("#query-otp-modes").click(); + + cy.getTotpConsentApp().find("#id_number-hint").should("be.visible"); + }); + + it("should display a network error message when there is a network error", () => { + cy.visit("/"); + cy.selectBVNMFAIDType(); + + cy.intercept("POST", "**/v1/totp_consent", { + statusCode: 400, + body: { + error: "Result Not Found", + success: false, + }, + }); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#allow") + .click(); + + cy.getTotpConsentApp().find("#id_number").type("00000000000"); + + cy.getTotpConsentApp().find("#query-otp-modes").click(); + + cy.getTotpConsentApp().find(".validation-message").should("be.visible"); + }); + }); + + describe("selectOtpMode", () => { + it("should display a network error message when there is a network error", () => { + cy.visit("/"); + cy.selectBVNMFAIDType(); + + cy.intercept("POST", "**/v1/totp_consent/mode", { + statusCode: 400, + body: { + error: "Invalid Mode", + success: false, + }, + }); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#allow") + .click(); + + cy.getTotpConsentApp().find("#id_number").type("00000000000"); + + cy.getTotpConsentApp().find("#query-otp-modes").click(); + + cy.getTotpConsentApp().find('[type="radio"]').check("sms"); + + cy.getTotpConsentApp().find("#select-otp-mode").click(); + + cy.getTotpConsentApp() + .find(".validation-message") + .should("be.visible") + .should("contain", "Invalid Mode"); + }); + + it("should close if the user does not have access to any of the contact methods", () => { + cy.visit("/"); + cy.selectBVNMFAIDType(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#allow") + .click(); + + cy.getTotpConsentApp().find("#id_number").type("00000000000"); + + cy.getTotpConsentApp().find("#query-otp-modes").click(); + + cy.getTotpConsentApp() + .find('form[name="select-mode-form"]') + .should("be.visible"); + + cy.getTotpConsentApp().find("#contact-methods-outdated").click(); + + cy.get("iframe").should("not.exist"); + }); + }); + + describe("submitOtp", () => { + it("should display a network error message when there is a network error", () => { + cy.visit("/"); + cy.selectBVNMFAIDType(); + + cy.intercept("POST", "**/v1/totp_consent/otp", { + statusCode: 400, + body: { + error: "Invalid OTP", + success: false, + }, + }); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#allow") + .click(); + + cy.getTotpConsentApp().find("#id_number").type("00000000000"); + + cy.getTotpConsentApp().find("#query-otp-modes").click(); + + cy.getTotpConsentApp() + .find('form[name="select-mode-form"]') + .should("be.visible"); + + cy.getTotpConsentApp().find('[type="radio"]').check("sms"); + + cy.getTotpConsentApp().find("#select-otp-mode").click(); + + cy.getTotpConsentApp() + .find('form[name="select-mode-form"]') + .should("not.be.visible"); + + cy.getTotpConsentApp().find("#totp-token").type("123456"); + + cy.getTotpConsentApp().find("#submit-otp").click(); + + cy.getTotpConsentApp() + .find(".validation-message") + .should("be.visible") + .should("contain", "Invalid OTP"); + }); + + it("should navigate to the selectOtpMode screen when the user chooses to try another contact method", () => { + cy.visit("/"); + cy.selectBVNMFAIDType(); + + cy.getIFrameBody() + .find("end-user-consent") + .shadow() + .find("#allow") + .click(); + + cy.getTotpConsentApp().find("#id_number").type("00000000000"); + + cy.getTotpConsentApp().find("#query-otp-modes").click(); + + cy.getTotpConsentApp().find('[type="radio"]').check("sms"); + + cy.getTotpConsentApp().find("#select-otp-mode").click(); + + cy.getTotpConsentApp().find(".try-another-method").should("be.visible"); + + cy.getTotpConsentApp().find(".try-another-method").click(); + + cy.getTotpConsentApp() + .find(".try-another-method") + .should("not.be.visible"); + + cy.getTotpConsentApp() + .find('form[name="select-mode-form"]') + .should("be.visible"); + }); + }); + }); + + describe("for basic kyc", () => { + beforeEach(() => { + cy.intercept( + { + method: "POST", + url: "*v2/verify*", + }, + {}, + ).as("submitBasicKYC"); + }); + + it("should navigate to the id form after totp consent is granted, without the need to re-enter the id-number", () => { + cy.visit("/basic_kyc"); + cy.selectBVNMFAIDType(); + cy.navigateThroughTotpConsentApp(); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + + cy.getIFrameBody().find("#id-number").should("not.be.visible"); + }); + + it('should set "Bank Verification Number (with OTP)" in the id selection list when previewBVNMFA is true', () => { + cy.visit("/basic_kyc_preview_bvn_mfa"); + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").select("NG"); + + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); + + cy.getIFrameBody().find("#id_type").should("contain", "with OTP"); + + cy.visit("/basic_kyc"); + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").select("NG"); + + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); + + cy.getIFrameBody().find("#id_type").should("not.contain", "with OTP"); + }); + }); + + describe("for biometric kyc", () => { + beforeEach(() => { + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ).as("getUploadURL"); + + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 200, + }, + ).as("successfulUpload"); + }); + + it("should navigate to the camera screen, and submit after images are captured", () => { + cy.visit("/biometric_kyc"); + cy.selectBVNMFAIDType(); + cy.navigateThroughTotpConsentApp(); + + cy.getIFrameBody().find("end-user-consent").should("not.be.visible"); + + cy.navigateThroughCameraScreens(); + + cy.getIFrameBody().find("#id-info").should("not.be.visible"); + + cy.wait("@getUploadURL"); + + cy.wait("@successfulUpload"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + }); + + it('should set "Bank Verification Number (with OTP)" in the id selection list when previewBVNMFA is true', () => { + cy.visit("/biometric_kyc_preview_bvn_mfa"); + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").select("NG"); + + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); + + cy.getIFrameBody().find("#id_type").should("contain", "with OTP"); + + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); + + cy.getIFrameBody().find("#submitConfig").click(); + + cy.navigateThroughTotpConsentApp(); + + cy.getIFrameBody().find("end-user-consent").should("not.be.visible"); + + cy.navigateThroughCameraScreens(); + + cy.getIFrameBody().find("#id-info").should("not.be.visible"); + + cy.wait("@getUploadURL"); + + cy.wait("@successfulUpload"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.visit("/biometric_kyc"); + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").select("NG"); + + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); + + cy.getIFrameBody().find("#id_type").should("not.contain", "with OTP"); + }); + }); + + describe("for enhanced kyc", () => { + beforeEach(() => { + cy.intercept( + { + method: "POST", + url: "*v1/async_id_verification*", + }, + { + statusCode: 200, + body: { success: true }, + }, + ).as("submitEnhancedKYC"); + }); + + it("should submit after totp consent is granted", () => { + cy.visit("/enhanced_kyc"); + cy.selectBVNMFAIDType(); + cy.navigateThroughTotpConsentApp(); + + cy.getIFrameBody().find("#id-info").should("not.be.visible"); + + cy.wait("@submitEnhancedKYC"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + }); + + it('should set "Bank Verification Number (with OTP)" in the id selection list when previewBVNMFA is true', () => { + cy.visit("/enhanced_kyc_preview_bvn_mfa"); + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").select("NG"); + + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); + + cy.getIFrameBody().find("#id_type").should("contain", "with OTP"); + + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); + + cy.getIFrameBody().find("#submitConfig").click(); + + cy.navigateThroughTotpConsentApp(); + + cy.getIFrameBody().find("end-user-consent").should("not.be.visible"); + + cy.getIFrameBody().find("#id-info").should("not.be.visible"); + + cy.wait("@submitEnhancedKYC"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + + cy.visit("/enhanced_kyc"); + cy.loadIDOptions(); + + cy.getIFrameBody().find("#country").select("NG"); + + cy.getIFrameBody().find("#id_type").select("BVN_MFA"); + + cy.getIFrameBody().find("#id_type").should("not.contain", "with OTP"); + }); + }); }); diff --git a/cypress/tests/upload-zip.cy.js b/cypress/tests/upload-zip.cy.js index d1d479d6..8b52e16b 100644 --- a/cypress/tests/upload-zip.cy.js +++ b/cypress/tests/upload-zip.cy.js @@ -1,150 +1,104 @@ -describe('zip upload screens', () => { - beforeEach(() => { - cy.loadIDOptions(); - - cy.visit('/'); - - cy - .selectNINIDType() - - cy - .intercept({ - method: 'POST', - url: '*upload*' - }, { - upload_url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip" - }).as('getUploadURL'); - - cy - .getIFrameBody() - .find('end-user-consent') - .shadow() - .find('#allow') - .click(); - - cy - .navigateThroughCameraScreens(); - - cy - .getIFrameBody() - .find('#id-info') - .should('be.visible'); - }); - - describe('when a successful upload happens', () => { - beforeEach(() => { - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 200 - }).as('successfulUpload'); - }); - - it('should show the completion screen', () => { - cy - .getIFrameBody() - .get('#id_number-hint') - .should('not.exist'); - - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@getUploadURL'); - - cy - .wait('@successfulUpload'); - - cy - .getIFrameBody() - .find('#complete-screen') - .should('be.visible'); - }); - }); - - describe('when the upload fails', () => { - beforeEach(() => { - cy - .intercept({ - method: 'PUT', - url: 'https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip' - }, { - statusCode: 412 - }).as('failedUploadRequest'); - }); - - it('should should show the upload failure screen', () => { - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .getIFrameBody() - .find('#id-info') - .should('not.be.visible'); - - cy - .wait('@getUploadURL'); - - cy - .wait('@failedUploadRequest'); - - cy - .getIFrameBody() - .find('#upload-progress-screen') - .should('not.be.visible'); - - cy - .getIFrameBody() - .find('#upload-failure-screen') - .should('be.visible'); - - cy.getIFrameBody() - .find('#retry-upload') - .click(); - - cy - .wait('@failedUploadRequest'); - }); - - it('should should retry upload when "try again" button is clicked', () => { - cy - .getIFrameBody() - .find('#id_number') - .type('12345678901'); - - cy - .getIFrameBody() - .find('#submitForm') - .click(); - - cy - .wait('@getUploadURL'); - - cy - .wait('@failedUploadRequest'); - - cy.getIFrameBody() - .find('#retry-upload') - .click(); - - cy - .wait('@failedUploadRequest'); - }); - }); +describe("zip upload screens", () => { + beforeEach(() => { + cy.loadIDOptions(); + + cy.visit("/"); + + cy.selectNINIDType(); + + cy.intercept( + { + method: "POST", + url: "*upload*", + }, + { + upload_url: + "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + ).as("getUploadURL"); + + cy.getIFrameBody().find("end-user-consent").shadow().find("#allow").click(); + + cy.navigateThroughCameraScreens(); + + cy.getIFrameBody().find("#id-info").should("be.visible"); + }); + + describe("when a successful upload happens", () => { + beforeEach(() => { + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 200, + }, + ).as("successfulUpload"); + }); + + it("should show the completion screen", () => { + cy.getIFrameBody().get("#id_number-hint").should("not.exist"); + + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@getUploadURL"); + + cy.wait("@successfulUpload"); + + cy.getIFrameBody().find("#complete-screen").should("be.visible"); + }); + }); + + describe("when the upload fails", () => { + beforeEach(() => { + cy.intercept( + { + method: "PUT", + url: "https://smile-uploads-development01.s3.us-west-2.amazonaws.com/videos/212/212-0000060103-0gdzke3mdtlco5k0sdfh6vifzcrd3n/ekyc_smartselfie.zip", + }, + { + statusCode: 412, + }, + ).as("failedUploadRequest"); + }); + + it("should should show the upload failure screen", () => { + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.getIFrameBody().find("#id-info").should("not.be.visible"); + + cy.wait("@getUploadURL"); + + cy.wait("@failedUploadRequest"); + + cy.getIFrameBody() + .find("#upload-progress-screen") + .should("not.be.visible"); + + cy.getIFrameBody().find("#upload-failure-screen").should("be.visible"); + + cy.getIFrameBody().find("#retry-upload").click(); + + cy.wait("@failedUploadRequest"); + }); + + it('should should retry upload when "try again" button is clicked', () => { + cy.getIFrameBody().find("#id_number").type("12345678901"); + + cy.getIFrameBody().find("#submitForm").click(); + + cy.wait("@getUploadURL"); + + cy.wait("@failedUploadRequest"); + + cy.getIFrameBody().find("#retry-upload").click(); + + cy.wait("@failedUploadRequest"); + }); + }); }); diff --git a/cypress/tests/verification-method-selection.cy.js b/cypress/tests/verification-method-selection.cy.js index da7c73e7..86e1bb6e 100644 --- a/cypress/tests/verification-method-selection.cy.js +++ b/cypress/tests/verification-method-selection.cy.js @@ -1,96 +1,99 @@ -describe('Verification Method Selection', () => { - describe('multiple countries / id_types', () => { - beforeEach(() => { - cy.visit('/verification-method-selection'); - }); - - describe('biometric_kyc', () => { - it('should redirect to the biometric kyc sequence in a nested iframe', () => { - cy.selectBVNIDType(); - - cy - .getIFrameBody() - .find('iframe[data-cy="smile-identity-hosted-web-integration-post-product-selection"]') - .should('have.attr', 'src', 'http://localhost:8000/biometric-kyc.html') - }); - }); - - describe('doc_verification', () => { - it('should redirect to the biometric kyc sequence in a nested iframe', () => { - cy.selectPASSPORTIDType(); - - cy - .getIFrameBody() - .find('iframe[data-cy="smile-identity-hosted-web-integration-post-product-selection"]') - .should('have.attr', 'src', 'http://localhost:8000/doc-verification.html') - }); - }); - - describe('enhanced_kyc', () => { - it('should redirect to the biometric kyc sequence in a nested iframe', () => { - cy.selectNINIDType(); - - cy - .getIFrameBody() - .find('iframe[data-cy="smile-identity-hosted-web-integration-post-product-selection"]') - .should('have.attr', 'src', 'http://localhost:8000/ekyc.html') - }); - }); +describe("Verification Method Selection", () => { + describe("multiple countries / id_types", () => { + beforeEach(() => { + cy.visit("/verification-method-selection"); }); - describe('single country / multiple id_types', () => { - beforeEach(() => { - cy.visit('/verification-method-selection-single-country-multiple-id-types'); - }); - - it('disables country selector, allows id_type selection', () => { - cy - .getIFrameBody() - .find('#country option:selected') - .should('have.text', 'Nigeria'); - - cy - .getIFrameBody() - .find('#id_type') - .select('BVN'); - - cy - .getIFrameBody() - .find('#submitConfig') - .click(); - - cy - .getIFrameBody() - .find('iframe[data-cy="smile-identity-hosted-web-integration-post-product-selection"]') - .should('have.attr', 'src', 'http://localhost:8000/biometric-kyc.html') - }); + describe("biometric_kyc", () => { + it("should redirect to the biometric kyc sequence in a nested iframe", () => { + cy.selectBVNIDType(); + + cy.getIFrameBody() + .find( + 'iframe[data-cy="smile-identity-hosted-web-integration-post-product-selection"]', + ) + .should( + "have.attr", + "src", + "http://localhost:8000/biometric-kyc.html", + ); + }); }); - describe('single country / id_type', () => { - beforeEach(() => { - cy.visit('/verification-method-selection-single-country-single-id-type'); - }); - - it('goes directly to the web embed', () => { - cy - .getIFrameBody() - .find('#country option:selected') - .should('have.text', 'Nigeria'); - - cy - .getIFrameBody() - .find('#id_type option:selected') - .should('have.text', 'Bank Verification Number'); - - cy - .getIFrameBody() - .find('#submitConfig') - .click(); - - cy - .getIFrameBody() - .find('iframe[data-cy="smile-identity-hosted-web-integration-post-product-selection"]') - .should('have.attr', 'src', 'http://localhost:8000/biometric-kyc.html') - }); + describe("doc_verification", () => { + it("should redirect to the biometric kyc sequence in a nested iframe", () => { + cy.selectPASSPORTIDType(); + + cy.getIFrameBody() + .find( + 'iframe[data-cy="smile-identity-hosted-web-integration-post-product-selection"]', + ) + .should( + "have.attr", + "src", + "http://localhost:8000/doc-verification.html", + ); + }); }); + + describe("enhanced_kyc", () => { + it("should redirect to the biometric kyc sequence in a nested iframe", () => { + cy.selectNINIDType(); + + cy.getIFrameBody() + .find( + 'iframe[data-cy="smile-identity-hosted-web-integration-post-product-selection"]', + ) + .should("have.attr", "src", "http://localhost:8000/ekyc.html"); + }); + }); + }); + + describe("single country / multiple id_types", () => { + beforeEach(() => { + cy.visit( + "/verification-method-selection-single-country-multiple-id-types", + ); + }); + + it("disables country selector, allows id_type selection", () => { + cy.getIFrameBody() + .find("#country option:selected") + .should("have.text", "Nigeria"); + + cy.getIFrameBody().find("#id_type").select("BVN"); + + cy.getIFrameBody().find("#submitConfig").click(); + + cy.getIFrameBody() + .find( + 'iframe[data-cy="smile-identity-hosted-web-integration-post-product-selection"]', + ) + .should("have.attr", "src", "http://localhost:8000/biometric-kyc.html"); + }); + }); + + describe("single country / id_type", () => { + beforeEach(() => { + cy.visit("/verification-method-selection-single-country-single-id-type"); + }); + + it("goes directly to the web embed", () => { + cy.getIFrameBody() + .find("#country option:selected") + .should("have.text", "Nigeria"); + + cy.getIFrameBody() + .find("#id_type option:selected") + .should("have.text", "Bank Verification Number"); + + cy.getIFrameBody().find("#submitConfig").click(); + + cy.getIFrameBody() + .find( + 'iframe[data-cy="smile-identity-hosted-web-integration-post-product-selection"]', + ) + .should("have.attr", "src", "http://localhost:8000/biometric-kyc.html"); + }); + }); }); diff --git a/esbuild.js b/esbuild.js index f74f58f4..fb26fa65 100644 --- a/esbuild.js +++ b/esbuild.js @@ -22,6 +22,7 @@ const ensureDirSync = (dirPath) => { const copySync = (srcDir, destDir, filterFn) => { const entries = fs.readdirSync(srcDir, { withFileTypes: true }); + // eslint-disable-next-line no-restricted-syntax for (const entry of entries) { const srcPath = path.join(srcDir, entry.name); const destPath = path.join(destDir, entry.name); diff --git a/package-lock.json b/package-lock.json index ad28d651..699369b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,19 +8,34 @@ "name": "@smile_identity/web-page", "version": "1.0.0", "dependencies": { + "esbuild": "^0.19.4", "jszip": "^3.10.1", + "rimraf": "^5.0.5", "validate.js": "^0.13.1" }, "devDependencies": { "@cypress/code-coverage": "3.12.1", "cypress": "^13.3.0", - "esbuild": "^0.19.4", + "eslint": "^8.50.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-cypress": "^2.15.1", + "eslint-plugin-import": "^2.28.1", + "eslint-plugin-prettier": "^5.0.0", "nyc": "15.1.0", "prettier": "^3.0.3", - "rimraf": "^5.0.5", "serve": "14.2.1" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -1966,7 +1981,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "android" @@ -1982,7 +1996,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "android" @@ -1998,7 +2011,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "android" @@ -2014,7 +2026,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -2030,7 +2041,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -2046,7 +2056,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "freebsd" @@ -2062,7 +2071,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "freebsd" @@ -2078,7 +2086,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2094,7 +2101,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2110,7 +2116,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2126,7 +2131,6 @@ "cpu": [ "loong64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2142,7 +2146,6 @@ "cpu": [ "mips64el" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2158,7 +2161,6 @@ "cpu": [ "ppc64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2174,7 +2176,6 @@ "cpu": [ "riscv64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2190,7 +2191,6 @@ "cpu": [ "s390x" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2206,7 +2206,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -2222,7 +2221,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "netbsd" @@ -2238,7 +2236,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "openbsd" @@ -2254,7 +2251,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "sunos" @@ -2270,7 +2266,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -2286,7 +2281,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "win32" @@ -2302,7 +2296,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -2311,11 +2304,178 @@ "node": ">=12" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.1.tgz", + "integrity": "sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.22.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", + "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", + "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", + "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -2332,7 +2492,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, "engines": { "node": ">=12" }, @@ -2344,7 +2503,6 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, "engines": { "node": ">=12" }, @@ -2355,14 +2513,12 @@ "node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -2379,7 +2535,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, "dependencies": { "ansi-regex": "^6.0.1" }, @@ -2394,7 +2549,6 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -2530,12 +2684,37 @@ "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, "optional": true, "engines": { "node": ">=14" } }, + "node_modules/@pkgr/utils": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.0", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.6.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@pkgr/utils/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/@types/eslint": { "version": "8.44.3", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.3.tgz", @@ -2572,10 +2751,16 @@ "dev": true, "peer": true }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "node_modules/@types/node": { - "version": "18.18.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.1.tgz", - "integrity": "sha512-3G42sxmm0fF2+Vtb9TJQpnjmP+uKlWvFa8KoEGquh4gqRmoUG/N0ufuhikw6HEsdG2G2oIKhog1GCTfz9v5NdQ==", + "version": "20.8.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.2.tgz", + "integrity": "sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==", "dev": true }, "node_modules/@types/sinonjs__fake-timers": { @@ -2799,7 +2984,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true, - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2817,6 +3001,15 @@ "acorn": "^8" } }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -2927,7 +3120,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -2997,6 +3189,38 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", + "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -3006,6 +3230,82 @@ "node": ">=8" } }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", + "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -3054,6 +3354,18 @@ "node": ">= 4.0.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -3240,8 +3552,7 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/base64-js": { "version": "1.5.1", @@ -3272,6 +3583,15 @@ "tweetnacl": "^0.14.3" } }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, "node_modules/blob-util": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", @@ -3421,6 +3741,18 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -3503,10 +3835,25 @@ "dev": true, "peer": true }, - "node_modules/bytes": { + "node_modules/bundle-name": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", "dev": true, "engines": { "node": ">= 0.8" @@ -3549,6 +3896,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -3945,6 +4301,12 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "node_modules/confusing-browser-globals": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", + "dev": true + }, "node_modules/content-disposition": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", @@ -3986,7 +4348,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -4054,6 +4415,12 @@ "node": "^16.0.0 || ^18.0.0 || >=20.0.0" } }, + "node_modules/cypress/node_modules/@types/node": { + "version": "18.18.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.3.tgz", + "integrity": "sha512-0OVfGupTl3NBFr8+iXpfZ8NR7jfFO+P1Q+IO/q0wbo02wYkP5gy36phojeYWpLQ6WAMjl+VfmqUk2YbUfp0irA==", + "dev": true + }, "node_modules/cypress/node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -4170,6 +4537,168 @@ "node": ">=4.0.0" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/default-browser/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/default-browser/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/default-require-extensions": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", @@ -4182,6 +4711,49 @@ "node": ">=8" } }, + "node_modules/define-data-property": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", + "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -4203,11 +4775,22 @@ "node": ">=8" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "node_modules/ecc-jsbn": { "version": "0.1.2", @@ -4228,8 +4811,7 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/end-of-stream": { "version": "1.4.4", @@ -4266,6 +4848,59 @@ "node": ">=8.6" } }, + "node_modules/es-abstract": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.2.tgz", + "integrity": "sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.1", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.12", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es-module-lexer": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", @@ -4273,6 +4908,46 @@ "dev": true, "peer": true }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", @@ -4283,7 +4958,6 @@ "version": "0.19.4", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.4.tgz", "integrity": "sha512-x7jL0tbRRpv4QUyuDMjONtWFciygUxWaUM1kMX2zWxI0X2YWOt7MSA0g4UdeSiHM8fcYVzpQhKYOycZwxTdZkA==", - "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -4334,52 +5008,528 @@ "node": ">=0.8.0" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "node_modules/eslint": { + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", + "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "8.50.0", + "@humanwhocodes/config-array": "^0.11.11", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-airbnb-base": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", "dev": true, - "peer": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5", + "semver": "^6.3.0" }, "engines": { - "node": ">=8.0.0" + "node": "^10.12.0 || >=12.0.0" + }, + "peerDependencies": { + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.2" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "node_modules/eslint-config-prettier": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", + "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", "dev": true, "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" + "eslint-config-prettier": "bin/cli.js" }, - "engines": { - "node": ">=4" + "peerDependencies": { + "eslint": ">=7.0.0" } }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, - "peer": true, "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" } }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-cypress": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-cypress/-/eslint-plugin-cypress-2.15.1.tgz", + "integrity": "sha512-eLHLWP5Q+I4j2AWepYq0PgFEei9/s5LvjuSqWrxurkg1YZ8ltxdvMNmdSf0drnsNo57CTgYY/NIHHLRSWejR7w==", + "dev": true, + "dependencies": { + "globals": "^13.20.0" + }, + "peerDependencies": { + "eslint": ">= 3.2.1" + } + }, + "node_modules/eslint-plugin-cypress/node_modules/globals": { + "version": "13.22.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", + "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-cypress/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.28.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz", + "integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.findlastindex": "^1.2.2", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.8.0", + "has": "^1.0.3", + "is-core-module": "^2.13.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.6", + "object.groupby": "^1.0.0", + "object.values": "^1.1.6", + "semver": "^6.3.1", + "tsconfig-paths": "^3.14.2" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz", + "integrity": "sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.5" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.22.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", + "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, "engines": { "node": ">=4.0" } @@ -4399,7 +5549,6 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -4496,6 +5645,12 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, "node_modules/fast-glob": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", @@ -4586,8 +5741,13 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "peer": true + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true }, "node_modules/fast-url-parser": { "version": "1.1.3", @@ -4631,6 +5791,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/find-cache-dir": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", @@ -4661,6 +5833,50 @@ "node": ">=8" } }, + "node_modules/flat-cache": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", + "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==", + "dev": true, + "dependencies": { + "flatted": "^3.2.7", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/foreground-child": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", @@ -4729,6 +5945,33 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -4786,6 +6029,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/getos": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", @@ -4824,6 +6083,18 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", @@ -4855,6 +6126,21 @@ "node": ">=4" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "11.0.4", "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", @@ -4875,12 +6161,30 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -4893,6 +6197,15 @@ "node": ">= 0.4.0" } }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4902,6 +6215,18 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", @@ -4926,6 +6251,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hasha": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", @@ -5005,6 +6345,31 @@ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -5033,18 +6398,86 @@ "wrappy": "1" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, "engines": { - "node": ">=10" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-ci": { @@ -5064,7 +6497,6 @@ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, - "peer": true, "dependencies": { "has": "^1.0.3" }, @@ -5072,6 +6504,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-docker": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", @@ -5100,7 +6547,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, "engines": { "node": ">=8" } @@ -5117,6 +6563,39 @@ "node": ">=0.10.0" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-installed-globally": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", @@ -5133,6 +6612,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -5154,6 +6660,34 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -5166,6 +6700,51 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -5184,6 +6763,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -5213,8 +6804,7 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "node_modules/isstream": { "version": "0.1.2", @@ -5357,7 +6947,6 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", - "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -5423,6 +7012,12 @@ "node": ">=4" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -5442,6 +7037,12 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -5507,6 +7108,15 @@ "setimmediate": "^1.0.5" } }, + "node_modules/keyv": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", + "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/lazy-ass": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", @@ -5516,6 +7126,19 @@ "node": "> 0.8" } }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/lie": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", @@ -5652,6 +7275,12 @@ "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "node_modules/lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", @@ -5836,7 +7465,6 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", - "dev": true, "engines": { "node": ">=16 || 14 >=14.17" } @@ -5847,6 +7475,12 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -5958,6 +7592,93 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz", + "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", + "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", + "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1" + } + }, + "node_modules/object.values": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/on-headers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", @@ -5991,6 +7712,41 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "dependencies": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/ospath": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", @@ -6065,6 +7821,18 @@ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -6093,7 +7861,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, "engines": { "node": ">=8" } @@ -6102,14 +7869,12 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/path-scurry": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", - "dev": true, "dependencies": { "lru-cache": "^9.1.1 || ^10.0.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -6125,7 +7890,6 @@ "version": "10.0.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", - "dev": true, "engines": { "node": "14 || >=16.14" } @@ -6196,6 +7960,15 @@ "node": ">=8" } }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/prettier": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", @@ -6211,6 +7984,18 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", @@ -6409,6 +8194,23 @@ "@babel/runtime": "^7.8.4" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regexpu-core": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", @@ -6528,7 +8330,6 @@ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.6.tgz", "integrity": "sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==", "dev": true, - "peer": true, "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -6577,7 +8378,6 @@ "version": "5.0.5", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", - "dev": true, "dependencies": { "glob": "^10.3.7" }, @@ -6595,7 +8395,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -6604,7 +8403,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" @@ -6620,7 +8418,6 @@ "version": "10.3.10", "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", - "dev": true, "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.3.5", @@ -6642,7 +8439,6 @@ "version": "9.0.3", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, @@ -6657,7 +8453,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, "engines": { "node": ">=14" }, @@ -6665,6 +8460,65 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/run-applescript/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -6697,11 +8551,49 @@ "tslib": "~2.1.0" } }, + "node_modules/safe-array-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -6843,6 +8735,20 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -6852,7 +8758,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -6864,7 +8769,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, "engines": { "node": ">=8" } @@ -7041,7 +8945,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7056,7 +8959,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7066,11 +8968,55 @@ "node": ">=8" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -7083,7 +9029,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -7138,7 +9083,6 @@ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, - "peer": true, "engines": { "node": ">= 0.4" }, @@ -7146,6 +9090,28 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dev": true, + "dependencies": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/synckit/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -7284,6 +9250,12 @@ "node": ">=8" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, "node_modules/throttleit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", @@ -7296,6 +9268,18 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -7356,6 +9340,39 @@ "node": ">=6" } }, + "node_modules/tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/tslib": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", @@ -7380,6 +9397,18 @@ "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", @@ -7389,6 +9418,71 @@ "node": ">=8" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -7398,6 +9492,21 @@ "is-typedarray": "^1.0.0" } }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -7700,7 +9809,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -7711,12 +9819,47 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "node_modules/which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/widest-line": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", @@ -7801,7 +9944,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -7818,7 +9960,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -7833,7 +9974,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -7844,8 +9984,7 @@ "node_modules/wrap-ansi-cjs/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", diff --git a/package.json b/package.json index 007bb7df..818829c1 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,11 @@ "build": "NODE_ENV=development node esbuild.js", "clean": "rimraf build dist", "instrument": "nyc instrument src build", + "lint:html": "npx prettier --write $(git ls-files '*.html')", + "lint": "eslint \"**/*.js\"", "start:dist": "npm run build:dist && npx serve -p 8000 dist", "start": "npm run build && npx serve -p 8000 build", - "test": "npx cypress run", - "lint:html": "npx prettier --write $(git ls-files '*.html')" + "test": "npx cypress run" }, "repository": { "type": "git", @@ -26,14 +27,20 @@ "devDependencies": { "@cypress/code-coverage": "3.12.1", "cypress": "^13.3.0", - "esbuild": "^0.19.4", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-cypress": "^2.15.1", + "eslint-plugin-import": "^2.28.1", + "eslint-plugin-prettier": "^5.0.0", + "eslint": "^8.50.0", "nyc": "15.1.0", "prettier": "^3.0.3", - "rimraf": "^5.0.5", "serve": "14.2.1" }, "dependencies": { + "esbuild": "^0.19.4", "jszip": "^3.10.1", + "rimraf": "^5.0.5", "validate.js": "^0.13.1" } } diff --git a/src/css/styles.css b/src/css/styles.css index 7bc52df5..4256bac1 100644 --- a/src/css/styles.css +++ b/src/css/styles.css @@ -1,383 +1,407 @@ :root { - --flow-space: 1rem; - --color-active: #001096; - --color-default: #2D2B2A; - --color-disabled: #848282; + --flow-space: 1rem; + --color-active: #001096; + --color-default: #2d2b2a; + --color-disabled: #848282; } -*, ::after, ::before { - box-sizing: border-box +*, +::after, +::before { + box-sizing: border-box; } -blockquote, body, dd, dl, figure, h1, h2, h3, h4, p { - margin: 0 +blockquote, +body, +dd, +dl, +figure, +h1, +h2, +h3, +h4, +p { + margin: 0; } -ol[role=list], ul[role=list] { - list-style: none +ol[role="list"], +ul[role="list"] { + list-style: none; } html:focus-within { - scroll-behavior: smooth + scroll-behavior: smooth; } a:not([class]) { - text-decoration-skip-ink: auto + text-decoration-skip-ink: auto; } -img, picture { - max-width: 100%; - display: block +img, +picture { + max-width: 100%; + display: block; } -button, input, select, textarea { - font: inherit +button, +input, +select, +textarea { + font: inherit; } @media (prefers-reduced-motion: reduce) { - html:focus-within { - scroll-behavior:auto - } + html:focus-within { + scroll-behavior: auto; + } - *, ::after, ::before { - animation-duration: 0s !important; - animation-iteration-count: 1 !important; - transition-duration: 0s !important; - scroll-behavior:auto !important - } + *, + ::after, + ::before { + animation-duration: 0s !important; + animation-iteration-count: 1 !important; + transition-duration: 0s !important; + scroll-behavior: auto !important; + } } [hidden] { - display: none !important; + display: none !important; } html { - font-family: 'DM Sans', sans-serif; + font-family: "DM Sans", sans-serif; } body { - min-height: 100vh; - text-rendering: optimizeSpeed; - color: #1c2334; - line-height: 1.5; - display: flex; - flex-direction: column; - position: relative; + min-height: 100vh; + text-rendering: optimizeSpeed; + color: #1c2334; + line-height: 1.5; + display: flex; + flex-direction: column; + position: relative; } main { - width: 100%; - max-width: 40rem; - background: #ffffff; - border-radius: 2rem; - padding: 2rem; - overflow-y: scroll; - position: absolute; - max-height: 100vh; + width: 100%; + max-width: 40rem; + background: #ffffff; + border-radius: 2rem; + padding: 2rem; + overflow-y: scroll; + position: absolute; + max-height: 100vh; } @media screen and (min-width: 40rem) { - main { - padding: 2rem 5rem; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } + main { + padding: 2rem 5rem; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } } @media screen and (min-width: 80rem) { - main { - max-height: 80%; - } + main { + max-height: 80%; + } } h1 { - font-size: 2.25rem; - font-weight: 600; + font-size: 2.25rem; + font-weight: 600; } section { - position: relative; + position: relative; } form { - --flow-space: 4rem; + --flow-space: 4rem; } form > * { - --flow-space: 1.5rem; + --flow-space: 1.5rem; } fieldset { - border: none; - margin-left: 0; - margin-right: 0; - padding: 0; + border: none; + margin-left: 0; + margin-right: 0; + padding: 0; } label, input, select, textarea { - --flow-space: .5rem; - display: block; - width: 100%; + --flow-space: 0.5rem; + display: block; + width: 100%; } -label, legend { - color: black; - font-weight: 500; - padding: 0; +label, +legend { + color: black; + font-weight: 500; + padding: 0; } input, select, textarea { - border: 1px solid #d1d8d6; - border-radius: .5rem; - padding: .75rem 1rem; + border: 1px solid #d1d8d6; + border-radius: 0.5rem; + padding: 0.75rem 1rem; } input, select { - height: 3rem; + height: 3rem; } textarea { - min-height: 10rem; + min-height: 10rem; } select { - -webkit-appearance: none; - appearance: none; - background-image: url(../img/icons/chevron-down.svg); - background-repeat: no-repeat,repeat; - background-position: right 10px top 50%,0 0; - background-size: 12px auto,100%; + -webkit-appearance: none; + appearance: none; + background-image: url(../img/icons/chevron-down.svg); + background-repeat: no-repeat, repeat; + background-position: + right 10px top 50%, + 0 0; + background-size: + 12px auto, + 100%; } button { - --button-color: var(--color-default); - --flow-space: 3rem; - -webkit-appearance: none; - -moz-appearance: none; - align-items: center; - appearance: none; - background-color: transparent; - border-radius: 2.5rem; - border: none; - color: #ffffff; - cursor: pointer; - display: inline-flex; - font-size: 20px; - font-weight: 500; - inline-size: 100%; - justify-content: center; - letter-spacing: .05ch; - line-height: 1; - padding: 1rem 2.5rem; - text-align: center; - text-decoration: none; -} - -button[data-variant='solid'] { - background-color: var(--button-color); - border: 2px solid var(--button-color); -} - -button[data-variant='outline'] { - color: var(--button-color); - border: 2px solid var(--button-color); -} - -button[data-variant='ghost'] { - color: var(--button-color); + --button-color: var(--color-default); + --flow-space: 3rem; + -webkit-appearance: none; + -moz-appearance: none; + align-items: center; + appearance: none; + background-color: transparent; + border-radius: 2.5rem; + border: none; + color: #ffffff; + cursor: pointer; + display: inline-flex; + font-size: 20px; + font-weight: 500; + inline-size: 100%; + justify-content: center; + letter-spacing: 0.05ch; + line-height: 1; + padding: 1rem 2.5rem; + text-align: center; + text-decoration: none; +} + +button[data-variant="solid"] { + background-color: var(--button-color); + border: 2px solid var(--button-color); +} + +button[data-variant="outline"] { + color: var(--button-color); + border: 2px solid var(--button-color); +} + +button[data-variant="ghost"] { + color: var(--button-color); } button:hover, button:focus, button:active { - --button-color: var(--color-active); + --button-color: var(--color-active); } button:disabled { - --button-color: var(--color-disabled); + --button-color: var(--color-disabled); } -button[data-type='icon'] { - align-items: center; - background-color: transparent; - border: 0; - cursor: pointer; - display: flex; - padding: 0; - width: auto; +button[data-type="icon"] { + align-items: center; + background-color: transparent; + border: 0; + cursor: pointer; + display: flex; + padding: 0; + width: auto; } [disabled] { - cursor: not-allowed; - filter: opacity(.7); + cursor: not-allowed; + filter: opacity(0.7); } .visually-hidden { - border: 0; - clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); - height: auto; - margin: 0; - overflow: hidden; - padding: 0; - position: absolute; - white-space: nowrap; - width: 1px; + border: 0; + clip: rect(1px 1px 1px 1px); + clip: rect(1px, 1px, 1px, 1px); + height: auto; + margin: 0; + overflow: hidden; + padding: 0; + position: absolute; + white-space: nowrap; + width: 1px; } .flow { } .flow > * + * { - margin-top: var(--flow-space); + margin-top: var(--flow-space); } .center { - text-align: center; + text-align: center; } .split-pair > * + * { - margin-top: var(--flow-space); + margin-top: var(--flow-space); } @media screen and (min-width: 45em) { - .split-pair { - display: flex; - align-items: center; - gap: 2rem; - } + .split-pair { + display: flex; + align-items: center; + gap: 2rem; + } - .split-pair[data-variant='start'] { - align-items: start; - } + .split-pair[data-variant="start"] { + align-items: start; + } - .split-pair > * { - flex-grow: 1; - flex-basis: 50%; - } + .split-pair > * { + flex-grow: 1; + flex-basis: 50%; + } - .split-pair > * + * { - margin-top: 0; - } + .split-pair > * + * { + margin-top: 0; + } } .input-group { - --flow-space: 1.5rem; + --flow-space: 1.5rem; } .justify-right { - justify-content: end !important; + justify-content: end !important; } .nav { - display: flex; - justify-content: space-between; + display: flex; + justify-content: space-between; } .back-button { - display: block !important; + display: block !important; } .back-button-text { - font-size: 11px; - line-height: 11px; - color: #3886F7; + font-size: 11px; + line-height: 11px; + color: #3886f7; } .user-details { - padding: 2rem 5rem; + padding: 2rem 5rem; } .demo-tip { - align-items: center; - background-color: #f5fcff; - border-radius: .75rem; - border: 1px solid #A9D1E8; - color: inherit; - display: flex; - font-size: .875rem; - max-width: 36rem; - padding: 1rem; - text-align: left; - text-decoration: none; + align-items: center; + background-color: #f5fcff; + border-radius: 0.75rem; + border: 1px solid #a9d1e8; + color: inherit; + display: flex; + font-size: 0.875rem; + max-width: 36rem; + padding: 1rem; + text-align: left; + text-decoration: none; } -.demo-tip[data-variant='yellow'] { - background-color: #FFF8EE; - border: #FFF8EE; +.demo-tip[data-variant="yellow"] { + background-color: #fff8ee; + border: #fff8ee; } .demo-tip > * + * { - margin-left: .5rem; + margin-left: 0.5rem; } #error, .validation-message { - color: red; - text-transform: capitalize; + color: red; + text-transform: capitalize; } .dob { - --flow-space: 1rem; - display: flex; - gap: 1rem; + --flow-space: 1rem; + display: flex; + gap: 1rem; } @media screen and (min-width: 40rem) { - .dob { - gap: 2rem; - } + .dob { + gap: 2rem; + } } .credits { - --flow-space: 2rem; - margin-inline: auto; - max-inline-size: 10rem; + --flow-space: 2rem; + margin-inline: auto; + max-inline-size: 10rem; } .company-name { - text-transform: uppercase; - letter-spacing: .1rem; - border-left: 1px solid #cecece; - margin-left: .75rem; - padding-left: .75rem; - display: inline-flex; - align-items: center; + text-transform: uppercase; + letter-spacing: 0.1rem; + border-left: 1px solid #cecece; + margin-left: 0.75rem; + padding-left: 0.75rem; + display: inline-flex; + align-items: center; } .company-name svg { - margin-right: .5rem; + margin-right: 0.5rem; } @keyframes spin { - 0% { - transform: translate3d(-50%, -50%, 0) rotate(0deg); - } - 100% { - transform: translate3d(-50%, -50%, 0) rotate(360deg); - } + 0% { + transform: translate3d(-50%, -50%, 0) rotate(0deg); + } + 100% { + transform: translate3d(-50%, -50%, 0) rotate(360deg); + } } .spinner { - animation: 1.5s linear infinite spin; - animation-play-state: inherit; - border: solid 1rem #cfd0d1; - border-bottom-color: var(--color-active); - border-radius: 50%; - content: ""; - display: block; - height: 10rem; - width: 10rem; - will-change: transform; - position: relative; - top: 5rem; - left: 50%; + animation: 1.5s linear infinite spin; + animation-play-state: inherit; + border: solid 1rem #cfd0d1; + border-bottom-color: var(--color-active); + border-radius: 50%; + content: ""; + display: block; + height: 10rem; + width: 10rem; + will-change: transform; + position: relative; + top: 5rem; + left: 50%; } @keyframes rotate { diff --git a/src/js/basic-kyc.js b/src/js/basic-kyc.js index 94e8a070..04c0a551 100644 --- a/src/js/basic-kyc.js +++ b/src/js/basic-kyc.js @@ -1,713 +1,759 @@ const validate = require("validate.js"); -var basicKyc = (function basicKyc() { - "use strict"; - - // NOTE: In order to support prior integrations, we have `live` and - // `production` pointing to the same URL - const endpoints = { - development: "https://devapi.smileidentity.com", - sandbox: "https://testapi.smileidentity.com", - live: "https://api.smileidentity.com", - production: "https://api.smileidentity.com", - }; - - const referenceWindow = window.parent; - referenceWindow.postMessage('SmileIdentity::ChildPageReady', '*'); - - var pages = []; - var config; - var activeScreen; - var consent_information, id_info, partner_params; - var productConstraints; - var partnerProductConstraints; - - var EndUserConsent; - var LoadingScreen = document.querySelector('#loading-screen'); - var SelectIDType = document.querySelector("#select-id-type"); - var IDInfoForm = document.querySelector("#id-info"); - var CompleteScreen = document.querySelector("#complete-screen"); - var disableBackOnFirstScreen = false; - - var CloseIframeButtons = document.querySelectorAll('.close-iframe'); - - function postData(url = '', data = {}) { - return fetch(url, { - method: 'POST', - mode: 'cors', - cache: 'no-cache', - headers: { - 'Accept': 'application/json', - 'Content-Type': 'application/json' - }, - body: JSON.stringify(data) - }); - } - - async function getProductConstraints() { - try { - const productsConfigPayload = { - partner_id: config.partner_details.partner_id, - token: config.token, - partner_params - } - - const productsConfigUrl = `${endpoints[config.environment]}/v1/products_config`; - const productsConfigPromise = postData(productsConfigUrl, productsConfigPayload); - const servicesPromise = fetch(`${endpoints[config.environment]}/v1/services`); - const [productsConfigResponse, servicesResponse] = await Promise.all([ - productsConfigPromise, - servicesPromise - ]) - - if (productsConfigResponse.ok && servicesResponse.ok) { - const partnerConstraints = await productsConfigResponse.json() - const generalConstraints = await servicesResponse.json() - - const previewBvnMfa = config.previewBVNMFA; - if (previewBvnMfa) { - generalConstraints.hosted_web['basic_kyc']['NG']['id_types']['BVN_MFA'] = { - "id_number_regex": "^[0-9]{11}$", - "label": "Bank Verification Number (with OTP)", - "required_fields": [ - "country", - "id_type", - "session_id", - "user_id", - "job_id", - "first_name", - "last_name" - ], - "test_data": "00000000000" - }; - } - - return { - partnerConstraints, - generalConstraints: generalConstraints.hosted_web['basic_kyc'] - } - } else { - throw new Error("Failed to get supported ID types"); - } - } catch (e) { - throw new Error("Failed to get supported ID types", { cause: e }); - } - } - - window.addEventListener( - "message", - async (event) => { - if (event.data && event.data.includes("SmileIdentity::Configuration")) { - config = JSON.parse(event.data); - activeScreen = LoadingScreen; - - try { - getPartnerParams(); - const { partnerConstraints, generalConstraints } = await getProductConstraints(); - partnerProductConstraints = partnerConstraints; - productConstraints = generalConstraints; - initializeSession(generalConstraints, partnerConstraints); - } catch (e) { - throw e; - } - } - }, - false - ); - - function setInitialScreen(partnerConstraints) { - const { country: selectedCountry, id_type: selectedIDType } = id_info; - - const selectedIdRequiresConsent = partnerConstraints.consentRequired[selectedCountry] - ? partnerConstraints.consentRequired[selectedCountry].includes(selectedIDType) - : false; - if (selectedIdRequiresConsent || config.consent_required || config.demo_mode) { - const IDRequiresConsent = selectedIdRequiresConsent || ( - config.consent_required && - config.consent_required[selectedCountry] && - config.consent_required[selectedCountry].includes(selectedIDType) - ); - - if (IDRequiresConsent || config.demo_mode) { - customizeConsentScreen(); - setActiveScreen(EndUserConsent); - } else { - setActiveScreen(IDInfoForm); - } - } else { - hideIdFromBackExit(); - setActiveScreen(IDInfoForm); - } - - customizeForm(); - } - - function hideIdFromBackExit() { - // only disable if this is the first screen - if (!disableBackOnFirstScreen) return; - IDInfoForm.querySelector('.nav').classList.add('justify-right'); - IDInfoForm.querySelector('.back-wrapper').style.display = 'none'; - } - - function initializeSession(generalConstraints, partnerConstraints) { - const supportedCountries = Object.keys(generalConstraints) - .map((countryCode) => ({ - code: countryCode, - name: generalConstraints[countryCode].name, - })) - .sort((a, b) => { - if (a.name < b.name) { - return -1; - } else if (a.name > b.name) { - return 1; - } else { - return 0; - } - }) - .map((item) => item.code); - - let validCountries = []; - - if (config.id_selection) { - const selectedCountryList = Object.keys(config.id_selection); - validCountries = supportedCountries.filter((value) => - selectedCountryList.includes(value) - ); - - if (validCountries.length === 1) { - const selectedCountry = validCountries[0]; - id_info = { - country: validCountries[0] - }; - - const idTypes = config.id_selection[selectedCountry]; - if (idTypes.length === 1 || typeof idTypes === 'string') { - id_info.id_type = Array.isArray(idTypes) ? idTypes[0] : idTypes; - disableBackOnFirstScreen = true; - // ACTION: set initial screen - setInitialScreen(partnerConstraints); - } - } - } else { - validCountries = Object.keys(partnerConstraints.idSelection.basic_kyc); - } - - if (!id_info || !id_info.id_type) { - const selectCountry = SelectIDType.querySelector("#country"); - const selectIDType = SelectIDType.querySelector("#id_type"); - const hostedWebConfigForm = document.querySelector( - 'form[name="hosted-web-config"]' - ); - - // ACTION: Enable Country Selection - selectCountry.disabled = false; - - // ACTION: Enable select screen - setActiveScreen(SelectIDType); - - function loadIdTypes(countryCode) { - if (countryCode) { - const validIDTypes = config.id_selection ? config.id_selection : partnerConstraints.idSelection.basic_kyc; - const constrainedIDTypes = Object.keys(generalConstraints[countryCode].id_types); - const selectedIDTypes = validIDTypes[countryCode].filter(value => constrainedIDTypes.includes(value)) - - // ACTION: Reset ID Type - selectIDType.innerHTML = ""; - - // ACTION: Load the default