@@ -75,7 +75,17 @@ function generateAutoconsentRule({ region }, url, popup, button) {
7575 detectCmp : [ { exists : button . selector } ] ,
7676 detectPopup : [ { visible : button . selector } ] ,
7777 optIn : [ ] ,
78- optOut : [ { waitForThenClick : button . selector , comment : button . text } ] ,
78+ optOut : [
79+ { wait : 500 } ,
80+ { waitForThenClick : button . selector , comment : button . text } ,
81+ ] ,
82+ test : [
83+ {
84+ waitForVisible : button . selector ,
85+ timeout : 1000 ,
86+ check : 'none' ,
87+ } ,
88+ ] ,
7989 } ;
8090}
8191
@@ -88,7 +98,7 @@ function generateAutoconsentRule({ region }, url, popup, button) {
8898 * @param {import('./main').AutoConsentCMPRule[] } matchingRules - Array of existing rules.
8999 * @returns {{newRules: import('./main').AutoConsentCMPRule[], rulesToOverride: import('./main').AutoConsentCMPRule[], reviewNotes: import('./main').ReviewNote[], keptCount: number} }
90100 */
91- export function generateRulesForSite ( globalParams , url , cookiePopups , matchingRules ) {
101+ function generateRulesForSite ( globalParams , url , cookiePopups , matchingRules ) {
92102 const { region } = globalParams ;
93103 /** @type {import('./main').AutoConsentCMPRule[] } */
94104 const newRules = [ ] ;
@@ -194,3 +204,7 @@ export function generateRulesForSite(globalParams, url, cookiePopups, matchingRu
194204 }
195205 return { newRules, rulesToOverride, reviewNotes, keptCount } ;
196206}
207+
208+ module . exports = {
209+ generateRulesForSite,
210+ } ;
0 commit comments