change email confirm page

This commit is contained in:
Nuwan 2025-08-13 14:26:58 +05:30
parent 67fd15c75c
commit 86e03e0ba7
2 changed files with 9 additions and 2 deletions

View File

@ -20,5 +20,9 @@ describe('Change Email Confirm Page', () => {
// Assert that the JKChangeEmailConfirm page is rendered // Assert that the JKChangeEmailConfirm page is rendered
// Adjust selectors/texts as per your actual component // Adjust selectors/texts as per your actual component
cy.contains('Change Email Confirmation').should('be.visible'); cy.contains('Change Email Confirmation').should('be.visible');
cy.contains('Loading...').should('be.visible');
// Optionally, check for the success message after the email update
cy.wait(1000); // Wait for the email update to complete
cy.contains('Your email has been successfully updated.').should('be.visible');
}); });
}); });

View File

@ -1,7 +1,6 @@
import React from 'react' import React from 'react'
import { useLocation } from "react-router-dom"; import { useLocation } from "react-router-dom";
import { Card, CardBody, CardText, CardTitle } from 'reactstrap'; import { Card, CardBody, CardText, CardTitle } from 'reactstrap';
import PropTypes from 'prop-types';
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import { updateEmail } from '../../helpers/rest'; import { updateEmail } from '../../helpers/rest';
@ -31,7 +30,9 @@ const JKConfirmEmailChange = () => {
return ( return (
<Card style={{ width: '25rem', margin: '2rem auto' }}> <Card style={{ width: '25rem', margin: '2rem auto' }}>
<CardBody> <CardBody>
<CardTitle className="mb-2">Unsubscribe from JamKazam emails</CardTitle> <CardTitle className="mb-2">
Change Email Confirmation
</CardTitle>
<CardText> <CardText>
{ {
success? success?
@ -44,4 +45,6 @@ const JKConfirmEmailChange = () => {
) )
} }
export default JKConfirmEmailChange export default JKConfirmEmailChange