Skip to content

Commit

Permalink
Merge pull request #1025 from CityOfBoston/CYB-1264
Browse files Browse the repository at this point in the history
CYB-1264: IAMDIR? PING? : Latency within AB registration process
  • Loading branch information
phillipbentonkelly authored Aug 22, 2024
2 parents 031e84b + a649e43 commit eaf0d99
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ 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('JUST A MOMENT!').exists)
.expect(donePage.sectionHeader.withText('YOU’RE ALL SET!').exists)
.ok('On done page');

// Now we go home to make sure that the session was destroyed. This should
Expand Down
43 changes: 6 additions & 37 deletions services-js/access-boston/src/pages/done.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,7 @@ interface State {
}

export default class DonePage extends React.Component<Props, State> {
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 (
<>
<Head>
Expand All @@ -48,22 +22,17 @@ export default class DonePage extends React.Component<Props, State> {

<AppWrapper>
<div className="b b-c b-c--hsm">
<SectionHeader title={headerTxt} />
<SectionHeader title="You’re all set!" />

<div className="t--intro m-v500">
You’re now set up with your Access Boston account. {loginTxt}
You’re now set up with your Access Boston account. Log in now to
continue.
</div>

<div className="ta-r">
{acctFetched ? (
<a href="/" className="btn">
Log In
</a>
) : (
<button className={`btn`} aria-disabled disabled>
Log In
</button>
)}
<a href="/" className="btn">
Log In
</a>
</div>
</div>
</AppWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4168,27 +4168,25 @@ exports[`Storyshots DonePage default 1`] = `
>
<h2
className="sh-title"
id="sh-203550349"
id="sh-2018125994"
>
Just a moment!
You’re all set!
</h2>
</div>
<div
className="t--intro m-v500"
>
You’re now set up with your Access Boston account.
You can use the button below to Log in a moment.
You’re now set up with your Access Boston account. Log in now to continue.
</div>
<div
className="ta-r"
>
<button
aria-disabled={true}
<a
className="btn"
disabled={true}
href="/"
>
Log In
</button>
</a>
</div>
</div>
</main>
Expand Down

0 comments on commit eaf0d99

Please sign in to comment.