File tree 7 files changed +29
-14
lines changed
ansible_ai_connect_admin_portal
7 files changed +29
-14
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,16 @@ const editor = {
2
2
create : ( ) => {
3
3
return {
4
4
dispose : ( ) => { } ,
5
- }
5
+ } ;
6
6
} ,
7
- defineTheme : function ( ) { }
7
+ defineTheme : function ( ) { } ,
8
8
} ;
9
9
10
10
const monaco = {
11
11
editor,
12
- languages : { json : { jsonDefaults : { setDiagnosticsOptions : function ( ) { } } } }
12
+ languages : {
13
+ json : { jsonDefaults : { setDiagnosticsOptions : function ( ) { } } } ,
14
+ } ,
13
15
} ;
14
16
15
17
module . exports = monaco ;
Original file line number Diff line number Diff line change 1
1
const monacoYaml = {
2
- configureMonacoYaml : function ( ) { }
3
- } ;
2
+ configureMonacoYaml : function ( ) { } ,
3
+ } ;
4
4
5
5
module . exports = monacoYaml ;
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export function AppHeader(props: AppHeaderProps) {
35
35
< ToolbarItem >
36
36
< PageMastheadDropdown
37
37
id = "account-menu"
38
- icon = { < UserCircleIcon /> }
38
+ icon = { < UserCircleIcon /> }
39
39
userName = { userName }
40
40
>
41
41
< DropdownItem
Original file line number Diff line number Diff line change 7
7
DropdownList ,
8
8
DropdownItem ,
9
9
} from "@patternfly/react-core" ;
10
- import React from ' react' ;
10
+ import React from " react" ;
11
11
import { ReactNode , useCallback , useState } from "react" ;
12
12
import { useBreakpoint } from "@ansible/ansible-ui-framework" ;
13
13
@@ -32,7 +32,12 @@ export function PageMastheadDropdown(props: PageMastheadDropdownProps) {
32
32
id = { id }
33
33
onSelect = { onSelect }
34
34
toggle = { ( toggleRef : React . Ref < MenuToggleElement > ) => (
35
- < MenuToggle ref = { toggleRef } onClick = { onToggle } isExpanded = { isOpen } data-testid = "page-masthead-dropdown__button" >
35
+ < MenuToggle
36
+ ref = { toggleRef }
37
+ onClick = { onToggle }
38
+ isExpanded = { isOpen }
39
+ data-testid = "page-masthead-dropdown__button"
40
+ >
36
41
< Flex
37
42
alignItems = { { default : "alignItemsCenter" } }
38
43
flexWrap = { { default : "nowrap" } }
Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ describe("App", () => {
16
16
adminDashboardUrl = { "http://admin_dashboard-url/" }
17
17
/> ,
18
18
) ;
19
- const accountMenu = await screen . findByTestId ( "page-masthead-dropdown__button" ) ;
19
+ const accountMenu = await screen . findByTestId (
20
+ "page-masthead-dropdown__button" ,
21
+ ) ;
20
22
expect ( accountMenu ) . toBeInTheDocument ( ) ;
21
23
expect ( accountMenu ) . toHaveTextContent ( "Batman" ) ;
22
24
} ) ;
Original file line number Diff line number Diff line change 1
1
import { render , screen } from "@testing-library/react" ;
2
2
import "@testing-library/jest-dom" ;
3
3
import { AppHeader } from "../AppHeader" ;
4
- import { BrowserRouter } from ' react-router-dom' ;
4
+ import { BrowserRouter } from " react-router-dom" ;
5
5
6
6
describe ( "AppHeader" , ( ) => {
7
7
// Store the original 'location' object so that it can be restored for other tests.
@@ -23,9 +23,11 @@ describe("AppHeader", () => {
23
23
render (
24
24
< BrowserRouter >
25
25
< AppHeader userName = { "Batman" } />
26
- </ BrowserRouter >
26
+ </ BrowserRouter > ,
27
+ ) ;
28
+ const accountMenu = await screen . findByTestId (
29
+ "page-masthead-dropdown__button" ,
27
30
) ;
28
- const accountMenu = await screen . findByTestId ( "page-masthead-dropdown__button" ) ;
29
31
expect ( accountMenu ) . toBeInTheDocument ( ) ;
30
32
expect ( accountMenu ) . toHaveTextContent ( "Batman" ) ;
31
33
Original file line number Diff line number Diff line change @@ -6,15 +6,19 @@ describe("App", () => {
6
6
it ( "Rendering::With Username" , async ( ) => {
7
7
window . history . pushState ( { } , "Test page" , "/console" ) ;
8
8
render ( < AppDenied userName = { "Batman" } hasSubscription = { true } /> ) ;
9
- const accountMenu = await screen . findByTestId ( "page-masthead-dropdown__button" ) ;
9
+ const accountMenu = await screen . findByTestId (
10
+ "page-masthead-dropdown__button" ,
11
+ ) ;
10
12
expect ( accountMenu ) . toBeInTheDocument ( ) ;
11
13
expect ( accountMenu ) . toHaveTextContent ( "Batman" ) ;
12
14
} ) ;
13
15
14
16
it ( "Rendering::Without Username" , async ( ) => {
15
17
window . history . pushState ( { } , "Test page" , "/console" ) ;
16
18
render ( < AppDenied hasSubscription = { false } /> ) ;
17
- const accountMenu = await screen . findByTestId ( "page-masthead-dropdown__button" ) ;
19
+ const accountMenu = await screen . findByTestId (
20
+ "page-masthead-dropdown__button" ,
21
+ ) ;
18
22
expect ( accountMenu ) . toBeInTheDocument ( ) ;
19
23
expect ( accountMenu ) . toHaveTextContent ( "UnknownUser" ) ;
20
24
} ) ;
You can’t perform that action at this time.
0 commit comments