rename Verify GSTIN to Submit GSTIN and allow Next Step submit flow to auto-verify GSTIN

This commit is contained in:
vickytechkey 2026-08-09 13:30:32 +05:30
parent a0299efa5f
commit 04632f1ca3
3 changed files with 7 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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'}
</button>
</div>
{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
</button>