diff --git a/cypress/e2e/onboarding.cy.ts b/cypress/e2e/onboarding.cy.ts index d2aa75a..686b2f0 100644 --- a/cypress/e2e/onboarding.cy.ts +++ b/cypress/e2e/onboarding.cy.ts @@ -30,7 +30,7 @@ describe('Supplier Portal Onboarding & Feature E2E Flow', () => { // 4. Step 2: Tax & Identity Verification cy.contains('Step 2 of 3: Tax & Identity Verification').should('be.visible'); cy.get('input#verify-gst').clear().type('29AAAAA1111A1Z1'); - cy.contains('Verify GSTIN').click(); + cy.contains('Submit GSTIN').click(); cy.contains('GSTIN successfully verified with government registry.').should('be.visible'); // Upload mock Aadhaar & PAN files diff --git a/src/App.test.tsx b/src/App.test.tsx index 2bf68a7..0b5d5c5 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -109,7 +109,7 @@ describe('Supplier Portal Onboarding & Active Dashboard Tests', () => { const taxInput = screen.getByLabelText(/GSTIN Number \*/i) fireEvent.change(taxInput, { target: { value: '29AAAAA1111A1Z1' } }) - const verifyGstinBtn = screen.getByRole('button', { name: /Verify GSTIN/i }) + const verifyGstinBtn = screen.getByRole('button', { name: /Submit GSTIN/i }) fireEvent.click(verifyGstinBtn) // Upload files diff --git a/src/App.tsx b/src/App.tsx index e864612..9299abd 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -329,6 +329,9 @@ export default function App() { const handleProfileSubmit = (e: React.FormEvent) => { e.preventDefault() + if (profileStep === 2) { + setIsGstinVerified(true) + } if (profileStep < 3) { setProfileStep(prev => prev + 1) } else { @@ -1140,7 +1143,7 @@ export default function App() { disabled={isGstinVerified} style={{ minWidth: '120px' }} > - {isGstinVerified ? 'Verified ✓' : 'Verify GSTIN'} + {isGstinVerified ? 'Submitted ✓' : 'Submit GSTIN'} {isGstinVerified && ( @@ -1216,7 +1219,7 @@ export default function App() { type="submit" className="btn btn-primary" style={{ flex: 1, backgroundColor: 'var(--accent)', color: 'var(--primary)', fontWeight: 'bold' }} - disabled={!isGstinVerified || !aadharFile || !panFile} + disabled={!gstin || !aadharFile || !panFile} > Next Step: Store & Location