@@ -16,7 +16,7 @@ import { camelize } from '@ember/string';
16
16
const SELECTORS = {
17
17
container : '[data-test-swagger-ui]' ,
18
18
searchInput : 'input.operation-filter-input' ,
19
- apiPathBlock : '.opblock-post ' ,
19
+ apiPathBlock : '.opblock' ,
20
20
operationId : '.opblock-summary-operation-id' ,
21
21
controlArrowButton : '.opblock-control-arrow' ,
22
22
copyButton : '.copy-to-clipboard' ,
@@ -66,7 +66,7 @@ module('Integration | Component | open-api-explorer | swagger-ui', function (hoo
66
66
67
67
setNativeInputValue ( 'token' ) ;
68
68
assert . dom ( SELECTORS . searchInput ) . hasValue ( 'token' , 'search input has value' ) ;
69
- assert . dom ( SELECTORS . apiPathBlock ) . exists ( { count : 1 } , 'renders filtered api paths' ) ;
69
+ assert . dom ( SELECTORS . apiPathBlock ) . exists ( { count : 2 } , 'renders filtered api paths' ) ;
70
70
} ) ;
71
71
72
72
test ( 'it should render camelized operation ids' , async function ( assert ) {
@@ -105,8 +105,13 @@ module('Integration | Component | open-api-explorer | swagger-ui', function (hoo
105
105
} ) ;
106
106
assert . dom ( SELECTORS . copyButton ) . hasAttribute ( 'tabindex' , '0' ) ;
107
107
108
- await click ( SELECTORS . controlArrowButton ) ;
108
+ const controlArrowButton = document . querySelectorAll ( SELECTORS . controlArrowButton ) [ 1 ] ;
109
+ await click ( controlArrowButton ) ;
109
110
await waitFor ( SELECTORS . tryItOutButton ) ;
111
+
112
+ const input = document . querySelector ( '.parameters input:read-only' ) ;
113
+ assert . dom ( input ) . exists ( 'parameter input is readonly' ) ;
114
+
110
115
assert
111
116
. dom ( SELECTORS . tryItOutButton )
112
117
. hasAttribute (
@@ -122,7 +127,7 @@ module('Integration | Component | open-api-explorer | swagger-ui', function (hoo
122
127
123
128
await this . renderComponent ( ) ;
124
129
125
- setNativeInputValue ( 'secret ' ) ;
130
+ setNativeInputValue ( 'token ' ) ;
126
131
127
132
await waitUntil ( ( ) => {
128
133
return document . querySelector ( SELECTORS . controlArrowButton ) . getAttribute ( 'tabindex' ) === '0' ;
@@ -134,8 +139,12 @@ module('Integration | Component | open-api-explorer | swagger-ui', function (hoo
134
139
} ) ;
135
140
assert . dom ( SELECTORS . copyButton ) . hasAttribute ( 'tabindex' , '0' ) ;
136
141
137
- await click ( SELECTORS . controlArrowButton ) ;
142
+ const controlArrowButton = document . querySelectorAll ( SELECTORS . controlArrowButton ) [ 1 ] ;
143
+ await click ( controlArrowButton ) ;
138
144
await waitFor ( SELECTORS . tryItOutButton ) ;
145
+
146
+ const input = document . querySelector ( '.parameters input:read-only' ) ;
147
+ assert . dom ( input ) . exists ( 'parameter input is readonly' ) ;
139
148
assert
140
149
. dom ( SELECTORS . tryItOutButton )
141
150
. hasAttribute (
0 commit comments