Skip to content

Commit

Permalink
refactor(login-page): remove reset password page feature flag (#2507)
Browse files Browse the repository at this point in the history
* refactor(login-page): remove reset password page feature flag

* fix: failing test

* fix: failing test date
  • Loading branch information
domw30 authored Dec 12, 2024
1 parent a5aaf60 commit 6ac6241
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/components/chat-view-container/chat-view.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,13 @@ describe('ChatView', () => {

it('returns the formatted date for the same year', () => {
// setting the date here is not ideal as at some point this will fail
const currentYearDate = moment('2024-12-11'); // Example date within the same year
const currentYearDate = moment('2025-12-11'); // Example date within the same year
const messages = [
{ id: 111, message: 'what', createdAt: currentYearDate.valueOf() } as MessageModel,
];

const wrapper = subject({ messages });
expect(wrapper.find('.message__header-date').text()).toEqual('Wed, Dec 11');
expect(wrapper.find('.message__header-date').text()).toEqual('Dec 11, 2025');
});

it('returns the formatted date for previous years', () => {
Expand Down
13 changes: 5 additions & 8 deletions src/pages/login/login-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { ThemeEngine, Themes } from '@zero-tech/zui/components/ThemeEngine';
import { bemClassName } from '../../lib/bem';
import './login.scss';

import { FeatureFlag } from '../../components/feature-flag';
import { assertAllValuesConsumed } from '../../lib/enum';

const cn = bemClassName('login-main');
Expand Down Expand Up @@ -65,13 +64,11 @@ export class LoginComponent extends React.Component<LoginComponentProperties> {
<span>
Not on ZERO? <Link to='/get-access'>Create account</Link>
</span>
<FeatureFlag featureFlag={'resetPasswordPage'}>
{stage === LoginStage.EmailLogin && (
<span>
Forgot your password? <Link to='/reset-password'>Reset</Link>
</span>
)}
</FeatureFlag>
{stage === LoginStage.EmailLogin && (
<span>
Forgot your password? <Link to='/reset-password'>Reset</Link>
</span>
)}
</div>
);
}
Expand Down

0 comments on commit 6ac6241

Please sign in to comment.