1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from 'react';
6 import { CustomTheme } from 'common/custom-theme';
7 import { InactivePanelRoot } from './inactive-panel';
8 import { ThemeProvider, StyledEngineProvider } from '@mui/material';
10 describe('InactivePanel', () => {
20 isLoginClusterFederation: false,
21 inactivePageText: 'Inactive page content',
25 it('should render content and link account option', () => {
27 const expectedMessage = "Inactive page content";
28 const expectedLinkAccountText = 'If you would like to use this login to access another account click "Link Account"';
32 <StyledEngineProvider injectFirst>
33 <ThemeProvider theme={CustomTheme}>
34 <InactivePanelRoot {...props} />
36 </StyledEngineProvider>
40 cy.get('p').eq(0).contains(expectedMessage);
41 cy.get('p').eq(1).contains(expectedLinkAccountText);
44 it('should render content and link account warning on LoginCluster federations', () => {
46 props.isLoginClusterFederation = true;
47 const expectedMessage = "Inactive page content";
48 const expectedLinkAccountText = 'If you would like to use this login to access another account, please contact your administrator';
52 <StyledEngineProvider injectFirst>
53 <ThemeProvider theme={CustomTheme}>
54 <InactivePanelRoot {...props} />
56 </StyledEngineProvider>
60 cy.get('p').eq(0).contains(expectedMessage);
61 cy.get('p').eq(1).contains(expectedLinkAccountText);