@@ -2,9 +2,9 @@ describe( 'Image Generation (OpenAI DALL·E) Tests', () => {
2
2
before ( ( ) => {
3
3
cy . login ( ) ;
4
4
cy . visit (
5
- '/wp-admin/tools.php?page=classifai&tab=image_processing&provider=openai_dalle '
5
+ '/wp-admin/tools.php?page=classifai&tab=language_processing&feature=feature_image_generation '
6
6
) ;
7
- cy . get ( '#enable_image_gen ' ) . check ( ) ;
7
+ cy . get ( '#status ' ) . check ( ) ;
8
8
cy . get ( '#submit' ) . click ( ) ;
9
9
cy . optInAllFeatures ( ) ;
10
10
} ) ;
@@ -15,15 +15,15 @@ describe( 'Image Generation (OpenAI DALL·E) Tests', () => {
15
15
16
16
it ( 'Can save OpenAI "Image Processing" settings' , ( ) => {
17
17
cy . visit (
18
- '/wp-admin/tools.php?page=classifai&tab=image_processing&provider=openai_dalle '
18
+ '/wp-admin/tools.php?page=classifai&tab=language_processing&feature=feature_image_generation '
19
19
) ;
20
20
21
21
cy . get ( '#api_key' ) . clear ( ) . type ( 'password' ) ;
22
22
23
- cy . get ( '#enable_image_gen ' ) . check ( ) ;
24
- cy . get ( '#openai_dalle_image_generation_roles_administrator ' ) . check ( ) ;
25
- cy . get ( '#number ' ) . select ( '2' ) ;
26
- cy . get ( '#size ' ) . select ( '512x512' ) ;
23
+ cy . get ( '#status ' ) . check ( ) ;
24
+ cy . get ( '#classifai_feature_image_generation_roles_administrator ' ) . check ( ) ;
25
+ cy . get ( '#number_of_images ' ) . select ( '2' ) ;
26
+ cy . get ( '#image_size ' ) . select ( '512x512' ) ;
27
27
cy . get ( '#submit' ) . click ( ) ;
28
28
} ) ;
29
29
@@ -80,19 +80,19 @@ describe( 'Image Generation (OpenAI DALL·E) Tests', () => {
80
80
it ( 'Can enable/disable image generation feature' , ( ) => {
81
81
// Disable feature.
82
82
cy . visit (
83
- '/wp-admin/tools.php?page=classifai&tab=image_processing&provider=openai_dalle '
83
+ '/wp-admin/tools.php?page=classifai&tab=language_processing&feature=feature_image_generation '
84
84
) ;
85
- cy . get ( '#enable_image_gen ' ) . uncheck ( ) ;
85
+ cy . get ( '#status ' ) . uncheck ( ) ;
86
86
cy . get ( '#submit' ) . click ( ) ;
87
87
88
88
// Verify that the feature is not available.
89
89
cy . verifyImageGenerationEnabled ( false ) ;
90
90
91
91
// Enable feature.
92
92
cy . visit (
93
- '/wp-admin/tools.php?page=classifai&tab=image_processing&provider=openai_dalle '
93
+ '/wp-admin/tools.php?page=classifai&tab=language_processing&feature=feature_image_generation '
94
94
) ;
95
- cy . get ( '#enable_image_gen ' ) . check ( ) ;
95
+ cy . get ( '#status ' ) . check ( ) ;
96
96
cy . get ( '#submit' ) . click ( ) ;
97
97
98
98
// Verify that the feature is available.
@@ -101,11 +101,11 @@ describe( 'Image Generation (OpenAI DALL·E) Tests', () => {
101
101
102
102
it ( 'Can generate image directly in media library' , ( ) => {
103
103
cy . visit (
104
- '/wp-admin/tools.php?page=classifai&tab=image_processing&provider=openai_dalle '
104
+ '/wp-admin/tools.php?page=classifai&tab=language_processing&feature=feature_image_generation '
105
105
) ;
106
106
107
- cy . get ( '#enable_image_gen ' ) . check ( ) ;
108
- cy . get ( '#openai_dalle_image_generation_roles_administrator ' ) . check ( ) ;
107
+ cy . get ( '#status ' ) . check ( ) ;
108
+ cy . get ( '#classifai_feature_image_generation_roles_administrator ' ) . check ( ) ;
109
109
cy . get ( '#submit' ) . click ( ) ;
110
110
111
111
cy . visit ( '/wp-admin/upload.php' ) ;
@@ -128,26 +128,24 @@ describe( 'Image Generation (OpenAI DALL·E) Tests', () => {
128
128
it ( 'Can enable/disable image generation feature by role' , ( ) => {
129
129
// Enable feature.
130
130
cy . visit (
131
- '/wp-admin/tools.php?page=classifai&tab=image_processing&provider=openai_dalle '
131
+ '/wp-admin/tools.php?page=classifai&tab=language_processing&feature=feature_image_generation '
132
132
) ;
133
- cy . get ( '#enable_image_gen ' ) . check ( ) ;
133
+ cy . get ( '#status ' ) . check ( ) ;
134
134
cy . get ( '#submit' ) . click ( ) ;
135
135
136
136
// Disable admin role.
137
137
cy . disableFeatureForRoles (
138
- 'image_generation' ,
139
- [ 'administrator' ] ,
140
- 'openai_dalle'
138
+ 'feature_image_generation' ,
139
+ [ 'administrator' ]
141
140
) ;
142
141
143
142
// Verify that the feature is not available.
144
143
cy . verifyImageGenerationEnabled ( false ) ;
145
144
146
145
// Enable admin role.
147
146
cy . enableFeatureForRoles (
148
- 'image_generation' ,
149
- [ 'administrator' ] ,
150
- 'openai_dalle'
147
+ 'feature_image_generation' ,
148
+ [ 'administrator' ]
151
149
) ;
152
150
153
151
// Verify that the feature is available.
@@ -157,19 +155,17 @@ describe( 'Image Generation (OpenAI DALL·E) Tests', () => {
157
155
it ( 'Can enable/disable image generation feature by user' , ( ) => {
158
156
// Disable admin role.
159
157
cy . disableFeatureForRoles (
160
- 'image_generation' ,
161
- [ 'administrator' ] ,
162
- 'openai_dalle'
158
+ 'feature_image_generation' ,
159
+ [ 'administrator' ]
163
160
) ;
164
161
165
162
// Verify that the feature is not available.
166
163
cy . verifyImageGenerationEnabled ( false ) ;
167
164
168
165
// Enable feature for admin user.
169
166
cy . enableFeatureForUsers (
170
- 'image_generation' ,
171
- [ 'admin' ] ,
172
- 'openai_dalle'
167
+ 'feature_image_generation' ,
168
+ [ 'admin' ]
173
169
) ;
174
170
175
171
// Verify that the feature is available.
@@ -178,16 +174,16 @@ describe( 'Image Generation (OpenAI DALL·E) Tests', () => {
178
174
179
175
it ( 'User can opt-out image generation feature' , ( ) => {
180
176
// Enable user based opt-out.
181
- cy . enableFeatureOptOut ( 'image_generation' , 'openai_dalle ' ) ;
177
+ cy . enableFeatureOptOut ( 'feature_image_generation ' ) ;
182
178
183
179
// opt-out
184
- cy . optOutFeature ( 'image_generation ' ) ;
180
+ cy . optOutFeature ( 'feature_image_generation ' ) ;
185
181
186
182
// Verify that the feature is not available.
187
183
cy . verifyImageGenerationEnabled ( false ) ;
188
184
189
185
// opt-in
190
- cy . optInFeature ( 'image_generation ' ) ;
186
+ cy . optInFeature ( 'feature_image_generation ' ) ;
191
187
192
188
// Verify that the feature is available.
193
189
cy . verifyImageGenerationEnabled ( true ) ;
0 commit comments