diff --git a/apps/dsep/components/scholarship/emptyScholarship/EmptyScholarship.tsx b/apps/dsep/components/scholarship/emptyScholarship/EmptyScholarship.tsx index bc4567d68..ac2750190 100644 --- a/apps/dsep/components/scholarship/emptyScholarship/EmptyScholarship.tsx +++ b/apps/dsep/components/scholarship/emptyScholarship/EmptyScholarship.tsx @@ -5,6 +5,7 @@ import React from 'react' import { Button, Typography } from '@beckn-ui/molecules' import CartEmpty from '../../../public/images/cartEmptyIcon.svg' import { useLanguage } from '../../../hooks/useLanguage' +import { testIds } from '@shared/dataTestIds' const EmptyScholarship: React.FC = () => { const { t } = useLanguage() @@ -25,6 +26,7 @@ const EmptyScholarship: React.FC = () => { > empty cart logo { > { lineHeight: '25px' }} text={t.noScholarshipText1} + dataTest={testIds.noScholarshipText1} /> { lineHeight: '25px' }} text={t.noScholarshipText2} + dataTest={testIds.noScholarshipText2} /> \n \n\n" + }, + "fulfillments": [ + { + "id": "12", + "type": "scholarship", + "rating": "4" + }, + { + "id": "12", + "type": "scholarship", + "rating": "4" + } + ] + } + ], + "fulfillments": [ + { + "id": "12", + "type": "scholarship", + "rating": "4", + "rateable": true, + "tracking": false + } + ], + "quote": { + "price": { + "value": "310", + "currency": "INR" + } + } + } + } + } + ] +} diff --git a/cypress/fixtures/DSEP/scholarshipApply/profilePopulate.json b/cypress/fixtures/DSEP/scholarshipApply/profilePopulate.json new file mode 100644 index 000000000..f97aab493 --- /dev/null +++ b/cypress/fixtures/DSEP/scholarshipApply/profilePopulate.json @@ -0,0 +1,15 @@ +{ + "data": { + "id": 23, + "attributes": { + "name": "krushna gaikwad", + "address": ", , Pune, maharashta, India", + "createdAt": "2024-01-29T09:22:45.706Z", + "updatedAt": "2024-06-25T07:23:38.023Z", + "publishedAt": "2024-01-29T09:22:45.701Z", + "phone": "8888888889", + "zip_code": "750021" + } + }, + "meta": {} +} diff --git a/cypress/fixtures/DSEP/scholarshipApply/selectResponse.json b/cypress/fixtures/DSEP/scholarshipApply/selectResponse.json new file mode 100644 index 000000000..f3d97b89d --- /dev/null +++ b/cypress/fixtures/DSEP/scholarshipApply/selectResponse.json @@ -0,0 +1,114 @@ +{ + "data": [ + { + "context": { + "domain": "dsep:scholarships", + "action": "on_select", + "version": "1.1.0", + "bpp_id": "bpp-ps-network-strapi-dev.becknprotocol.io", + "bpp_uri": "http://bpp-ps-network-strapi-dev.becknprotocol.io", + "country": "IND", + "city": "std:080", + "location": { + "country": { + "name": "India", + "code": "IND" + }, + "city": { + "name": "Bangalore", + "code": "std:080" + } + }, + "bap_id": "bap-ps-network-dev.becknprotocol.io", + "bap_uri": "https://bap-ps-network-dev.becknprotocol.io", + "transaction_id": "db5949a5-68b4-45d1-af68-ee397d14cc02", + "message_id": "bb8fbc8c-841c-401c-b5ae-069be7ad9fbf", + "ttl": "PT10M", + "timestamp": "2024-10-09T06:50:57.579Z" + }, + "message": { + "order": { + "type": "DEFAULT", + "quote": { + "price": { + "value": "310", + "currency": "INR" + } + }, + "provider": { + "id": "5", + "name": "MS Ramaiah University of Applied Sciences", + "short_desc": "MS Ramaiah University of Applied Sciences", + "long_desc": "MS Ramaiah University of Applied Sciences", + "fulfillments": [ + { + "id": "12", + "type": "scholarship", + "rating": "4", + "rateable": true, + "tracking": false + } + ] + }, + "items": [ + { + "id": "7", + "name": "MS Ramaiah Memorial Scholarship", + "short_desc": "The Ramaiah University of Applied Sciences rewards excellence with scholarships. Students can choose to apply for a Merit Scholarship (that is, either a Scholarship of Distinction or a Scholarship of Excellence) or an Admission Test Scholarship", + "long_desc": "\"Scholarship Details:\nScholarship amount: Rs. 50,000 scholarship overall\n\nEligibility criteria: CAT/XAT Scores grater than or equal to 80% percentile, and MAT Scores greater than or equal to 90% percentile + throughout 1st division in 10th, 12th and UG\"", + "price": { + "value": "310", + "currency": "INR" + }, + "rating": "null", + "rateable": true, + "quantity": { + "available": { + "measure": { + "value": "0", + "unit": "kWh" + } + } + }, + "locations": [ + { + "id": "13", + "city": "Bangalore F", + "state": "Karnataka", + "country": "India" + } + ], + "tags": [ + { + "display": true, + "list": [ + { + "code": "scholarship-code", + "value": "MS Ramaiah Memorial Scholarship" + } + ] + }, + { + "display": true, + "list": [ + { + "code": "university-name", + "value": "MS Ramaiah Memorial" + } + ] + } + ], + "fulfillments": [ + { + "id": "12", + "type": "scholarship", + "rating": "4" + } + ] + } + ] + } + } + } + ] +} diff --git a/cypress/fixtures/DSEP/scholarshipApply/x-inputSubmitResponse.json b/cypress/fixtures/DSEP/scholarshipApply/x-inputSubmitResponse.json new file mode 100644 index 000000000..e1b78b839 --- /dev/null +++ b/cypress/fixtures/DSEP/scholarshipApply/x-inputSubmitResponse.json @@ -0,0 +1,17 @@ +{ + "id": 1698, + "form_data": { + "name": "santosh kumar", + "email": "santosh.k@gmail.com", + "mobile": "6251423251", + "reason": "i Love this course", + "address": "Pune", + "form_id": "dsepScholarshipDetailsForm", + "zipcode": 412115 + }, + "createdAt": "2024-10-09T09:44:10.468Z", + "updatedAt": "2024-10-09T09:44:10.468Z", + "publishedAt": "2024-10-09T09:44:10.466Z", + "form_id": "dsepScholarshipDetailsForm", + "transaction_id": null +} diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 6ee9e5fd1..fd76b835c 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -79,6 +79,7 @@ declare global { fillConsentDetails(): Chainable fillAssemblyDetails(): Chainable fillDSEPJobApply(): Chainable + fillDSEP_x_inputScholarshipApplyForm(): Chainable performXinput_Submit(response: RouteHandler, aliasName: string): Chainable performCheckViolation(response: RouteHandler, aliasName: string): Chainable //Created by omkar @@ -330,5 +331,15 @@ Cypress.Commands.add('fillDSEPJobApply', () => { const fileName = '/DSEP/jobApply/jobApply.pdf' cy.get('.upload-button').attachFile(fileName) cy.get('#declaration').check().should('be.checked') +}) +Cypress.Commands.add('fillDSEP_x_inputScholarshipApplyForm', () => { + cy.get('#name').clear().type('santosh kumar') + cy.get('#mobile').clear().type('6251423251') + cy.get('#reason').clear().type('i Love this course') + cy.get('#email').clear().type('santosh.k@gmail.com') + cy.get('#address').clear().type('Pune') + cy.get('#zipcode').clear().type('412115') + const fileName = '/DSEP/scholarshipApply/applyScholarship.pdf' + cy.get('#document').attachFile(fileName) cy.get('#submitButton').click() }) diff --git a/shared/dataTestIds.ts b/shared/dataTestIds.ts index a6eae135b..398c2761f 100644 --- a/shared/dataTestIds.ts +++ b/shared/dataTestIds.ts @@ -1,6 +1,6 @@ const testIds = { // application wise base url - url_base: process.env.CYPRESS_BASE_URL || 'http://localhost:3000', + url_base: process.env.CYPRESS_BASE_URL || 'http://localhost:3014', url_base_retail: process.env.CYPRESS_BASE_URL || 'http://localhost:3002', url_base_tourism: process.env.CYPRESS_BASE_URL || 'http://localhost:3001', @@ -344,6 +344,11 @@ const testIds = { scholarship_details_Button: 'scholarship-details-Button', jobSubmitted_viewNewJob: 'job-submitted-view-new-job', jobSubmitted_viewToHomePage: 'job-submitted-view-to-home-page', + scholarshipConfirmation_cart: 'scholarshipConfirmation-cart', + noScholarship: 'noScholarship', + noScholarshipText1: 'noScholarshipText1', + noScholarshipText2: 'noScholarshipText2', + emptyScholarshipButton: 'emptyScholarshipButton', // mobility-bap mobility_map_container: 'map-container',