From e5c6203629783b29da1fc8dfdb2b84e6224be520 Mon Sep 17 00:00:00 2001 From: Hung Tran Date: Fri, 1 Nov 2019 23:23:35 +0700 Subject: [PATCH 01/11] Verify if all changes are persisted in firestore correctly --- .../settings/focus_workplace.spec.ts | 98 +++++++++++++++---- cypress/support/commands.ts | 2 +- cypress/support/custom-assertions.ts | 20 ++++ 3 files changed, 102 insertions(+), 18 deletions(-) diff --git a/cypress/integration/settings/focus_workplace.spec.ts b/cypress/integration/settings/focus_workplace.spec.ts index 8a6ec58fd4..fa5aaa7486 100644 --- a/cypress/integration/settings/focus_workplace.spec.ts +++ b/cypress/integration/settings/focus_workplace.spec.ts @@ -2,36 +2,96 @@ import { DbCollectionName, Page } from '../../utils/test-utils' import { UserMenuItem } from '../../support/commands' describe('[Settings]', () => { - const freshSettings = { - _authID: 'l9N5HFHzSjQvtP9g9MyFnPpkFmM2', - _id: 'settings_workplace_new', - userName: 'settings_workplace_new', - _deleted: false, - _created: '2018-01-24T14:46:42.038Z', - _modified: '2018-01-24T14:46:42.038Z', - verified: true, - } - describe('[Focus Workplace]', () => { + const freshSettings = { + _authID: 'l9N5HFHzSjQvtP9g9MyFnPpkFmM2', + _id: 'settings_workplace_new', + userName: 'settings_workplace_new', + _deleted: false, + _created: '2018-01-24T14:46:42.038Z', + _modified: '2018-01-24T14:46:42.038Z', + verified: true, + } + + const expected = { + _authID: 'l9N5HFHzSjQvtP9g9MyFnPpkFmM2', + _deleted: false, + _id: 'settings_workplace_new', + about: 'We have some space to run a workplace', + country: 'United States', + coverImages: [ + { + contentType: 'image/jeg', + fullPath: + 'uploads/v2_users/settings_workplace_new/images/profile-cover-1.jpg', + name: 'profile-cover-1.jpg', + size: 18987, + type: 'image/jpeg', + }, + { + contentType: 'image/jpeg', + fullPath: + 'uploads/v2_users/settings_workplace_new/images/profile-cover-2.jpg', + name: 'profile-cover-2.jpg', + size: 20619, + type: 'image/jpeg', + }, + ], + links: [ + { + label: 'email', + url: 'settings_workplace_new@test.com', + }, + { + label: 'website', + url: 'www.settings_workplace_new.com', + }, + ], + location: { + administrative: 'Ohio', + country: 'United States of America', + countryCode: 'us', + latlng: { + lat: 39.9623, + lng: -83.0007, + }, + name: 'Columbus', + postcode: '43085', + value: 'Columbus, Ohio, United States of America', + }, + mapPinDescription: "Come in & let's make cool stuff out of plastic!", + openingHours: [ + { + day: '', + openFrom: '', + openTo: '', + }, + ], + profileType: 'workspace', + userName: 'settings_workplace_new', + verified: true, + workspaceType: 'shredder', + } + it('[Editing a new Profile]', () => { + cy.visit(Page.EVENTS) cy.updateDocument( DbCollectionName.v2_users, freshSettings.userName, freshSettings, ) - cy.visit(Page.EVENTS) cy.login('settings_workplace_new@test.com', 'test1234') cy.step('Go to User Settings') cy.clickMenuItem(UserMenuItem.Settings) - cy.get('[data-cy=workspace]').click() - cy.get('[data-cy=shredder]').click() + cy.get(`[data-cy=${expected.profileType}]`).click() + cy.get(`[data-cy=${expected.workspaceType}]`).click() cy.step('Update Info section') cy.get('[data-cy=username').clear().type(freshSettings.userName) cy.get('[data-cy=country]').find('.flag-select').click() cy.get('[data-cy=country]').find(':text').type('United') - cy.get('[data-cy=country]').contains('United States').click() - cy.get('[data-cy=info-description').clear().type('We have some space to run a workplace') + cy.get('[data-cy=country]').contains(expected.country).click() + cy.get('[data-cy=info-description').clear().type(expected.about) cy.get('[data-cy=cover-images]').get(':file').uploadFiles([ 'images/profile-cover-1.jpg', 'images/profile-cover-2.jpg', @@ -47,11 +107,15 @@ describe('[Settings]', () => { cy.get('[data-cy=input-link-1]').type(`www.${freshSettings.userName}.com`) cy.step('Update Map section') - cy.get('[data-cy=pin-description]').type(`Come in & let's make cool stuff out of plastic!`) + cy.get('[data-cy=pin-description]').type(expected.mapPinDescription) cy.get('[data-cy=location]').find(':text').type('ohio') cy.get('[data-cy=location]').contains('Columbus').click() - cy.get('[data-cy=save]').click() + cy.get('[data-cy=save]').click().wait(3000) + + cy.step('Verify if all changes were saved correctly') + cy.queryDocuments(DbCollectionName.v2_users, 'userName', '==', expected.userName).should('eqSettings', expected) }) + }) }) diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 523cccff21..a603b4465d 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -169,7 +169,7 @@ const attachCustomCommands = (Cypress, fb: typeof firebase) => { }, }) - return firestore.updateDocument(collectionName, docId, docData) + firestore.updateDocument(collectionName, docId, docData) }, ) diff --git a/cypress/support/custom-assertions.ts b/cypress/support/custom-assertions.ts index 41ced6e47b..55781d87a4 100644 --- a/cypress/support/custom-assertions.ts +++ b/cypress/support/custom-assertions.ts @@ -1,5 +1,7 @@ import { IHowto, IHowtoStep } from '../../src/models/howto.models' import chaiSubset from 'chai-subset' +import { IUserPPDB } from '../../src/models/user_pp.models' + declare global { namespace Chai { @@ -34,6 +36,24 @@ const eqHowtoStep = (chaiObj, utils) => { chaiObj.Assertion.addMethod('eqHowtoStep', compare) } + + +const eqSettings = (chaiObj, utils) => { + function compare(this: any, expected: any, index: number) { + const subject: IUserPPDB = this._obj + const {_authID, _deleted, _id, about, country, profileType, userName, verified, workspaceType} = expected + expect(subject, 'Basic Info').to.containSubset({_authID, _deleted, _id, userName, verified, profileType, workspaceType, about, country}) + const { links, location, mapPinDescription, openingHours} = expected + expect(subject.links, 'Links').to.containSubset(links) + expect(subject.location, 'Location').to.containSubset(location) + expect(subject.mapPinDescription, 'Map Pin Description').to.containSubset(mapPinDescription) + expect(subject.openingHours, 'Opening Hours').to.containSubset(openingHours) + } + + chaiObj.Assertion.addMethod('eqSettings', compare) +} + chai.use(eqHowto); chai.use(eqHowtoStep); +chai.use(eqSettings); chai.use(chaiSubset) \ No newline at end of file From 966389d281e9fa5fffc20aa7dd34d8884a0a5b60 Mon Sep 17 00:00:00 2001 From: Hung Tran Date: Fri, 1 Nov 2019 23:24:05 +0700 Subject: [PATCH 02/11] Switched back to Chrome coz Electron also stucks with firestore.set/add --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0928dd60b1..03de1f3950 100644 --- a/package.json +++ b/package.json @@ -128,8 +128,8 @@ "prod:copy": "cp .env .env-default && cp ./.env-prod ./.env", "prod:restore": "cp .env-default .env && rm .env-default", "start:ci": "cross-env SITE_VARIANT=test-ci PORT=3456 npm run start", - "cy:run": "cross-env TZ='Europe/London' cypress run --browser electron", - "cy:open": "cross-env TZ='Europe/London' npx cypress open --browser electron", + "cy:run": "cross-env TZ='Europe/London' cypress run --browser chrome", + "cy:open": "cross-env TZ='Europe/London' npx cypress open --browser chrome", "cy:test": "start-test start:ci 3456 cy:run", "cy:test:record": "start-test start:ci 3456 cy:run:record", "cy:run:record": "npm run cy:run --record --key 62585f33-d688-47b7-acb3-6d1dca832065", From fab14d319512fb13d25acdcf172cf54ee70a215a Mon Sep 17 00:00:00 2001 From: Hung Tran Date: Fri, 1 Nov 2019 23:46:46 +0700 Subject: [PATCH 03/11] Chrome doesn't have the headless mode --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 03de1f3950..032b9dfb50 100644 --- a/package.json +++ b/package.json @@ -128,8 +128,8 @@ "prod:copy": "cp .env .env-default && cp ./.env-prod ./.env", "prod:restore": "cp .env-default .env && rm .env-default", "start:ci": "cross-env SITE_VARIANT=test-ci PORT=3456 npm run start", - "cy:run": "cross-env TZ='Europe/London' cypress run --browser chrome", - "cy:open": "cross-env TZ='Europe/London' npx cypress open --browser chrome", + "cy:run": "cross-env TZ='Europe/London' cypress run", + "cy:open": "cross-env TZ='Europe/London' npx cypress open", "cy:test": "start-test start:ci 3456 cy:run", "cy:test:record": "start-test start:ci 3456 cy:run:record", "cy:run:record": "npm run cy:run --record --key 62585f33-d688-47b7-acb3-6d1dca832065", From e61d294f2248e5d5b0a98ea1054c812410c78dba Mon Sep 17 00:00:00 2001 From: Hung Tran Date: Sat, 2 Nov 2019 16:24:02 +0700 Subject: [PATCH 04/11] Added 4 more users for the remaining focus settings --- cypress/fixtures/seed/auth.json | 40 ++++++++++++++++++++++++++++++++ cypress/fixtures/seed/users.json | 36 ++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) diff --git a/cypress/fixtures/seed/auth.json b/cypress/fixtures/seed/auth.json index 56465e0b2a..bc71386f9d 100644 --- a/cypress/fixtures/seed/auth.json +++ b/cypress/fixtures/seed/auth.json @@ -80,6 +80,46 @@ "salt": "xIhcGQ/uTEffoA==", "createdAt": "1570194592093", "providerUserInfo": [] + }, + { + "localId": "pbx4jStD8sNj4OEZTg4AegLTl6E3", + "displayName": "settings_member_new", + "email": "settings_member_new@test.com", + "emailVerified": true, + "passwordHash": "C0VFp8QQ68YbdydOYRq/Mlp5HPpfv8XdFB8kVe1WiJHOKYagP1hbMyMSjrrN8F8rseF7F2LhMH74Jq1p88d+ZA==", + "salt": "xIhcGQ/uTEffoA==", + "createdAt": "1570194592093", + "providerUserInfo": [] + }, + { + "localId": "wwtBAo7TrkSQ9nAaBN3D93I1sCM2", + "displayName": "settings_machine_new", + "email": "settings_machine_new@test.com", + "emailVerified": true, + "passwordHash": "C0VFp8QQ68YbdydOYRq/Mlp5HPpfv8XdFB8kVe1WiJHOKYagP1hbMyMSjrrN8F8rseF7F2LhMH74Jq1p88d+ZA==", + "salt": "xIhcGQ/uTEffoA==", + "createdAt": "1570194592093", + "providerUserInfo": [] + }, + { + "localId": "vWAbQvq21UbvhGldakIy1x4FpeF2", + "displayName": "settings_community_new", + "email": "settings_community_new@test.com", + "emailVerified": true, + "passwordHash": "C0VFp8QQ68YbdydOYRq/Mlp5HPpfv8XdFB8kVe1WiJHOKYagP1hbMyMSjrrN8F8rseF7F2LhMH74Jq1p88d+ZA==", + "salt": "xIhcGQ/uTEffoA==", + "createdAt": "1570194592093", + "providerUserInfo": [] + }, + { + "localId": "uxupeYR7glagQyhBy8q0blr0chd2", + "displayName": "settings_plastic_new", + "email": "settings_plastic_new@test.com", + "emailVerified": true, + "passwordHash": "C0VFp8QQ68YbdydOYRq/Mlp5HPpfv8XdFB8kVe1WiJHOKYagP1hbMyMSjrrN8F8rseF7F2LhMH74Jq1p88d+ZA==", + "salt": "xIhcGQ/uTEffoA==", + "createdAt": "1570194592093", + "providerUserInfo": [] } ] } diff --git a/cypress/fixtures/seed/users.json b/cypress/fixtures/seed/users.json index 58ace59ba9..4e8c39198b 100644 --- a/cypress/fixtures/seed/users.json +++ b/cypress/fixtures/seed/users.json @@ -70,5 +70,41 @@ "_created": "2018-01-24T14:46:42.038Z", "_modified": "2018-01-24T14:46:42.038Z", "verified": true + }, + { + "_authID": "pbx4jStD8sNj4OEZTg4AegLTl6E3", + "_id": "settings_member_new", + "userName": "settings_member_new", + "_deleted": false, + "_created": "2018-01-24T14:46:42.038Z", + "_modified": "2018-01-24T14:46:42.038Z", + "verified": true + }, + { + "_authID": "wwtBAo7TrkSQ9nAaBN3D93I1sCM2", + "_id": "settings_machine_new", + "userName": "settings_machine_new", + "_deleted": false, + "_created": "2018-01-24T14:46:42.038Z", + "_modified": "2018-01-24T14:46:42.038Z", + "verified": true + }, + { + "_authID": "vWAbQvq21UbvhGldakIy1x4FpeF2", + "_id": "settings_community_new", + "userName": "settings_community_new", + "_deleted": false, + "_created": "2018-01-24T14:46:42.038Z", + "_modified": "2018-01-24T14:46:42.038Z", + "verified": true + }, + { + "_authID": "uxupeYR7glagQyhBy8q0blr0chd2", + "_id": "settings_plastic_new", + "userName": "settings_plastic_new", + "_deleted": false, + "_created": "2018-01-24T14:46:42.038Z", + "_modified": "2018-01-24T14:46:42.038Z", + "verified": true } ] From 3e48ede1520ae993e6769bb3d7b7bdaeec8763b3 Mon Sep 17 00:00:00 2001 From: Hung Tran Date: Sat, 2 Nov 2019 17:33:00 +0700 Subject: [PATCH 05/11] Refactored and added a test to update Member-focused Settings --- .../settings/focus_workplace.spec.ts | 106 ++++++++++++++---- cypress/tslint.json | 6 + 2 files changed, 88 insertions(+), 24 deletions(-) create mode 100644 cypress/tslint.json diff --git a/cypress/integration/settings/focus_workplace.spec.ts b/cypress/integration/settings/focus_workplace.spec.ts index b967600b41..c4ab5fe5e9 100644 --- a/cypress/integration/settings/focus_workplace.spec.ts +++ b/cypress/integration/settings/focus_workplace.spec.ts @@ -1,7 +1,49 @@ import { DbCollectionName, Page } from '../../utils/test-utils' import { UserMenuItem } from '../../support/commands' +interface Info { + username: string, + country: string + description: string, + coverImages: string[] +} + +interface Link { + /** + * Start from 0 + */ + index: number, + type: 'email' | 'website' | 'discord' + url: string +} + describe('[Settings]', () => { + const selectFocus = (focus: string) => { + cy.get(`[data-cy=${focus}]`).click() + } + + const setInfo = (info : Info)=> { + cy.step('Update Info section') + cy.get('[data-cy=username').clear().type(info.username) + cy.get('[data-cy=country]').find('.flag-select').click() + cy.get('[data-cy=country]').find(':text').type(info.country.substring(0, info.country.length - 2)) + cy.get('[data-cy=country]').contains(info.country).click() + cy.get('[data-cy=info-description').clear().type(info.description) + cy.get('[data-cy=cover-images]').find(':file').uploadFiles(info.coverImages) + } + + const addContactLink = (link: Link) => { + if (link.index > 0) { + cy.get('[data-cy=add-link]').click() + } + + cy.get(`[data-cy=select-link-${link.index}]`).click() + cy.get(`[data-cy=select-link-${link.index}]`) + .contains(link.type) + .click() + cy.get(`[data-cy=input-link-${link.index}]`).type(link.url) + } + describe('[Focus Workplace]', () => { const freshSettings = { _authID: 'l9N5HFHzSjQvtP9g9MyFnPpkFmM2', @@ -83,34 +125,17 @@ describe('[Settings]', () => { cy.login('settings_workplace_new@test.com', 'test1234') cy.step('Go to User Settings') cy.clickMenuItem(UserMenuItem.Settings) - cy.get(`[data-cy=${expected.profileType}]`).click() + selectFocus(expected.profileType) cy.get(`[data-cy=${expected.workspaceType}]`).click() - cy.step('Update Info section') - cy.get('[data-cy=username').clear().type(freshSettings.userName) - cy.get('[data-cy=country]').find('.flag-select').click() - cy.get('[data-cy=country]').find(':text').type('United') - cy.get('[data-cy=country]').contains(expected.country).click() - cy.get('[data-cy=info-description').clear().type(expected.about) - cy.get('[data-cy=cover-images]').get(':file').uploadFiles([ - 'images/profile-cover-1.jpg', - 'images/profile-cover-2.jpg', - ]) + setInfo({username: expected.userName, country: expected.country, description: expected.about, coverImages: [ + 'images/profile-cover-1.jpg', + 'images/profile-cover-2.jpg', + ]}) cy.step('Update Contact Links') - cy.get('[data-cy=select-link-0]').click() - cy.get('[data-cy=select-link-0]') - .contains('email') - .click() - cy.get('[data-cy=input-link-0]').type( - `${freshSettings.userName}@test.com`, - ) - cy.get('[data-cy=add-link]').click() - cy.get('[data-cy=select-link-1]').click() - cy.get('[data-cy=select-link-1]') - .contains('website') - .click() - cy.get('[data-cy=input-link-1]').type(`www.${freshSettings.userName}.com`) + addContactLink({index: 0, type: 'email', url: `${freshSettings.userName}@test.com`}) + addContactLink({index: 1, type: 'website', url: `www.${freshSettings.userName}.com`}) cy.step('Update Map section') cy.get('[data-cy=pin-description]').type(expected.mapPinDescription) @@ -124,4 +149,37 @@ describe('[Settings]', () => { }) }) + describe('[Focus Member]', () => { + const freshSettings = { + "_authID": "pbx4jStD8sNj4OEZTg4AegLTl6E3", + "_id": "settings_member_new", + "userName": "settings_member_new", + "_deleted": false, + "_created": "2018-01-24T14:46:42.038Z", + "_modified": "2018-01-24T14:46:42.038Z", + "verified": true + } + it.only('[Edit a new profile]', () => { + cy.visit(Page.EVENTS) + cy.updateDocument( + DbCollectionName.v2_users, + freshSettings.userName, + freshSettings, + ) + cy.login('settings_member_new@test.com', 'test1234') + cy.step('Go to User Settings') + cy.clickMenuItem(UserMenuItem.Settings) + selectFocus('member') + + setInfo({username: freshSettings.userName, country: 'Poland', description: `I'm a very active member`, coverImages: [ + 'images/profile-cover-1.jpg', + 'images/profile-cover-2.jpg', + ]}) + cy.step('Update Contact Links') + addContactLink({index: 0, type: 'email', url: `${freshSettings.userName}@test.com`}) + + cy.get('[data-cy=save]').click().wait(3000) + }) + + }) }) diff --git a/cypress/tslint.json b/cypress/tslint.json new file mode 100644 index 0000000000..c5092d1b4c --- /dev/null +++ b/cypress/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "../tslint.json", + "rules": { + "interface-name": false + } +} \ No newline at end of file From 550fda87120c36c1ad339ec3f32ddb9ed7aa5daf Mon Sep 17 00:00:00 2001 From: Hung Tran Date: Sat, 2 Nov 2019 17:49:05 +0700 Subject: [PATCH 06/11] Added a test to update a Machine Builder settings --- .../settings/focus_workplace.spec.ts | 60 ++++++++++++++++--- .../formSections/Expertise.section.tsx | 1 + .../Fields/CustomCheckbox.field.tsx | 4 +- 3 files changed, 55 insertions(+), 10 deletions(-) diff --git a/cypress/integration/settings/focus_workplace.spec.ts b/cypress/integration/settings/focus_workplace.spec.ts index c4ab5fe5e9..8878c29d78 100644 --- a/cypress/integration/settings/focus_workplace.spec.ts +++ b/cypress/integration/settings/focus_workplace.spec.ts @@ -17,6 +17,12 @@ interface Link { url: string } +interface MapPin { + description: string + searchKeyword: string + locationName: string +} + describe('[Settings]', () => { const selectFocus = (focus: string) => { cy.get(`[data-cy=${focus}]`).click() @@ -31,6 +37,12 @@ describe('[Settings]', () => { cy.get('[data-cy=info-description').clear().type(info.description) cy.get('[data-cy=cover-images]').find(':file').uploadFiles(info.coverImages) } + const setMapPin = (mapPin: MapPin) => { + cy.step('Update Map section') + cy.get('[data-cy=pin-description]').type(mapPin.description) + cy.get('[data-cy=location]').find(':text').type(mapPin.searchKeyword) + cy.get('[data-cy=location]').contains(mapPin.locationName).click() + } const addContactLink = (link: Link) => { if (link.index > 0) { @@ -50,8 +62,6 @@ describe('[Settings]', () => { _id: 'settings_workplace_new', userName: 'settings_workplace_new', _deleted: false, - _created: '2018-01-24T14:46:42.038Z', - _modified: '2018-01-24T14:46:42.038Z', verified: true, } @@ -137,10 +147,7 @@ describe('[Settings]', () => { addContactLink({index: 0, type: 'email', url: `${freshSettings.userName}@test.com`}) addContactLink({index: 1, type: 'website', url: `www.${freshSettings.userName}.com`}) - cy.step('Update Map section') - cy.get('[data-cy=pin-description]').type(expected.mapPinDescription) - cy.get('[data-cy=location]').find(':text').type('ohio') - cy.get('[data-cy=location]').contains('Columbus').click() + setMapPin({description: expected.mapPinDescription, searchKeyword: 'ohio', locationName: expected.location.name}) cy.get('[data-cy=save]').click().wait(3000) @@ -155,11 +162,9 @@ describe('[Settings]', () => { "_id": "settings_member_new", "userName": "settings_member_new", "_deleted": false, - "_created": "2018-01-24T14:46:42.038Z", - "_modified": "2018-01-24T14:46:42.038Z", "verified": true } - it.only('[Edit a new profile]', () => { + it('[Edit a new profile]', () => { cy.visit(Page.EVENTS) cy.updateDocument( DbCollectionName.v2_users, @@ -182,4 +187,41 @@ describe('[Settings]', () => { }) }) + + describe('[Focus Machine Builder]', () => { + const freshSettings = { + "_authID": "wwtBAo7TrkSQ9nAaBN3D93I1sCM2", + "_id": "settings_machine_new", + "userName": "settings_machine_new", + "_deleted": false, + "verified": true + } + it('[Edit a new profile]', () => { + cy.visit(Page.EVENTS) + cy.updateDocument( + DbCollectionName.v2_users, + freshSettings.userName, + freshSettings, + ) + cy.login('settings_machine_new@test.com', 'test1234') + cy.step('Go to User Settings') + cy.clickMenuItem(UserMenuItem.Settings) + selectFocus('machine-builder') + + setInfo({username: freshSettings.userName, country: 'Singapore', description: `We're mechanics and our jobs are making machines`, coverImages: [ + 'images/profile-cover-1.jpg' + ]}) + + cy.step('Choose Expertise') + cy.get('[data-cy=electronics]').click() + cy.get('[data-cy=welding]').click() + + cy.step('Update Contact Links') + addContactLink({index: 0, type: 'email', url: `${freshSettings.userName}@test.com`}) + setMapPin({description: 'Informative workshop on machines every week', searchKeyword: 'singapo', locationName: 'Singapore'}) + + cy.get('[data-cy=save]').click().wait(3000) + }) + + }) }) diff --git a/src/pages/Settings/content/formSections/Expertise.section.tsx b/src/pages/Settings/content/formSections/Expertise.section.tsx index 89a08ddd49..a07b9e3c37 100644 --- a/src/pages/Settings/content/formSections/Expertise.section.tsx +++ b/src/pages/Settings/content/formSections/Expertise.section.tsx @@ -45,6 +45,7 @@ export class ExpertiseSection extends React.Component { <> {MACHINE_BUILDER_XP.map((xp, index: number) => ( { isSelected, btnLabel, fullWidth, + 'data-cy': dataCy, } = this.props const classNames: Array = [] if (isSelected) { @@ -46,7 +48,7 @@ class CustomCheckbox extends Component { } return ( -