diff --git a/services-js/access-boston/src/integration/register-device.testcafe.ts b/services-js/access-boston/src/integration/register-device.testcafe.ts index 2564d2888..58d7e5523 100644 --- a/services-js/access-boston/src/integration/register-device.testcafe.ts +++ b/services-js/access-boston/src/integration/register-device.testcafe.ts @@ -83,7 +83,8 @@ test.only('Device registration', async t => { const donePage = new PageModel(); await t - .expect(donePage.sectionHeader.withText('YOU’RE ALL SET!').exists) + // .expect(donePage.sectionHeader.withText('YOU’RE ALL SET!').exists) + .expect(donePage.sectionHeader.withText('JUST A MOMENT!').exists) .ok('On done page'); // Now we go home to make sure that the session was destroyed. This should diff --git a/services-js/access-boston/src/pages/done.tsx b/services-js/access-boston/src/pages/done.tsx index a9e0d692f..85a728832 100644 --- a/services-js/access-boston/src/pages/done.tsx +++ b/services-js/access-boston/src/pages/done.tsx @@ -1,12 +1,44 @@ import React from 'react'; +// import React, {useState, useRef, useEffect } from 'react'; import Head from 'next/head'; import { SectionHeader, PUBLIC_CSS_URL } from '@cityofboston/react-fleet'; import AppWrapper from '../client/common/AppWrapper'; -export default class DonePage extends React.Component { +interface Props {} +interface State { + acctFetched: boolean; +} + +export default class DonePage extends React.Component { + constructor(props: Props) { + super(props); + this.state = { acctFetched: false }; + } + + async componentDidMount() { + // TODO: DIG-4670: (BUG) Registration Workflow + // THIS IS PACK TO THIS BUG, PROPER FIX NEEDS TO HAPPEN ON + // THE SECURITY TEAMS Servers ... + // Error = User CRUD update is slow to be available on the endpoint (api) + const delay = async (ms: number) => { + return new Promise(resolve => setTimeout(resolve, ms)); + }; + + await delay(13000); + this.setState({ acctFetched: true }); + } + render() { + const { acctFetched } = this.state; + + const headerTxt = acctFetched ? 'You’re all set!' : 'Just a moment!'; + const loginTxt = acctFetched + ? `Log in now to + continue.` + : `You can use the button below to Log in a moment.`; + return ( <> @@ -16,17 +48,22 @@ export default class DonePage extends React.Component {
- +
- You’re now set up with your Access Boston account. Log in now to - continue. + You’re now set up with your Access Boston account. {loginTxt}
- - Log In - + {acctFetched ? ( + + Log In + + ) : ( + + )}
diff --git a/services-js/access-boston/src/stories/__snapshots__/Storyshots.test.ts.snap b/services-js/access-boston/src/stories/__snapshots__/Storyshots.test.ts.snap index 67963ac9b..f5a6b5212 100644 --- a/services-js/access-boston/src/stories/__snapshots__/Storyshots.test.ts.snap +++ b/services-js/access-boston/src/stories/__snapshots__/Storyshots.test.ts.snap @@ -4168,25 +4168,27 @@ exports[`Storyshots DonePage default 1`] = ` >

- You’re all set! + Just a moment!

- You’re now set up with your Access Boston account. Log in now to continue. + You’re now set up with your Access Boston account. + You can use the button below to Log in a moment.
- Log In - +