From 951f538ee5e3d1b71ad7aa8169f337d35368e289 Mon Sep 17 00:00:00 2001 From: SleepWalker Date: Sat, 28 Dec 2019 11:28:25 +0200 Subject: [PATCH] Add more auth/oauth/multi-acc related test cases --- .../components/accounts/AccountSwitcher.tsx | 12 +- packages/app/pages/root/RootPage.tsx | 10 +- packages/app/services/authFlow/AuthFlow.ts | 10 +- tests-e2e/cypress/fixtures/accounts.json | 2 +- ...ot-password.ts => forgot-password.test.ts} | 0 .../user.test.ts => auth/oauth.test.ts} | 103 +++++++++++++- .../cypress/integration/auth/sign-in.test.ts | 130 +++++++++++++++++- tests-e2e/cypress/support/commands.js | 18 ++- 8 files changed, 267 insertions(+), 18 deletions(-) rename tests-e2e/cypress/integration/auth/{forgot-password.ts => forgot-password.test.ts} (100%) rename tests-e2e/cypress/integration/{oauth/user.test.ts => auth/oauth.test.ts} (76%) diff --git a/packages/app/components/accounts/AccountSwitcher.tsx b/packages/app/components/accounts/AccountSwitcher.tsx index 09f5548..a30e056 100644 --- a/packages/app/components/accounts/AccountSwitcher.tsx +++ b/packages/app/components/accounts/AccountSwitcher.tsx @@ -66,9 +66,10 @@ export class AccountSwitcher extends React.Component { styles.accountSwitcher, styles[`${skin}AccountSwitcher`], )} + data-testid="account-switcher" > - {highlightActiveAccount ? ( -
+ {highlightActiveAccount && ( +
{
- ) : null} + )} + {available.map((account, index) => (
{ {allowLogout ? (
) : ( @@ -141,6 +146,7 @@ export class AccountSwitcher extends React.Component {