rename Verify GSTIN to Submit GSTIN and allow Next Step submit flow to auto-verify GSTIN
This commit is contained in:
parent
a0299efa5f
commit
04632f1ca3
3 changed files with 7 additions and 4 deletions
|
|
@ -30,7 +30,7 @@ describe('Supplier Portal Onboarding & Feature E2E Flow', () => {
|
||||||
// 4. Step 2: Tax & Identity Verification
|
// 4. Step 2: Tax & Identity Verification
|
||||||
cy.contains('Step 2 of 3: Tax & Identity Verification').should('be.visible');
|
cy.contains('Step 2 of 3: Tax & Identity Verification').should('be.visible');
|
||||||
cy.get('input#verify-gst').clear().type('29AAAAA1111A1Z1');
|
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');
|
cy.contains('GSTIN successfully verified with government registry.').should('be.visible');
|
||||||
|
|
||||||
// Upload mock Aadhaar & PAN files
|
// Upload mock Aadhaar & PAN files
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ describe('Supplier Portal Onboarding & Active Dashboard Tests', () => {
|
||||||
|
|
||||||
const taxInput = screen.getByLabelText(/GSTIN Number \*/i)
|
const taxInput = screen.getByLabelText(/GSTIN Number \*/i)
|
||||||
fireEvent.change(taxInput, { target: { value: '29AAAAA1111A1Z1' } })
|
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)
|
fireEvent.click(verifyGstinBtn)
|
||||||
|
|
||||||
// Upload files
|
// Upload files
|
||||||
|
|
|
||||||
|
|
@ -329,6 +329,9 @@ export default function App() {
|
||||||
|
|
||||||
const handleProfileSubmit = (e: React.FormEvent) => {
|
const handleProfileSubmit = (e: React.FormEvent) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
if (profileStep === 2) {
|
||||||
|
setIsGstinVerified(true)
|
||||||
|
}
|
||||||
if (profileStep < 3) {
|
if (profileStep < 3) {
|
||||||
setProfileStep(prev => prev + 1)
|
setProfileStep(prev => prev + 1)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1140,7 +1143,7 @@ export default function App() {
|
||||||
disabled={isGstinVerified}
|
disabled={isGstinVerified}
|
||||||
style={{ minWidth: '120px' }}
|
style={{ minWidth: '120px' }}
|
||||||
>
|
>
|
||||||
{isGstinVerified ? 'Verified ✓' : 'Verify GSTIN'}
|
{isGstinVerified ? 'Submitted ✓' : 'Submit GSTIN'}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{isGstinVerified && (
|
{isGstinVerified && (
|
||||||
|
|
@ -1216,7 +1219,7 @@ export default function App() {
|
||||||
type="submit"
|
type="submit"
|
||||||
className="btn btn-primary"
|
className="btn btn-primary"
|
||||||
style={{ flex: 1, backgroundColor: 'var(--accent)', color: 'var(--primary)', fontWeight: 'bold' }}
|
style={{ flex: 1, backgroundColor: 'var(--accent)', color: 'var(--primary)', fontWeight: 'bold' }}
|
||||||
disabled={!isGstinVerified || !aadharFile || !panFile}
|
disabled={!gstin || !aadharFile || !panFile}
|
||||||
>
|
>
|
||||||
Next Step: Store & Location
|
Next Step: Store & Location
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue