|
| 1 | +/// <reference types="cypress" /> |
1 | 2 | describe('Unity Login and check data from CHEFS', () => { |
| 3 | + |
2 | 4 | it('Verify Login', () => { |
3 | 5 | cy.login() |
4 | 6 | }) |
5 | 7 | // 19.) Verify that the info panel populates with mapped data |
6 | 8 | it('Verify the UI is populated with valid data from CHEFS', () => { |
| 9 | + |
7 | 10 | cy.getSubmissionDetail('confirmationID').then(id => {cy.log(`Confirmation ID: ${id}`);}); |
| 11 | + |
8 | 12 | cy.get('#search').should('exist').clear(); // Ensure the field exists and clear its contents |
9 | 13 | cy.get('#search').click() // click the search field |
10 | 14 | cy.getSubmissionDetail('confirmationID').then(id => cy.get('#search').type(id)); // Fetch the confirmation ID and type it into the search field |
11 | 15 | cy.getSubmissionDetail('confirmationID').then(id => cy.contains('tr', id).find('.checkbox-select').click()); // Fetch the confirmation ID, find its row, and click the checkbox |
| 16 | + |
12 | 17 | cy.get('#applicationLink').should('exist').click() // open the info panel |
13 | 18 | // 19.) Verify that the info panel populates with mapped data |
14 | 19 | // Category: AutoUI |
@@ -153,17 +158,15 @@ describe('Unity Login and check data from CHEFS', () => { |
153 | 158 | }) |
154 | 159 | // 25 Verify that the Payment Info tab populates with mapped data |
155 | 160 | cy.get('#nav-payment-info-tab').should('exist').click() // open the Payment Info tab |
156 | | - // Requested Amount: 89000.00 |
157 | | - cy.get('#RequestedAmount').should('have.value', '89000.00') |
| 161 | + // Requested Amount: 89,000.00 |
| 162 | + cy.get('#RequestedAmount').should('have.value', '89,000.00') |
158 | 163 | // 26.) Verify that the Submission tab populates with all form data |
159 | 164 | cy.get('#nav-summery-tab').should('exist').click() // open the Submission tab |
160 | | - cy.getSubmissionDetail('formObjectID').then(formId => { // Fetch formObjectID |
161 | | - let headers = ['1. INTRODUCTION','2. ELIGIBILITY','3. APPLICANT INFORMATION','4. PROJECT INFORMATION','5. PROJECT TIMELINES','6. PROJECT BUDGET','7. ATTESTATION']; // Define headers |
162 | | - headers.forEach((header, index) => { // Iterate over headers |
163 | | - cy.get(`#${formId} > div:nth-child(${index + 1}) > div.card-header.bg-default > h4`) // Select header element |
164 | | - .should('contain', header) // Assert header text |
165 | | - .click(); // Click header to expand/collapse |
166 | | - }); |
| 165 | + const headers = ['1. INTRODUCTION', '2. ELIGIBILITY', '3. APPLICANT INFORMATION','4. PROJECT INFORMATION', '5. PROJECT TIMELINES', '6. PROJECT BUDGET', '7. ATTESTATION']; |
| 166 | + headers.forEach(header => { |
| 167 | + cy.contains('h4', header) |
| 168 | + .should('exist') |
| 169 | + .click(); |
167 | 170 | }); |
168 | 171 | }) |
169 | 172 | it('Verify Logout', () => { |
|
0 commit comments