@@ -7,22 +7,15 @@ import {OrganizationAuthList} from 'sentry/views/settings/organizationAuth/organ
7
7
8
8
describe ( 'OrganizationAuthList' , function ( ) {
9
9
it ( 'renders with no providers' , function ( ) {
10
- render (
11
- < OrganizationAuthList organization = { OrganizationFixture ( ) } providerList = { [ ] } />
12
- ) ;
10
+ render ( < OrganizationAuthList providerList = { [ ] } /> ) ;
13
11
14
12
expect (
15
13
screen . getByText ( 'No authentication providers are available.' )
16
14
) . toBeInTheDocument ( ) ;
17
15
} ) ;
18
16
19
17
it ( 'renders' , function ( ) {
20
- render (
21
- < OrganizationAuthList
22
- organization = { OrganizationFixture ( ) }
23
- providerList = { AuthProvidersFixture ( ) }
24
- />
25
- ) ;
18
+ render ( < OrganizationAuthList providerList = { AuthProvidersFixture ( ) } /> ) ;
26
19
27
20
expect ( screen . getAllByLabelText ( 'Configure' ) ) . toHaveLength ( 2 ) ;
28
21
expect ( screen . getByText ( 'Dummy' ) ) . toBeInTheDocument ( ) ;
@@ -34,10 +27,10 @@ describe('OrganizationAuthList', function () {
34
27
35
28
render (
36
29
< OrganizationAuthList
37
- organization = { organization }
38
30
providerList = { AuthProvidersFixture ( ) }
39
31
activeProvider = { AuthProvidersFixture ( ) [ 0 ] }
40
- />
32
+ /> ,
33
+ { organization}
41
34
) ;
42
35
43
36
expect ( screen . getByText ( 'Active' ) ) . toBeInTheDocument ( ) ;
@@ -51,12 +44,9 @@ describe('OrganizationAuthList', function () {
51
44
it ( 'renders' , function ( ) {
52
45
const organization = OrganizationFixture ( { ...require2fa , ...withSSO } ) ;
53
46
54
- render (
55
- < OrganizationAuthList
56
- organization = { organization }
57
- providerList = { AuthProvidersFixture ( ) }
58
- />
59
- ) ;
47
+ render ( < OrganizationAuthList providerList = { AuthProvidersFixture ( ) } /> , {
48
+ organization,
49
+ } ) ;
60
50
61
51
expect (
62
52
screen . getByText ( 'Require 2FA will be disabled if you enable SSO.' )
@@ -66,12 +56,9 @@ describe('OrganizationAuthList', function () {
66
56
it ( 'renders with saml available' , function ( ) {
67
57
const organization = OrganizationFixture ( { ...require2fa , ...withSAML } ) ;
68
58
69
- render (
70
- < OrganizationAuthList
71
- organization = { organization }
72
- providerList = { AuthProvidersFixture ( ) }
73
- />
74
- ) ;
59
+ render ( < OrganizationAuthList providerList = { AuthProvidersFixture ( ) } /> , {
60
+ organization,
61
+ } ) ;
75
62
76
63
expect (
77
64
screen . getByText ( 'Require 2FA will be disabled if you enable SSO.' )
@@ -81,12 +68,9 @@ describe('OrganizationAuthList', function () {
81
68
it ( 'does not render without sso available' , function ( ) {
82
69
const organization = OrganizationFixture ( { ...require2fa } ) ;
83
70
84
- render (
85
- < OrganizationAuthList
86
- organization = { organization }
87
- providerList = { AuthProvidersFixture ( ) }
88
- />
89
- ) ;
71
+ render ( < OrganizationAuthList providerList = { AuthProvidersFixture ( ) } /> , {
72
+ organization,
73
+ } ) ;
90
74
91
75
expect (
92
76
screen . queryByText ( 'Require 2FA will be disabled if you enable SSO.' )
@@ -96,12 +80,9 @@ describe('OrganizationAuthList', function () {
96
80
it ( 'does not render with sso and require 2fa disabled' , function ( ) {
97
81
const organization = OrganizationFixture ( { ...withSSO } ) ;
98
82
99
- render (
100
- < OrganizationAuthList
101
- organization = { organization }
102
- providerList = { AuthProvidersFixture ( ) }
103
- />
104
- ) ;
83
+ render ( < OrganizationAuthList providerList = { AuthProvidersFixture ( ) } /> , {
84
+ organization,
85
+ } ) ;
105
86
106
87
expect (
107
88
screen . queryByText ( 'Require 2FA will be disabled if you enable SSO.' )
@@ -111,12 +92,9 @@ describe('OrganizationAuthList', function () {
111
92
it ( 'does not render with saml and require 2fa disabled' , function ( ) {
112
93
const organization = OrganizationFixture ( { ...withSAML } ) ;
113
94
114
- render (
115
- < OrganizationAuthList
116
- organization = { organization }
117
- providerList = { AuthProvidersFixture ( ) }
118
- />
119
- ) ;
95
+ render ( < OrganizationAuthList providerList = { AuthProvidersFixture ( ) } /> , {
96
+ organization,
97
+ } ) ;
120
98
121
99
expect (
122
100
screen . queryByText ( 'Require 2FA will be disabled if you enable SSO.' )
0 commit comments