mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
#156: add already have code for register panel
This commit is contained in:
@@ -133,7 +133,7 @@ describe('AuthFlow.functional', () => {
|
||||
navigate('/register');
|
||||
expect(flow.state).to.be.instanceof(RegisterState);
|
||||
|
||||
flow.state.reject(flow);
|
||||
flow.state.reject(flow, {requestEmail: true});
|
||||
expect(flow.state).to.be.instanceof(ResendActivationState);
|
||||
|
||||
flow.state.goBack(flow);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import RegisterState from 'services/authFlow/RegisterState';
|
||||
import CompleteState from 'services/authFlow/CompleteState';
|
||||
import ActivationState from 'services/authFlow/ActivationState';
|
||||
import ResendActivationState from 'services/authFlow/ResendActivationState';
|
||||
|
||||
import { bootstrap, expectState, expectNavigate, expectRun } from './helpers';
|
||||
@@ -81,10 +82,16 @@ describe('RegisterState', () => {
|
||||
});
|
||||
|
||||
describe('#reject', () => {
|
||||
it('should transition to activation', () => {
|
||||
expectState(mock, ActivationState);
|
||||
|
||||
state.reject(context, {});
|
||||
});
|
||||
|
||||
it('should transition to resend-activation', () => {
|
||||
expectState(mock, ResendActivationState);
|
||||
|
||||
state.reject(context);
|
||||
state.reject(context, {requestEmail: true});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -97,6 +97,14 @@ describe('ResendActivationState', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#reject', () => {
|
||||
it('should transition to activate state on reject', () => {
|
||||
expectState(mock, ActivationState);
|
||||
|
||||
state.reject(context);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#goBack', () => {
|
||||
it('should transition to activation', () => {
|
||||
expectState(mock, ActivationState);
|
||||
|
||||
Reference in New Issue
Block a user