@@ -25,7 +25,7 @@ class PsGdprTabDataConsentPage extends ModuleConfiguration implements ModulePsGd
25
25
26
26
private readonly checkboxModuleForm : ( status : boolean ) => string ;
27
27
28
- private readonly messageModuleForm : ( nth : number ) => string ;
28
+ private readonly messageModuleForm : ( nth : number , idLang : number ) => string ;
29
29
30
30
private readonly saveButton : string ;
31
31
@@ -45,8 +45,8 @@ class PsGdprTabDataConsentPage extends ModuleConfiguration implements ModulePsGd
45
45
+ ' button.dropdown-toggle' ;
46
46
this . btnDropdownItemLangModuleForm = ( idLang : number ) => `div.open ul.dropdown-menu a[data-id="${ idLang } "]` ;
47
47
this . checkboxModuleForm = ( status : boolean ) => `input[id^="switch_registered_module_"]${ status ? '.yes' : '.no' } ` ;
48
- this . messageModuleForm = ( nth : number ) => `div:nth-child(${ nth + 1 } of [id^="registered_module_message"]) `
49
- + ' div.translatable-field:not([style="display:none"]) iframe' ;
48
+ this . messageModuleForm = ( nth : number , idLang : number ) => `div:nth-child(${ nth + 1 } of [id^="registered_module_message"]) `
49
+ + ` div.translatable-field:not([style="display:none"]) iframe[id$="_ ${ idLang } _ifr"]` ;
50
50
this . saveButton = '#submitDataConsent' ;
51
51
}
52
52
@@ -114,7 +114,7 @@ class PsGdprTabDataConsentPage extends ModuleConfiguration implements ModulePsGd
114
114
*/
115
115
async setNewsletterMessage ( page : Page , message : string ) : Promise < void > {
116
116
await this . setTinyMCEInputValue (
117
- page . locator ( this . messageModuleForm ( 0 ) ) . contentFrame ( ) ,
117
+ page . locator ( this . messageModuleForm ( 0 , dataLanguages . english . id ) ) . contentFrame ( ) ,
118
118
message ,
119
119
) ;
120
120
}
@@ -139,7 +139,7 @@ class PsGdprTabDataConsentPage extends ModuleConfiguration implements ModulePsGd
139
139
*/
140
140
async setContactFormMessage ( page : Page , message : string ) : Promise < void > {
141
141
await this . setTinyMCEInputValue (
142
- page . locator ( this . messageModuleForm ( 2 ) ) . contentFrame ( ) ,
142
+ page . locator ( this . messageModuleForm ( 2 , dataLanguages . english . id ) ) . contentFrame ( ) ,
143
143
message ,
144
144
) ;
145
145
}
@@ -164,7 +164,7 @@ class PsGdprTabDataConsentPage extends ModuleConfiguration implements ModulePsGd
164
164
*/
165
165
async setProductCommentsMessage ( page : Page , message : string ) : Promise < void > {
166
166
await this . setTinyMCEInputValue (
167
- page . locator ( this . messageModuleForm ( 1 ) ) . contentFrame ( ) ,
167
+ page . locator ( this . messageModuleForm ( 1 , dataLanguages . english . id ) ) . contentFrame ( ) ,
168
168
message ,
169
169
) ;
170
170
}
@@ -191,7 +191,8 @@ class PsGdprTabDataConsentPage extends ModuleConfiguration implements ModulePsGd
191
191
async setMailAlertsMessage ( page : Page , message : string , idLang : number = dataLanguages . english . id ) : Promise < void > {
192
192
await page . locator ( this . btnDropdownLangModuleForm ) . nth ( 3 ) . click ( ) ;
193
193
await page . locator ( this . btnDropdownItemLangModuleForm ( idLang ) ) . click ( ) ;
194
- await this . setTinyMCEInputValue ( page . locator ( this . messageModuleForm ( 3 ) ) . contentFrame ( ) , message ) ;
194
+ await this . waitForVisibleSelector ( page , this . messageModuleForm ( 3 , idLang ) , 10000 ) ;
195
+ await this . setTinyMCEInputValue ( page . locator ( this . messageModuleForm ( 3 , idLang ) ) . contentFrame ( ) , message ) ;
195
196
}
196
197
197
198
/**
0 commit comments