@@ -12,7 +12,6 @@ import { ACTIONS } from "../../../permissions";
12
12
import FormsList from "./component" ;
13
13
14
14
describe ( "<FormsList />" , ( ) => {
15
-
16
15
const formSections = [
17
16
{
18
17
id : 1 ,
@@ -97,46 +96,44 @@ describe("<FormsList />", () => {
97
96
} ) ;
98
97
99
98
it ( "renders <PageHeading />" , ( ) => {
100
-
101
- mountedComponent ( < FormsList /> , initialState )
99
+ mountedComponent ( < FormsList /> , initialState ) ;
102
100
expect ( screen . getByText ( / f o r m s .l a b e l / i) ) . toBeInTheDocument ( ) ;
103
101
} ) ;
104
102
105
103
it ( "renders <FormFilters />" , ( ) => {
106
- mountedComponent ( < FormsList /> , initialState )
107
- expect ( screen . getByTestId ( ' forms-list' ) ) . toBeInTheDocument ( ) ;
104
+ mountedComponent ( < FormsList /> , initialState ) ;
105
+ expect ( screen . getByTestId ( " forms-list" ) ) . toBeInTheDocument ( ) ;
108
106
} ) ;
109
107
110
108
it ( "renders form sections" , ( ) => {
111
- mountedComponent ( < FormsList /> , initialState )
112
- expect ( screen . getAllByTestId ( ' form-group' ) ) . toHaveLength ( 2 ) ;
109
+ mountedComponent ( < FormsList /> , initialState ) ;
110
+ expect ( screen . getAllByTestId ( " form-group" ) ) . toHaveLength ( 2 ) ;
113
111
} ) ;
114
112
115
113
describe ( "when there are no records" , ( ) => {
116
114
const stateWithoutRecords = initialState . setIn ( [ "records" , "admin" , "forms" , "formSections" ] , fromJS ( [ ] ) ) ;
117
115
118
116
it ( "renders <FormFilters/>" , ( ) => {
119
- mountedComponent ( < FormsList /> , stateWithoutRecords )
120
- expect ( screen . getByTestId ( 'form-list' ) ) . toBeInTheDocument ( )
121
-
117
+ mountedComponent ( < FormsList /> , stateWithoutRecords ) ;
118
+ expect ( screen . getByTestId ( "form-list" ) ) . toBeInTheDocument ( ) ;
122
119
} ) ;
123
120
it ( "does not renders form sections" , ( ) => {
124
- mountedComponent ( < FormsList /> , stateWithoutRecords )
125
- expect ( screen . queryAllByTestId ( ' form-group' ) ) . toHaveLength ( 0 ) ;
121
+ mountedComponent ( < FormsList /> , stateWithoutRecords ) ;
122
+ expect ( screen . queryAllByTestId ( " form-group" ) ) . toHaveLength ( 0 ) ;
126
123
} ) ;
127
124
} ) ;
128
125
129
126
describe ( "when there reorder is enabled" , ( ) => {
130
127
const stateReorderEnabled = initialState . setIn ( [ "records" , "admin" , "forms" , "reorderedForms" , "enabled" ] , true ) ;
131
128
132
129
it ( "renders the <RorderActions />" , ( ) => {
133
- mountedComponent ( < FormsList /> , stateReorderEnabled )
134
- expect ( screen . getByText ( / b u t t o n s .c a n c e l / i) ) . toBeInTheDocument ( )
130
+ mountedComponent ( < FormsList /> , stateReorderEnabled ) ;
131
+ expect ( screen . getByText ( / b u t t o n s .c a n c e l / i) ) . toBeInTheDocument ( ) ;
135
132
} ) ;
136
133
137
134
it ( "disable the <FormFilters/>" , ( ) => {
138
- mountedComponent ( < FormsList /> , stateReorderEnabled )
139
- expect ( screen . getByTestId ( ' forms-list' ) ) . toHaveClass ( ' disabledFilters' ) ;
135
+ mountedComponent ( < FormsList /> , stateReorderEnabled ) ;
136
+ expect ( screen . getByTestId ( " forms-list" ) ) . toHaveClass ( " disabledFilters" ) ;
140
137
} ) ;
141
138
} ) ;
142
139
} ) ;
0 commit comments