Best JavaScript code snippet using testcafe
gcweb-en.js
Source:gcweb-en.js
1/*!2 * Centrally Deployed Templates Solution (CDTS) / Solution de gabarits à déploiement centralisé (SGDC)3 * github.com/wet-boew/cdts-sgdc/blob/master/LICENSE4 * v1.0.0-development - 2020-11-065 *6 */// This file was automatically generated from gcweb-en.soy.7// Please don't edit this file by hand.8if (typeof wet == 'undefined') { var wet = {}; }9if (typeof wet.builder == 'undefined') { wet.builder = {}; }10wet.builder.serverRefTop = function(opt_data, opt_ignored) {11 return serverPage.serverRefTop(opt_data);12};13wet.builder.serverTop = function(opt_data, opt_ignored) {14 return serverPage.serverTop(opt_data);15};16wet.builder.serverRefBottom = function(opt_data, opt_ignored) {17 return serverPage.serverRefBottom(opt_data);18};19wet.builder.serverBottom = function(opt_data, opt_ignored) {20 return serverPage.serverBottom(opt_data);21};22wet.builder.appTop = function(opt_data, opt_ignored) {23 return applicationPage.appTop(opt_data);24};25wet.builder.appFooter = function(opt_data, opt_ignored) {26 return applicationPage.appFooter(opt_data);27};28wet.builder.environment = function(opt_data, opt_ignored) {29 return (opt_data.cdnEnv == 'esdcqat' || opt_data.cdnEnv == 'esdcprod' || opt_data.cdnEnv == 'esdcnonprod') ? '/cdts/' : (opt_data.cdnPath != null) ? soy.$$escapeHtml(opt_data.cdnPath) : '/etc/designs/canada/cdts/';30};31wet.builder.refTop = function(opt_data, opt_ignored) {32 opt_data = opt_data || {};33 var output = '<script>dataLayer = [];<\/script><!-- Google Tag Manager --><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({\'gtm.start\': new Date().getTime(),event:\'gtm.js\'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!=\'dataLayer\'?\'&l=\'+l:\'\';j.async=true;j.src= \'https://www.googletagmanager.com/gtm.js?id=\'+i+dl;f.parentNode.insertBefore(j,f);})(window,document,\'script\',\'dataLayer\',\'GTM-5DBPCQJ\');<\/script><!-- End Google Tag Manager -->';34 if (opt_data.webAnalytics != null) {35 output += '<!-- Adobe Analytics --><script src="//assets.adobedtm.com/';36 var aaList27 = opt_data.webAnalytics;37 var aaListLen27 = aaList27.length;38 for (var aaIndex27 = 0; aaIndex27 < aaListLen27; aaIndex27++) {39 var aaData27 = aaList27[aaIndex27];40 output += 'caacec67651710193d2331efef325107c23a0145/satelliteLib-' + ((aaData27.version == 1) ? '92fcbbc24eeebb654a3dfbe688ed2dfe10a53e24' : (aaData27.version == 2) ? 'c2082deaf69c358c641c5eb20f94b615dd606662' : '') + ((aaData27.environment == 'staging') ? '-staging' : '');41 }42 output += '.js"><\/script>';43 }44 output += '<!--[if gte IE 9 | !IE ]><!--><link href=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/favicon.ico\' rel="icon" type="image/x-icon"><link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous" /><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'gcweb/css/theme.min.css\'><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'cdts/css/cdtsfixes.css\'>' + ((opt_data.isApplication == true) ? '<link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'cdts/css/cdtsapps.css\'>' : '') + '<!--<![endif]--><!--[if lt IE 9]><link href=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/favicon.ico\' rel="shortcut icon" /><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'gcweb/css/ie8-theme.min.css\' /><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"><\/script><script src=\'' + wet.builder.environment(opt_data) + 'wet-boew/js/ie8-wet-boew.min.js\'><\/script><![endif]--><!--[if lte IE 9]><![endif]-->';45 return output;46};47wet.builder.top = function(opt_data, opt_ignored) {48 opt_data = opt_data || {};49 var output = '<!-- Google Tag Manager (noscript) --><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5DBPCQJ" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><!-- End Google Tag Manager (noscript) --><nav><ul id="wb-tphp"><li class="wb-slc"><a class="wb-sl" href="#wb-cont">Skip to main content</a></li><li class="wb-slc visible-sm visible-md visible-lg"><a class="wb-sl" href="#wb-info">Skip to "About government"</a></li>' + ((opt_data.topSecMenu == true) ? '<li class="wb-slc visible-md visible-lg"><a class="wb-sl" href="#wb-sec">Skip to section menu</a></li>' : '') + '</ul></nav><header><div id="wb-bnr" class="container">';50 if (opt_data.lngLinks != null) {51 output += '<section id="wb-lng" class="text-right"><h2 class="wb-inv">Language selection</h2><ul class="list-inline margin-bottom-none">';52 var linkList67 = opt_data.lngLinks;53 var linkListLen67 = linkList67.length;54 for (var linkIndex67 = 0; linkIndex67 < linkListLen67; linkIndex67++) {55 var linkData67 = linkList67[linkIndex67];56 output += '<li><a hreflang="' + soy.$$escapeHtml(linkData67.lang) + '" lang="' + soy.$$escapeHtml(linkData67.lang) + '" href="' + soy.$$escapeHtml(linkData67.href) + '">' + soy.$$escapeHtml(linkData67.text) + '</a></li>';57 }58 output += '</ul></section>';59 }60 output += '<div class="row"><div class="brand col-xs-5 col-md-4" property="publisher" typeof="GovernmentOrganization">' + ((opt_data.siteMenu != false) ? '<a href="https://www.canada.ca/en.html" property="url">' : '') + '<img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/sig-blk-en.svg\' alt="" property="logo" /><span class="wb-inv" property="name"> Government of Canada / <span lang="fr">Gouvernement du Canada</span></span>' + ((opt_data.siteMenu != false) ? '</a>' : '') + '<meta property="areaServed" typeOf="Country" content="Canada" /><link property="logo" href=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/wmms-blk.svg\' /></div>' + ((opt_data.search != false) ? '<section id="wb-srch" class="col-lg-8 text-right"><h2>Search</h2><form action="https://www.canada.ca/en/sr.html" method="get" name="cse-search-box" role="search" class="form-inline"><div class="form-group"><label for="wb-srch-q" class="wb-inv">Search Canada.ca</label><input name="cdn" value="canada" type="hidden"><input name="st" value="s" type="hidden"><input name="num" value="10" type="hidden"><input name="langs" value="en" type="hidden"><input name="st1rt" value="1" type="hidden"><input name="s5bm3ts21rch" value="x" type="hidden"><input id="wb-srch-q" list="wb-srch-q-ac" class="wb-srch-q form-control" name="q" type="search" value="" size="34" maxlength="170" placeholder="Search Canada.ca"><input type="hidden" name="_charset_" value="UTF-8"><datalist id="wb-srch-q-ac"></datalist></div><div class="form-group submit"><button type="submit" id="wb-srch-sub" class="btn btn-primary btn-small" name="wb-srch-sub"><span class="glyphicon-search glyphicon"></span><span class="wb-inv">Search</span></button></div></form></section>' : '') + '</div></div>' + ((opt_data.siteMenu != false) ? '<nav class="gcweb-menu" typeof="SiteNavigationElement"><div class="container"><h2 class="wb-inv">Menu</h2><button type="button" aria-haspopup="true" aria-expanded="false"><span class="wb-inv">Main </span>Menu <span class="expicon glyphicon glyphicon-chevron-down"></span></button><ul role="menu" aria-orientation="vertical" data-ajax-replace="//www.canada.ca/content/dam/canada/sitemenu/sitemenu-v2-en.html"><li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/jobs.html">Jobs and the workplace</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/immigration-citizenship.html">Immigration and citizenship</a></li><li role="presentation"><a role="menuitem" href="https://travel.gc.ca/">Travel and tourism</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/business.html">Business and industry</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/benefits.html">Benefits</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/health.html">Health</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/taxes.html">Taxes</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/environment.html">Environment and natural resources</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/defence.html">National security and defence</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/culture.html">Culture, history and sport</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/policing.html">Policing, justice and emergencies</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/transport.html">Transport and infrastructure</a></li><li role="presentation"><a role="menuitem" href="http://international.gc.ca/world-monde/index.aspx?lang=eng">Canada and the world</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/finance.html">Money and finances</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/science.html">Science and innovation</a></li></ul></div></nav>' : '<div class="transactBar"></div>');61 if (opt_data.breadcrumbs != false) {62 output += '<nav id="wb-bc" property="breadcrumb"><h2>You are here:</h2><div class="container"><ol class="breadcrumb">';63 if (opt_data.breadcrumbs != null) {64 var itemList106 = opt_data.breadcrumbs;65 var itemListLen106 = itemList106.length;66 for (var itemIndex106 = 0; itemIndex106 < itemListLen106; itemIndex106++) {67 var itemData106 = itemList106[itemIndex106];68 output += '<li>' + ((itemData106.acronym != null) ? '<abbr title="' + soy.$$escapeHtml(itemData106.acronym) + '">' : '') + ((itemData106.href != null) ? '<a href="' + soy.$$escapeHtml(itemData106.href) + '">' : '') + soy.$$escapeHtml(itemData106.title) + ((itemData106.href != null) ? '</a>' : '') + ((itemData106.acronym != null) ? '</abbr>' : '') + '</li>';69 }70 } else {71 output += '<li><a href="https://www.canada.ca/en.html">Home</a></li>';72 }73 output += '</ol></div></nav>';74 }75 output += '</header>' + ((opt_data.showPreContent != false) ? '' : '');76 return output;77};78wet.builder.preFooter = function(opt_data, opt_ignored) {79 opt_data = opt_data || {};80 var output = '\t\t' + ((opt_data.showPostContent != false) ? '' : '');81 if (opt_data.pagedetails != false) {82 output += '<div class="pagedetails' + ((opt_data.isContainer != null) ? ' container' : '') + '">';83 if (opt_data.showFeedback != false || opt_data.showShare != false) {84 output += '<div class="row">' + ((opt_data.showFeedback != false) ? (opt_data.showFeedback != null && opt_data.showFeedback != true) ? '<div class="col-sm-6 col-md-5 col-lg-4"><a href="' + soy.$$escapeHtml(opt_data.showFeedback) + '" class="btn btn-default btn-center">Report a problem on this page</a></div>' : '<div class="col-sm-6 col-md-5 col-lg-4"><a href="https://www.canada.ca/en/report-problem.html" class="btn btn-default btn-center">Report a problem on this page</a></div>' : '');85 if (opt_data.showShare != false) {86 if (opt_data.showShare != null) {87 output += '<div class="wb-share col-sm-4 col-md-3 col-sm-offset-' + ((opt_data.showFeedback != false) ? '2' : '8') + ' col-md-offset-' + ((opt_data.showFeedback != false) ? '4' : '9') + ((opt_data.showFeedback != false) ? ' col-lg-offset-5' : '') + '" data-wb-share=\'{"filter": [';88 var itemList176 = opt_data.showShare;89 var itemListLen176 = itemList176.length;90 for (var itemIndex176 = 0; itemIndex176 < itemListLen176; itemIndex176++) {91 var itemData176 = itemList176[itemIndex176];92 output += '"' + soy.$$escapeHtml(itemData176) + '"' + ((! (itemIndex176 == itemListLen176 - 1)) ? ', ' : '');93 }94 output += '], "lnkClass": "btn btn-default btn-block"}\'></div>';95 } else {96 output += '<div class="wb-share col-sm-4 col-md-3 col-sm-offset-' + ((opt_data.showFeedback != false) ? '2' : '8') + ' col-md-offset-' + ((opt_data.showFeedback != false) ? '4' : '9') + ((opt_data.showFeedback != false) ? ' col-lg-offset-5' : '') + '" data-wb-share=\'{"lnkClass": "btn btn-default btn-block"}\'></div>';97 }98 }99 output += '</div>';100 }101 output += '<dl id="wb-dtmd">' + ((opt_data.screenIdentifier != null) ? '<dt>Screen Identifier: </dt><dd property="identifier">' + soy.$$escapeHtml(opt_data.screenIdentifier) + '</dd>' : '') + ((opt_data.dateModified != null) ? '<dt>Date modified: </dt><dd><time property="dateModified">' + soy.$$escapeHtml(opt_data.dateModified) + '</time></dd>' : '') + ((opt_data.versionIdentifier != null) ? '<dt>Version: </dt><dd property="version">' + soy.$$escapeHtml(opt_data.versionIdentifier) + '</dd>' : '') + '</dl></div>';102 }103 return output;104};105wet.builder.secmenu = function(opt_data, opt_ignored) {106 var output = '\t\t\t<h2 id="wb-sec-h" class="wb-inv">Section menu</h2>';107 var sectionList222 = opt_data.sections;108 var sectionListLen222 = sectionList222.length;109 for (var sectionIndex222 = 0; sectionIndex222 < sectionListLen222; sectionIndex222++) {110 var sectionData222 = sectionList222[sectionIndex222];111 output += '<section class="list-group menu list-unstyled"><h3>' + ((sectionData222.sectionLink != null) ? '<a href="' + soy.$$escapeHtml(sectionData222.sectionLink) + '"' + ((sectionData222.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' : '') + soy.$$escapeHtml(sectionData222.sectionName) + ((sectionData222.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + ((sectionData222.sectionLink != null) ? '</a>' : '') + '</h3><ul class="list-group menu list-unstyled">';112 var linkList241 = sectionData222.menuLinks;113 var linkListLen241 = linkList241.length;114 for (var linkIndex241 = 0; linkIndex241 < linkListLen241; linkIndex241++) {115 var linkData241 = linkList241[linkIndex241];116 if (linkData241.subLinks != null) {117 output += '<li><a href="' + soy.$$escapeHtml(linkData241.href) + '" class="list-group-item"' + ((linkData241.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(linkData241.text) + ((linkData241.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a><ul class="list-group menu list-unstyled">';118 var sublinkList256 = linkData241.subLinks;119 var sublinkListLen256 = sublinkList256.length;120 for (var sublinkIndex256 = 0; sublinkIndex256 < sublinkListLen256; sublinkIndex256++) {121 var sublinkData256 = sublinkList256[sublinkIndex256];122 output += '<li><a href="' + soy.$$escapeHtml(sublinkData256.subhref) + '" class="list-group-item"' + ((sublinkData256.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(sublinkData256.subtext) + ((sublinkData256.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a></li>';123 }124 output += '</ul></li>';125 } else {126 output += '<li><a href="' + soy.$$escapeHtml(linkData241.href) + '" class="list-group-item"' + ((linkData241.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(linkData241.text) + ((linkData241.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a></li>';127 }128 }129 output += '</ul></section>';130 }131 return output;132};133wet.builder.footer = function(opt_data, opt_ignored) {134 opt_data = opt_data || {};135 var output = '\t\t<footer id="wb-info">';136 if (opt_data.showFooter != false) {137 output += '<div class="landscape"><nav class="container wb-navcurr"><h2 class="wb-inv">About government</h2><ul class="list-unstyled colcount-sm-2 colcount-md-3">';138 if (opt_data.contactLinks != null) {139 var linkList294 = opt_data.contactLinks;140 var linkListLen294 = linkList294.length;141 for (var linkIndex294 = 0; linkIndex294 < linkListLen294; linkIndex294++) {142 var linkData294 = linkList294[linkIndex294];143 output += (linkIndex294 == 0) ? '<li><a href="' + soy.$$escapeHtml(linkData294.href) + '">Contact us</a></li>' : '';144 }145 } else {146 output += '<li><a href="https://www.canada.ca/en/contact.html">Contact us</a></li>';147 }148 output += '<li><a href="https://www.canada.ca/en/government/dept.html">Departments and agencies</a></li><li><a href="https://www.canada.ca/en/government/publicservice.html">Public service and military</a></li><li><a href="https://www.canada.ca/en/news.html">News</a></li><li><a href="https://www.canada.ca/en/government/system/laws.html">Treaties, laws and regulations</a></li><li><a href="https://www.canada.ca/en/transparency/reporting.html">Government-wide reporting</a></li><li><a href="http://pm.gc.ca/eng">Prime Minister</a></li><li><a href="https://www.canada.ca/en/government/system.html">How government works</a></li><li><a href="http://open.canada.ca/en/">Open government</a></li></ul></nav></div><div class="brand"><div class="container"><div class="row"><nav class="col-md-9 col-lg-10 ftr-urlt-lnk"><h2 class="wb-inv">About this site</h2><ul><li><a href="https://www.canada.ca/en/social.html">Social media</a></li><li><a href="https://www.canada.ca/en/mobile.html">Mobile applications</a></li><li><a href="https://www1.canada.ca/en/newsite.html">About Canada.ca</a></li><li><a href="https://www.canada.ca/en/transparency/terms.html">Terms and conditions</a></li><li><a href="https://www.canada.ca/en/transparency/privacy.html">Privacy</a></li></ul></nav>';149 } else {150 output += '<div id="transactFooter" class="landscape"></div><div class="brand"><div class="container"><div class="row"><nav class="col-md-9 col-lg-10 ftr-urlt-lnk"><h2 class="wb-inv">About this site</h2><ul>';151 if (opt_data.contactLinks != null) {152 var linkList308 = opt_data.contactLinks;153 var linkListLen308 = linkList308.length;154 for (var linkIndex308 = 0; linkIndex308 < linkListLen308; linkIndex308++) {155 var linkData308 = linkList308[linkIndex308];156 output += (linkIndex308 == 0) ? '<li><a ' + ((linkData308.href) ? ' href="' + soy.$$escapeHtml(linkData308.href) + '"' : ' href="https://www.canada.ca/en/contact.html"') + ((linkData308.newWindow) ? ' target="_blank" rel="noopener"' : '') + '>Contact information' + ((linkData308.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a></li>' : '';157 }158 } else {159 output += '<li><a href="https://www.canada.ca/en/contact.html">Contact information</a></li>';160 }161 if (opt_data.termsLink != null) {162 var linkList332 = opt_data.termsLink;163 var linkListLen332 = linkList332.length;164 for (var linkIndex332 = 0; linkIndex332 < linkListLen332; linkIndex332++) {165 var linkData332 = linkList332[linkIndex332];166 output += (linkIndex332 == 0) ? '<li><a ' + ((linkData332.href) ? ' href="' + soy.$$escapeHtml(linkData332.href) + '"' : ' href="https://www.canada.ca/en/transparency/terms.html"') + ((linkData332.newWindow) ? ' target="_blank" rel="noopener"' : '') + '>Terms and conditions' + ((linkData332.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a></li>' : '';167 }168 } else {169 output += '<li><a href="https://www.canada.ca/en/transparency/terms.html">Terms and conditions</a></li>';170 }171 if (opt_data.privacyLink != null) {172 var linkList356 = opt_data.privacyLink;173 var linkListLen356 = linkList356.length;174 for (var linkIndex356 = 0; linkIndex356 < linkListLen356; linkIndex356++) {175 var linkData356 = linkList356[linkIndex356];176 output += (linkIndex356 == 0) ? '<li><a ' + ((linkData356.href) ? ' href="' + soy.$$escapeHtml(linkData356.href) + '"' : ' href="https://www.canada.ca/en/transparency/privacy.html"') + ((linkData356.newWindow) ? ' target="_blank" rel="noopener"' : '') + '>Privacy' + ((linkData356.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a></li>' : '';177 }178 } else {179 output += '<li><a href="https://www.canada.ca/en/transparency/privacy.html">Privacy</a></li>';180 }181 output += '</ul></nav>';182 }183 output += '<div class="col-xs-6 visible-sm visible-xs tofpg"><a href="#wb-cont">Top of Page <span class="glyphicon glyphicon-chevron-up"></span></a></div><div class="col-xs-6 col-md-2 text-right"><img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/wmms-blk.svg\' alt="Symbol of the Government of Canada" /></div></div></div></div></footer>';184 return output;185};186wet.builder.refFooter = function(opt_data, opt_ignored) {187 opt_data = opt_data || {};188 return '\t\t<!--[if gte IE 9 | !IE ]><!--><script src=\'' + ((opt_data.jqueryEnv == 'external') ? 'https://ajax.googleapis.com/ajax/libs/' : wet.builder.environment(opt_data) + 'wet-boew/js/') + 'jquery/2.2.4/jquery.min.js\'><\/script><script src=\'' + wet.builder.environment(opt_data) + 'wet-boew/js/wet-boew.min.js\'><\/script><!--<![endif]--><!--[if lt IE 9]><script src=\'' + wet.builder.environment(opt_data) + 'wet-boew/js/ie8-wet-boew2.min.js\'><\/script><![endif]--><script src=\'' + wet.builder.environment(opt_data) + 'gcweb/js/theme.min.js\'><\/script>' + ((opt_data.exitScript == true) ? '<script src=\'' + wet.builder.environment(opt_data) + 'cdts/js/exitScript.js\'><\/script><script data-id="exitScript" data-token="' + soy.$$escapeHtml(opt_data.exitURL) + '" data-token-domains="' + soy.$$escapeHtml(opt_data.exitDomains) + '" data-token-modal="' + soy.$$escapeHtml(opt_data.displayModal) + '">clickA();<\/script><a id="sExitModalLink" class="wb-lbx lbx-modal wb-inv" title="" href="#sExitModal" tabindex="-1">Secure exit notice</a><section id="sExitModal" class="mfp-hide modal-dialog modal-content overlay-def"><header class="modal-header"><h2 class="modal-title">Warning</h2></header><div class="modal-body"><p>' + ((opt_data.exitMsg != null && opt_data.exitMsg.length > 0) ? soy.$$escapeHtml(opt_data.exitMsg) : 'You are about to leave a secure site, do you wish to continue?') + '</p><ul class="list-inline text-center"><li><a class="btn btn-primary popup-modal-dismiss pull-left" id="eCancel" href="javascript:void(0)" type="button">' + ((opt_data.cancelMsg != null && opt_data.cancelMsg.length > 0) ? soy.$$escapeHtml(opt_data.cancelMsg) : 'Cancel') + '</a></li><li><a class="btn btn-default popup-modal pull-right" id="eOK" href="javascript:void(0)" type="button">' + ((opt_data.yesMsg != null && opt_data.yesMsg.length > 0) ? soy.$$escapeHtml(opt_data.yesMsg) : 'Yes') + '</a></li></ul></div></section>' : '') + ((opt_data.isApplication == true) ? '<script src=\'' + wet.builder.environment(opt_data) + 'cdts/js/cdtscustom.js\'><\/script>' : '') + ((opt_data.webAnalytics != null) ? '<script>_satellite.pageBottom();<\/script>' : '');189};190wet.builder.splashTop = function(opt_data, opt_ignored) {191 return '\t\t<!--[if gte IE 9 | !IE ]><!--><link href=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/favicon.ico\' rel="icon" type="image/x-icon"><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'gcweb/css/theme.min.css\'><!--<![endif]--><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'gcweb/css/messages.min.css\'><!--[if lt IE 9]><link href=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/favicon.ico\' rel="shortcut icon" /><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'gcweb/css/messages-ie.min.css\' /><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'gcweb/css/ie8-theme.min.css\' /><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"><\/script><script src=\'' + wet.builder.environment(opt_data) + 'wet-boew/js/ie8-wet-boew.min.js\'><\/script><![endif]--><!--[if lte IE 9]><![endif]-->';192};193wet.builder.splash = function(opt_data, opt_ignored) {194 var output = '\t\t<div id="bg"><img src=\'' + wet.builder.environment(opt_data) + 'gcweb/img/splash/sp-bg-2.jpg\' alt=""></div><main><div class="sp-hb"><div class="sp-bx col-xs-12"><h1 property="name" class="wb-inv">Canada.ca</h1><div class="row"><div class="col-xs-11 col-md-8"><img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/sig-spl.svg\' alt="Government of Canada / Gouvernement du Canada" /></div></div><div class="row cdts-splash"><section class="col-xs-6 text-right" lang="en">' + ((opt_data.nameEng != null) ? '<h2>' + soy.$$escapeHtml(opt_data.nameEng) + '</h2>' : '<h2 class="wb-inv">Government of Canada</h2>') + '</section><section class="col-xs-6" lang="fr">' + ((opt_data.nameFra != null) ? '<h2>' + soy.$$escapeHtml(opt_data.nameFra) + '</h2>' : '<h2 class="wb-inv">Gouvernement du Canada</h2>') + '</section></div><row class="text-center">';195 var lang__soy472 = navigator.language;196 output += '<ul class="list-inline lst-spcd"><li>' + ((lang__soy472 == 'en-CA') ? '<a href="' + soy.$$escapeHtml(opt_data.indexEng) + '" class="btn btn-primary" lang="en">English</a>' : '<a href="' + soy.$$escapeHtml(opt_data.indexEng) + '" class="btn btn-default" lang="en">English</a>') + '</li><li>' + ((lang__soy472 == 'fr-CA') ? '<a href="' + soy.$$escapeHtml(opt_data.indexFra) + '" class="btn btn-primary" lang="fr">Français</a>' : '<a href="' + soy.$$escapeHtml(opt_data.indexFra) + '" class="btn btn-default" lang="fr">Français</a>') + '</li></ul></row></div><div class="sp-bx-bt col-xs-12"><div class="row"><div class="col-xs-7 col-md-8"><a href="' + soy.$$escapeHtml(opt_data.termsEng) + '" class="sp-lk">Terms & conditions</a> <span class="glyphicon glyphicon-asterisk"></span> <a href="' + soy.$$escapeHtml(opt_data.termsFra) + '" class="sp-lk" lang="fr">Avis</a></div><div class="col-xs-5 col-md-4 text-right mrgn-bttm-md"><img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/wmms-spl.svg\' width="127" alt="Symbol of the Government of Canada / Symbole du gouvernement du Canada" /></div></div></div></div></main><!--[if gte IE 9 | !IE ]><!--><script src="' + ((opt_data.jqueryEnv == 'external') ? 'https://ajax.googleapis.com/ajax/libs' : wet.builder.environment(opt_data) + 'wet-boew/js/') + 'jquery/2.2.4/jquery.min.js"><\/script><script src=\'' + wet.builder.environment(opt_data) + 'wet-boew/js/wet-boew.min.js\'><\/script><!--<![endif]--><!--[if lt IE 9]><script src=\'' + wet.builder.environment(opt_data) + 'wet-boew/js/ie8-wet-boew2.min.js\'><\/script><![endif]--><script src=\'' + wet.builder.environment(opt_data) + 'gcweb/js/theme.min.js\'><\/script>' + ((opt_data.webAnalytics != null) ? '<script>_satellite.pageBottom();<\/script>' : '') + '<link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'cdts/css/cdtsfixes.css\'>';197 return output;198};199// This file was automatically generated from gcweb-appPage-en.soy.200// Please don't edit this file by hand.201if (typeof applicationPage == 'undefined') { var applicationPage = {}; }202applicationPage.appTop = function(opt_data, opt_ignored) {203 opt_data = opt_data || {};204 var output = '<script>dataLayer = [];<\/script><!-- Google Tag Manager --><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({\'gtm.start\': new Date().getTime(),event:\'gtm.js\'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!=\'dataLayer\'?\'&l=\'+l:\'\';j.async=true;j.src= \'https://www.googletagmanager.com/gtm.js?id=\'+i+dl;f.parentNode.insertBefore(j,f);})(window,document,\'script\',\'dataLayer\',\'GTM-5DBPCQJ\');<\/script><!-- End Google Tag Manager --><ul id="wb-tphp"><li class="wb-slc"><a class="wb-sl" href="#wb-cont">Skip to main content</a></li><li class="wb-slc visible-sm visible-md visible-lg"><a class="wb-sl" href="#wb-info">Skip to "' + ((opt_data.topCusMenu == true) ? 'Related links' : 'About this Web application') + '"</a></li>' + ((opt_data.topSecMenu == true) ? '<li class="wb-slc visible-md visible-lg"><a class="wb-sl" href="#wb-sec">Skip to section menu</a></li>' : '') + '</ul><header><div id="wb-bnr" class="container">';205 if (opt_data.lngLinks != null) {206 output += '<section id="wb-lng" class="text-right"><h2 class="wb-inv">Language selection</h2><ul class="list-inline margin-bottom-none">';207 var linkList17 = opt_data.lngLinks;208 var linkListLen17 = linkList17.length;209 for (var linkIndex17 = 0; linkIndex17 < linkListLen17; linkIndex17++) {210 var linkData17 = linkList17[linkIndex17];211 output += '<li><a lang="' + soy.$$escapeHtml(linkData17.lang) + '" href="' + soy.$$escapeHtml(linkData17.href) + '">' + soy.$$escapeHtml(linkData17.text) + '</a></li>';212 }213 output += '</ul></section>';214 }215 output += '<div class="row"><div class="brand col-xs-5 col-md-4" property="publisher" typeof="GovernmentOrganization"><img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/sig-blk-en.svg\' alt="" property="logo" /><span class="wb-inv" property="name"> Government of Canada / <span lang="fr">Gouvernement du Canada</span></span><meta property="areaServed" typeOf="Country" content="Canada" /><link property="logo" href=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/wmms-blk.svg\' /></div>';216 if (opt_data.customSearch != null) {217 var itemList34 = opt_data.customSearch;218 var itemListLen34 = itemList34.length;219 for (var itemIndex34 = 0; itemIndex34 < itemListLen34; itemIndex34++) {220 var itemData34 = itemList34[itemIndex34];221 if (itemIndex34 == 0) {222 output += '<section id="wb-srch" class="col-lg-8 text-right visible-md visible-lg"><h2>Search' + ((itemData34.placeholder != null) ? ' ' + soy.$$escapeHtml(itemData34.placeholder) : '') + '</h2><form action="' + soy.$$escapeHtml(itemData34.action) + '" method="' + soy.$$escapeHtml(itemData34.method) + '" name="cse-search-box" role="search" class="form-inline"><div class="form-group"><label for="' + ((itemData34.id != null) ? soy.$$escapeHtml(itemData34.id) : 'wb-srch-q') + '" class="wb-inv">Search' + ((itemData34.placeholder != null) ? ' ' + soy.$$escapeHtml(itemData34.placeholder) : '') + '</label><input id="' + ((itemData34.id != null) ? soy.$$escapeHtml(itemData34.id) : 'wb-srch-q') + '" class="wb-srch-q form-control" name="q" type="search" value="" size="34" maxlength="170" placeholder="Search' + ((itemData34.placeholder != null) ? ' ' + soy.$$escapeHtml(itemData34.placeholder) : '') + '">';223 if (itemData34.hiddenInput != null) {224 var inputList71 = itemData34.hiddenInput;225 var inputListLen71 = inputList71.length;226 for (var inputIndex71 = 0; inputIndex71 < inputListLen71; inputIndex71++) {227 var inputData71 = inputList71[inputIndex71];228 output += '<input type="hidden" name="' + soy.$$escapeHtml(inputData71.name) + '" value="' + soy.$$escapeHtml(inputData71.value) + '" />';229 }230 }231 output += '</div><div class="form-group submit"><button type="submit" id="wb-srch-sub" class="btn btn-primary btn-small" name="wb-srch-sub"><span class="glyphicon-search glyphicon"></span><span class="wb-inv">Search' + ((itemData34.placeholder != null) ? ' ' + soy.$$escapeHtml(itemData34.placeholder) : '') + '</span></button></div></form></section>';232 }233 }234 }235 output += '</div></div><div class="app-bar"><div class="container"><div class="row">' + ((opt_data.appSettings != null || opt_data.signOut != null || opt_data.signIn != null) ? '<section class="col-xs-12 col-sm-7">' : '<section class="col-xs-12">');236 var itemList91 = opt_data.appName;237 var itemListLen91 = itemList91.length;238 for (var itemIndex91 = 0; itemIndex91 < itemListLen91; itemIndex91++) {239 var itemData91 = itemList91[itemIndex91];240 output += (itemIndex91 == 0) ? '<h2 class="wb-inv">Name of Web application</h2><a class="app-name" href="' + soy.$$escapeHtml(itemData91.href) + '">' + soy.$$escapeHtml(itemData91.text) + '</a>' : '';241 }242 output += '</section>';243 if (opt_data.appSettings != null || opt_data.signOut != null || opt_data.signIn != null) {244 output += '<nav class="col-sm-5 hidden-xs hidden-print"><h2 class="wb-inv">Account menu</h2><ul class="app-list-account list-unstyled">';245 if (opt_data.appSettings != null) {246 var itemList106 = opt_data.appSettings;247 var itemListLen106 = itemList106.length;248 for (var itemIndex106 = 0; itemIndex106 < itemListLen106; itemIndex106++) {249 var itemData106 = itemList106[itemIndex106];250 output += (itemIndex106 == 0) ? '<li><a href="' + soy.$$escapeHtml(itemData106.href) + '" class="btn"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span> Account settings</a></li> ' : '';251 }252 }253 if (opt_data.signOut != null) {254 var itemList115 = opt_data.signOut;255 var itemListLen115 = itemList115.length;256 for (var itemIndex115 = 0; itemIndex115 < itemListLen115; itemIndex115++) {257 var itemData115 = itemList115[itemIndex115];258 output += (itemIndex115 == 0) ? '<li><a href="' + soy.$$escapeHtml(itemData115.href) + '" class="btn"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Sign out</a></li>' : '';259 }260 } else if (opt_data.signIn != null) {261 var itemList123 = opt_data.signIn;262 var itemListLen123 = itemList123.length;263 for (var itemIndex123 = 0; itemIndex123 < itemListLen123; itemIndex123++) {264 var itemData123 = itemList123[itemIndex123];265 output += (itemIndex123 == 0) ? '<li><a href="' + soy.$$escapeHtml(itemData123.href) + '" class="btn"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Sign in</a></li>' : '';266 }267 }268 output += '</ul></nav>';269 }270 output += '</div></div></div>';271 if (opt_data.customSearch != null || opt_data.menuPath != null || opt_data.menuLinks != null || opt_data.topSecMenu == true || opt_data.appSettings != null || opt_data.signOut != null || opt_data.signIn != null) {272 output += '<div class="app-bar-mb container visible-xs-block hidden-print">';273 if (opt_data.menuPath != null || opt_data.menuLinks != null || opt_data.topSecMenu == true || opt_data.customSearch != null) {274 output += '<nav><h2 class="wb-inv">' + ((opt_data.menuPath != null || opt_data.menuLinks != null || opt_data.topSecMenu == true) ? 'Menu' + ((opt_data.customSearch != null) ? ' and search' : '') : 'Search') + '</h2><ul class="app-list-main list-unstyled">' + ((opt_data.menuPath != null || opt_data.menuLinks != null || opt_data.topSecMenu == true) ? '<li class="wb-mb-links" id="wb-glb-mn"><a href="#mb-pnl" aria-controls="mb-pnl" class="btn overlay-lnk" role="button">Menu</a><h2>Menu</h2></li>' : '') + ((opt_data.customSearch != null) ? '<li><a href="#app-srch-mb" title="Search" aria-controls="app-srch-mb" class="btn overlay-lnk" role="button"><span class="glyphicon-search glyphicon" aria-hidden="true"></span><span class="wb-inv">Search</span></a></li>' : '') + '</ul><div id="mb-pnl"></div>';275 if (opt_data.customSearch != null) {276 var itemList156 = opt_data.customSearch;277 var itemListLen156 = itemList156.length;278 for (var itemIndex156 = 0; itemIndex156 < itemListLen156; itemIndex156++) {279 var itemData156 = itemList156[itemIndex156];280 if (itemIndex156 == 0) {281 output += '<section id="app-srch-mb" class="wb-overlay modal-content overlay-def wb-bar-t"><div class="modal-header"><h3 class="modal-title">Search' + ((itemData156.placeholder != null) ? ' ' + soy.$$escapeHtml(itemData156.placeholder) : '') + '</h3></div><div class="modal-body"><form action="' + soy.$$escapeHtml(itemData156.action) + '" method="' + soy.$$escapeHtml(itemData156.method) + '" name="cse-search-box" role="search" class="form-inline"><div class="input-group"><label for="' + ((itemData156.id != null) ? 'app-' + soy.$$escapeHtml(itemData156.id) : 'app-srch-q-mb') + '" class="wb-inv">Search' + ((itemData156.placeholder != null) ? ' ' + soy.$$escapeHtml(itemData156.placeholder) : '') + '</label><input placeholder="Search' + ((itemData156.placeholder != null) ? ' ' + soy.$$escapeHtml(itemData156.placeholder) : '') + '" id="' + ((itemData156.id != null) ? 'app-' + soy.$$escapeHtml(itemData156.id) : 'app-srch-q-mb') + '" class="app-srch-q-mb form-control" name="q" type="search" value="" size="27" maxlength="150">';282 if (itemData156.hiddenInput != null) {283 var inputList195 = itemData156.hiddenInput;284 var inputListLen195 = inputList195.length;285 for (var inputIndex195 = 0; inputIndex195 < inputListLen195; inputIndex195++) {286 var inputData195 = inputList195[inputIndex195];287 output += '<input type="hidden" name="' + soy.$$escapeHtml(inputData195.name) + '" value="' + soy.$$escapeHtml(inputData195.value) + '" />';288 }289 }290 output += '<span class="input-group-btn"><button type="submit" id="app-srch-sub-mb" class="btn btn-primary btn-small" name="app-srch-sub-mb"><span class="glyphicon-search glyphicon"></span><span class="wb-inv">Search' + ((itemData156.placeholder != null) ? ' ' + soy.$$escapeHtml(itemData156.placeholder) : '') + '</span></button></span></div></form></div></section>';291 }292 }293 }294 output += '</nav>';295 }296 if (opt_data.appSettings != null || opt_data.signOut != null || opt_data.signIn != null) {297 output += '<nav><h2 class="wb-inv">Account menu</h2><ul class="app-list-account list-unstyled">';298 if (opt_data.appSettings != null) {299 var itemList215 = opt_data.appSettings;300 var itemListLen215 = itemList215.length;301 for (var itemIndex215 = 0; itemIndex215 < itemListLen215; itemIndex215++) {302 var itemData215 = itemList215[itemIndex215];303 output += (itemIndex215 == 0) ? '<li><a href="' + soy.$$escapeHtml(itemData215.href) + '" class="btn"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span> Account settings</a></li> ' : '';304 }305 }306 if (opt_data.signOut != null) {307 var itemList224 = opt_data.signOut;308 var itemListLen224 = itemList224.length;309 for (var itemIndex224 = 0; itemIndex224 < itemListLen224; itemIndex224++) {310 var itemData224 = itemList224[itemIndex224];311 output += (itemIndex224 == 0) ? '<li><a href="' + soy.$$escapeHtml(itemData224.href) + '" class="btn"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Sign out</a></li>' : '';312 }313 } else if (opt_data.signIn != null) {314 var itemList232 = opt_data.signIn;315 var itemListLen232 = itemList232.length;316 for (var itemIndex232 = 0; itemIndex232 < itemListLen232; itemIndex232++) {317 var itemData232 = itemList232[itemIndex232];318 output += (itemIndex232 == 0) ? '<li><a href="' + soy.$$escapeHtml(itemData232.href) + '" class="btn"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Sign in</a></li>' : '';319 }320 }321 output += '</ul></nav>';322 }323 output += '</div>';324 if (opt_data.menuLinks != null) {325 output += '<nav id="wb-sm" data-trgt="mb-pnl" class="wb-menu visible-md visible-lg" typeof="SiteNavigationElement"><div class="pnl-strt container nvbar"><h2 class="wb-inv">Main navigation menu</h2><div class="row"><ul class="list-inline menu" role="menubar">';326 var linkList244 = opt_data.menuLinks;327 var linkListLen244 = linkList244.length;328 for (var linkIndex244 = 0; linkIndex244 < linkListLen244; linkIndex244++) {329 var linkData244 = linkList244[linkIndex244];330 if (linkData244.subLinks != null) {331 output += '<li><a href="#' + soy.$$escapeHtml(linkData244.id) + '" class="item"' + ((linkData244.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(linkData244.text) + ((linkData244.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a><ul class="sm list-unstyled" id="' + soy.$$escapeHtml(linkData244.id) + '" role="menu">';332 var sublinkList261 = linkData244.subLinks;333 var sublinkListLen261 = sublinkList261.length;334 for (var sublinkIndex261 = 0; sublinkIndex261 < sublinkListLen261; sublinkIndex261++) {335 var sublinkData261 = sublinkList261[sublinkIndex261];336 output += (sublinkIndex261 == sublinkListLen261 - 1) ? '<li class="slflnk"><a href="' + soy.$$escapeHtml(sublinkData261.subhref) + '"' + ((sublinkData261.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(sublinkData261.subtext) + ((sublinkData261.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a></li>' : '<li><a href="' + soy.$$escapeHtml(sublinkData261.subhref) + '"' + ((sublinkData261.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(sublinkData261.subtext) + ((sublinkData261.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a></li>';337 }338 output += '</ul></li>';339 } else {340 output += '<li><a href="' + soy.$$escapeHtml(linkData244.href) + '" class="item"' + ((linkData244.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(linkData244.text) + ((linkData244.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a></li>';341 }342 }343 output += '</ul></div></div></nav>';344 } else if (opt_data.menuPath != null) {345 output += '<nav id="wb-sm" data-ajax-replace="' + soy.$$escapeHtml(opt_data.menuPath) + '" data-trgt="mb-pnl" class="wb-menu visible-md visible-lg" typeof="SiteNavigationElement"></nav>';346 }347 }348 if (opt_data.breadcrumbs != null) {349 output += '<nav id="wb-bc" property="breadcrumb"><h2>You are here:</h2><div class="container"><div class="row"><ol class="breadcrumb">';350 var itemList313 = opt_data.breadcrumbs;351 var itemListLen313 = itemList313.length;352 for (var itemIndex313 = 0; itemIndex313 < itemListLen313; itemIndex313++) {353 var itemData313 = itemList313[itemIndex313];354 output += '<li>' + ((itemData313.acronym != null) ? '<abbr title="' + soy.$$escapeHtml(itemData313.acronym) + '">' : '') + ((itemData313.href != null) ? '<a href="' + soy.$$escapeHtml(itemData313.href) + '">' : '') + soy.$$escapeHtml(itemData313.title) + ((itemData313.href != null) ? '</a>' : '') + ((itemData313.acronym != null) ? '</abbr>' : '') + '</li>';355 }356 output += '</ol></div></div></nav>';357 }358 output += '</header>' + ((opt_data.showPreContent != false) ? '' : '');359 return output;360};361applicationPage.appFooter = function(opt_data, opt_ignored) {362 opt_data = opt_data || {};363 var output = '\t\t<footer id="wb-info">';364 if (opt_data.footerSections != null) {365 output += '<div class="landscape"><nav class="container wb-navcurr"><h2 class="wb-inv">Related links</h2><ul class="list-unstyled colcount-sm-2 colcount-md-3">';366 var linkList343 = opt_data.footerSections;367 var linkListLen343 = linkList343.length;368 for (var linkIndex343 = 0; linkIndex343 < linkListLen343; linkIndex343++) {369 var linkData343 = linkList343[linkIndex343];370 output += '<li><a href="' + soy.$$escapeHtml(linkData343.href) + '"' + ((linkData343.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(linkData343.text) + ((linkData343.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a></li>';371 }372 output += '</ul></nav></div>';373 }374 output += '<div class="brand"><div class="container"><div class="row"><nav class="col-md-10 ftr-urlt-lnk"><h2 class="wb-inv">About this Web application</h2><ul>';375 if (opt_data.contactLink != null) {376 var linkList361 = opt_data.contactLink;377 var linkListLen361 = linkList361.length;378 for (var linkIndex361 = 0; linkIndex361 < linkListLen361; linkIndex361++) {379 var linkData361 = linkList361[linkIndex361];380 output += (linkIndex361 == 0) ? '<li><a ' + ((linkData361.href) ? ' href="' + soy.$$escapeHtml(linkData361.href) + '"' : ' href="https://www.canada.ca/en/contact.html"') + ((linkData361.newWindow) ? ' target="_blank" rel="noopener"' : '') + '>Contact information' + ((linkData361.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a></li>' : '';381 }382 } else {383 output += '<li><a href="https://www.canada.ca/en/contact.html">Contact information</a></li>';384 }385 if (opt_data.termsLink != null) {386 var linkList385 = opt_data.termsLink;387 var linkListLen385 = linkList385.length;388 for (var linkIndex385 = 0; linkIndex385 < linkListLen385; linkIndex385++) {389 var linkData385 = linkList385[linkIndex385];390 output += (linkIndex385 == 0) ? '<li><a ' + ((linkData385.href) ? ' href="' + soy.$$escapeHtml(linkData385.href) + '"' : ' href="https://www.canada.ca/en/transparency/terms.html"') + ((linkData385.newWindow) ? ' target="_blank" rel="noopener"' : '') + '>Terms and conditions' + ((linkData385.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a></li>' : '';391 }392 } else {393 output += '<li><a href="https://www.canada.ca/en/transparency/terms.html">Terms and conditions</a></li>';394 }395 if (opt_data.privacyLink != null) {396 var linkList409 = opt_data.privacyLink;397 var linkListLen409 = linkList409.length;398 for (var linkIndex409 = 0; linkIndex409 < linkListLen409; linkIndex409++) {399 var linkData409 = linkList409[linkIndex409];400 output += (linkIndex409 == 0) ? '<li><a ' + ((linkData409.href) ? ' href="' + soy.$$escapeHtml(linkData409.href) + '"' : ' href="https://www.canada.ca/en/transparency/privacy.html"') + ((linkData409.newWindow) ? ' target="_blank" rel="noopener"' : '') + '>Privacy' + ((linkData409.newWindow == true) ? '<span class="wb-inv"> This link will open in a new window</span>' : '') + '</a></li>' : '';401 }402 } else {403 output += '<li><a href="https://www.canada.ca/en/transparency/privacy.html">Privacy</a></li>';404 }405 output += '</ul></nav><div class="col-xs-6 visible-sm visible-xs tofpg"><a href="#wb-cont">Top of Page <span class="glyphicon glyphicon-chevron-up"></span></a></div><div class="col-xs-6 col-md-3 col-lg-2 text-right"><img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/wmms-blk.svg\' alt="Symbol of the Government of Canada" /></div></div></div></div></footer>';406 return output;407};408// This file was automatically generated from gcweb-serverPage.soy.409// Please don't edit this file by hand.410if (typeof serverPage == 'undefined') { var serverPage = {}; }411serverPage.serverRefTop = function(opt_data, opt_ignored) {412 return '\t\t<!--[if gte IE 9 | !IE ]><!--><link href=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/favicon.ico\' rel="icon" type="image/x-icon"><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'gcweb/css/theme.min.css\'><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'cdts/css/cdtsfixes.css\'><!--<![endif]--><!--[if lt IE 9]><link href=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/favicon.ico\' rel="shortcut icon" /><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'gcweb/css/ie8-theme-srv.min.css\' /><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"><\/script><script src=\'' + wet.builder.environment(opt_data) + 'wet-boew/js/ie8-wet-boew.min.js\'><\/script><![endif]-->';413};414serverPage.serverTop = function(opt_data, opt_ignored) {415 return '\t<header><div id="wb-bnr" class="container"><div class="row"><div class="brand col-xs-8 col-sm-9 col-md-6"> <a href="https://canada.ca"><img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/sig-blk-en.svg\' alt="" /><span class="wb-inv"> Government of Canada / Gouvernement du Canada</span></a> </div></div></div></header>';416};417serverPage.serverBottom = function(opt_data, opt_ignored) {418 return '\t<footer id="wb-info"><div class="brand"><div class="container"><div class="row"><div class="col-xs-6 visible-sm visible-xs tofpg"> <a href="#wb-cont">Top of page / <span lang="fr">Haut de la page</span> <span class="glyphicon glyphicon-chevron-up"></span></a> </div><div class="col-xs-6 col-md-12 text-right"><img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/wmms-blk.svg\' alt="Symbol of the Government of Canada / Symbole du gouvernement du Canada" /></div></div></div></div></footer>';...
gcweb-fr.js
Source:gcweb-fr.js
1/*!2 * Centrally Deployed Templates Solution (CDTS) / Solution de gabarits à déploiement centralisé (SGDC)3 * github.com/wet-boew/cdts-sgdc/blob/master/LICENSE4 * v1.0.0-development - 2020-11-065 *6 */// This file was automatically generated from gcweb-fr.soy.7// Please don't edit this file by hand.8if (typeof wet == 'undefined') { var wet = {}; }9if (typeof wet.builder == 'undefined') { wet.builder = {}; }10wet.builder.serverRefTop = function(opt_data, opt_ignored) {11 return serverPage.serverRefTop(opt_data);12};13wet.builder.serverTop = function(opt_data, opt_ignored) {14 return serverPage.serverTop(opt_data);15};16wet.builder.serverRefBottom = function(opt_data, opt_ignored) {17 return serverPage.serverRefBottom(opt_data);18};19wet.builder.serverBottom = function(opt_data, opt_ignored) {20 return serverPage.serverBottom(opt_data);21};22wet.builder.appTop = function(opt_data, opt_ignored) {23 return applicationPage.appTop(opt_data);24};25wet.builder.appFooter = function(opt_data, opt_ignored) {26 return applicationPage.appFooter(opt_data);27};28wet.builder.environment = function(opt_data, opt_ignored) {29 return (opt_data.cdnEnv == 'esdcqat' || opt_data.cdnEnv == 'esdcprod' || opt_data.cdnEnv == 'esdcnonprod') ? '/cdts/' : (opt_data.cdnPath != null) ? soy.$$escapeHtml(opt_data.cdnPath) : '/etc/designs/canada/cdts/';30};31wet.builder.refTop = function(opt_data, opt_ignored) {32 opt_data = opt_data || {};33 var output = '<script>dataLayer = [];<\/script><!-- Google Tag Manager --><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({\'gtm.start\': new Date().getTime(),event:\'gtm.js\'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!=\'dataLayer\'?\'&l=\'+l:\'\';j.async=true;j.src= \'https://www.googletagmanager.com/gtm.js?id=\'+i+dl;f.parentNode.insertBefore(j,f);})(window,document,\'script\',\'dataLayer\',\'GTM-5DBPCQJ\');<\/script><!-- End Google Tag Manager -->';34 if (opt_data.webAnalytics != null) {35 output += '<!-- Adobe Analytics --><script src="//gcweb/assets.adobedtm.com/';36 var aaList27 = opt_data.webAnalytics;37 var aaListLen27 = aaList27.length;38 for (var aaIndex27 = 0; aaIndex27 < aaListLen27; aaIndex27++) {39 var aaData27 = aaList27[aaIndex27];40 output += 'caacec67651710193d2331efef325107c23a0145/satelliteLib-' + ((aaData27.version == 1) ? '92fcbbc24eeebb654a3dfbe688ed2dfe10a53e24' : (aaData27.version == 2) ? 'c2082deaf69c358c641c5eb20f94b615dd606662' : '') + ((aaData27.environment == 'staging') ? '-staging' : '');41 }42 output += '.js"><\/script>';43 }44 output += '<!--[if gte IE 9 | !IE ]><!--><link href=\'' + wet.builder.environment(opt_data) + '/gcweb/assets/favicon.ico\' rel="icon" type="image/x-icon"><link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous" /><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + '/gcweb/css/theme.min.css\'><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + '/cdts/css/cdtsfixes.css\'>' + ((opt_data.isApplication == true) ? '<link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + '/cdts/css/cdtsapps.css\'>' : '') + '<!--<![endif]--><!--[if lt IE 9]><link href=\'' + wet.builder.environment(opt_data) + '/gcweb/assets/favicon.ico\' rel="shortcut icon" /><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + '/gcweb/css/ie8-theme.min.css\' /><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"><\/script><script src=\'' + wet.builder.environment(opt_data) + 'wet-boew/js/ie8-wet-boew.min.js\'><\/script><![endif]--><!--[if lte IE 9]><![endif]-->';45 return output;46};47wet.builder.top = function(opt_data, opt_ignored) {48 opt_data = opt_data || {};49 var output = '<!-- Google Tag Manager (noscript) --><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5DBPCQJ" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><!-- End Google Tag Manager (noscript) --><nav><ul id="wb-tphp"><li class="wb-slc"><a class="wb-sl" href="#wb-cont">Passer au contenu principal</a></li><li class="wb-slc visible-sm visible-md visible-lg"><a class="wb-sl" href="#wb-info">Passer à « Au sujet du gouvernement Â»</a></li>' + ((opt_data.topSecMenu == true) ? '<li class="wb-slc visible-md visible-lg"><a class="wb-sl" href="#wb-sec">Passer au menu de la section</a></li>' : '') + '</ul></nav><header><div id="wb-bnr" class="container">';50 if (opt_data.lngLinks != null) {51 output += '<section id="wb-lng" class="text-right"><h2 class="wb-inv">Sélection de la langue</h2><ul class="list-inline margin-bottom-none">';52 var linkList67 = opt_data.lngLinks;53 var linkListLen67 = linkList67.length;54 for (var linkIndex67 = 0; linkIndex67 < linkListLen67; linkIndex67++) {55 var linkData67 = linkList67[linkIndex67];56 output += '<li><a hreflang="' + soy.$$escapeHtml(linkData67.lang) + '" lang="' + soy.$$escapeHtml(linkData67.lang) + '" href="' + soy.$$escapeHtml(linkData67.href) + '">' + soy.$$escapeHtml(linkData67.text) + '</a></li>';57 }58 output += '</ul></section>';59 }60 output += '<div class="row"><div class="brand col-xs-5 col-md-4" property="publisher" typeof="GovernmentOrganization">' + ((opt_data.siteMenu != false) ? '<a href="https://www.canada.ca/fr.html" property="url">' : '') + '<img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/sig-blk-fr.svg\' alt="" property="logo" /><span class="wb-inv" property="name"> Gouvernement du Canada / <span lang="en">Government of Canada</span></span>' + ((opt_data.siteMenu != false) ? '</a>' : '') + '<meta property="areaServed" typeOf="Country" content="Canada" /><link property="logo" href=\'' + wet.builder.environment(opt_data) + '/gcweb/assets/wmms-blk.svg\' /></div>' + ((opt_data.search != false) ? '<section id="wb-srch" class="col-lg-8 text-right"><h2>Recherche</h2><form action="https://www.canada.ca/fr/sr.html" method="get" name="cse-search-box" role="search" class="form-inline"><div class="form-group"><label for="wb-srch-q" class="wb-inv">Rechercher dans Canada.ca</label><input name="cdn" value="canada" type="hidden"><input name="st" value="s" type="hidden"><input name="num" value="10" type="hidden"><input name="langs" value="fr" type="hidden"><input name="st1rt" value="1" type="hidden"><input name="s5bm3ts21rch" value="x" type="hidden"><input id="wb-srch-q" list="wb-srch-q-ac" class="wb-srch-q form-control" name="q" type="search" value="" size="34" maxlength="170" placeholder="Rechercher dans Canada.ca"><input type="hidden" name="_charset_" value="UTF-8"><datalist id="wb-srch-q-ac"></datalist></div><div class="form-group submit"><button type="submit" id="wb-srch-sub" class="btn btn-primary btn-small" name="wb-srch-sub"><span class="glyphicon-search glyphicon"></span><span class="wb-inv">Recherche</span></button></div></form></section>' : '') + '</div></div>' + ((opt_data.siteMenu != false) ? '<nav class="gcweb-menu" typeof="SiteNavigationElement"><div class="container"><h2 class="wb-inv">Menu</h2><button type="button" aria-haspopup="true" aria-expanded="false">Menu<span class="wb-inv"> principal</span> <span class="expicon glyphicon glyphicon-chevron-down"></span></button><ul role="menu" aria-orientation="vertical" data-ajax-replace="//www.canada.ca/content/dam/canada/sitemenu/sitemenu-v2-fr.html"><li role="presentation"><a role="menuitem" href="https://www.canada.ca/fr/services/emplois.html">Emplois et milieu de travail</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/fr/services/immigration-citoyennete.html">Immigration et citoyenneté</a></li><li role="presentation"><a role="menuitem" href="https://voyage.gc.ca/">Voyage et tourisme</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/fr/services/entreprises.html">Entreprises et industrie</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/fr/services/prestations.html">Prestations</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/fr/services/sante.html">Santé</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/fr/services/impots.html">Impôts</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/fr/services/environnement.html">Environnement et ressources naturelles</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/fr/services/defense.html">Sécurité nationale et défense</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/fr/services/culture.html">Culture, histoire et sport</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/fr/services/police.html">Services de police, justice et urgences</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/fr/services/transport.html">Transport et infrastructure</a></li><li role="presentation"><a role="menuitem" href="http://international.gc.ca/world-monde/index.aspx?lang=fra">Canada et le monde</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/fr/services/finance.html">Argent et finances</a></li><li role="presentation"><a role="menuitem" href="https://www.canada.ca/fr/services/science.html">Science et innovation</a></li></ul></div></nav>' : '<div class="transactBar"></div>');61 if (opt_data.breadcrumbs != false) {62 output += '<nav id="wb-bc" property="breadcrumb"><h2>Vous êtes ici :</h2><div class="container"><ol class="breadcrumb">';63 if (opt_data.breadcrumbs != null) {64 var itemList106 = opt_data.breadcrumbs;65 var itemListLen106 = itemList106.length;66 for (var itemIndex106 = 0; itemIndex106 < itemListLen106; itemIndex106++) {67 var itemData106 = itemList106[itemIndex106];68 output += '<li>' + ((itemData106.acronym != null) ? '<abbr title="' + soy.$$escapeHtml(itemData106.acronym) + '">' : '') + ((itemData106.href != null) ? '<a href="' + soy.$$escapeHtml(itemData106.href) + '">' : '') + soy.$$escapeHtml(itemData106.title) + ((itemData106.href != null) ? '</a>' : '') + ((itemData106.acronym != null) ? '</acronym>' : '') + '</li>';69 }70 } else {71 output += '<li><a href="https://www.canada.ca/fr.html">Accueil</a></li>';72 }73 output += '</ol></div></nav>';74 }75 output += '</header>' + ((opt_data.showPreContent != false) ? '' : '');76 return output;77};78wet.builder.preFooter = function(opt_data, opt_ignored) {79 opt_data = opt_data || {};80 var output = '\t\t\t' + ((opt_data.showPostContent != false) ? '' : '');81 if (opt_data.pagedetails != false) {82 output += '<div class="pagedetails' + ((opt_data.isContainer != null) ? ' container' : '') + '">';83 if (opt_data.showFeedback != false || opt_data.showShare != false) {84 output += '<div class="row">' + ((opt_data.showFeedback != false) ? (opt_data.showFeedback != null && opt_data.showFeedback != true) ? '<div class="col-sm-6 col-md-5 col-lg-4"><a href="' + soy.$$escapeHtml(opt_data.showFeedback) + '" class="btn btn-default btn-center">Signaler un problème sur cette page</a></div>' : '<div class="col-sm-6 col-md-5 col-lg-4"><a href="https://www.canada.ca/fr/signaler-probleme.html" class="btn btn-default btn-center">Signaler un problème sur cette page</a></div>' : '');85 if (opt_data.showShare != false) {86 if (opt_data.showShare != null) {87 output += '<div class="wb-share col-sm-4 col-md-3 col-sm-offset-' + ((opt_data.showFeedback != false) ? '2' : '8') + ' col-md-offset-' + ((opt_data.showFeedback != false) ? '4' : '9') + ((opt_data.showFeedback != false) ? ' col-lg-offset-5' : '') + '" data-wb-share=\'{"filter": [';88 var itemList176 = opt_data.showShare;89 var itemListLen176 = itemList176.length;90 for (var itemIndex176 = 0; itemIndex176 < itemListLen176; itemIndex176++) {91 var itemData176 = itemList176[itemIndex176];92 output += '"' + soy.$$escapeHtml(itemData176) + '"' + ((! (itemIndex176 == itemListLen176 - 1)) ? ', ' : '');93 }94 output += '], "lnkClass": "btn btn-default btn-block"}\'></div>';95 } else {96 output += '<div class="wb-share col-sm-4 col-md-3 col-sm-offset-' + ((opt_data.showFeedback != false) ? '2' : '8') + ' col-md-offset-' + ((opt_data.showFeedback != false) ? '4' : '9') + ((opt_data.showFeedback != false) ? ' col-lg-offset-5' : '') + '" data-wb-share=\'{"lnkClass": "btn btn-default btn-block"}\'></div>';97 }98 }99 output += '</div>';100 }101 output += '<dl id="wb-dtmd">' + ((opt_data.screenIdentifier != null) ? '<dt>Identificateur d\'écran : </dt><dd property="identifier">' + soy.$$escapeHtml(opt_data.screenIdentifier) + '</dd>' : '') + ((opt_data.dateModified != null) ? '<dt>Date de modification : </dt><dd><time property="dateModified">' + soy.$$escapeHtml(opt_data.dateModified) + '</time></dd>' : '') + ((opt_data.versionIdentifier != null) ? '<dt>Version : </dt><dd property="version">' + soy.$$escapeHtml(opt_data.versionIdentifier) + '</dd>' : '') + '</dl></div>';102 }103 return output;104};105wet.builder.secmenu = function(opt_data, opt_ignored) {106 var output = '\t\t\t<h2 id="wb-sec-h" class="wb-inv">Menu de la section</h2>';107 var sectionList222 = opt_data.sections;108 var sectionListLen222 = sectionList222.length;109 for (var sectionIndex222 = 0; sectionIndex222 < sectionListLen222; sectionIndex222++) {110 var sectionData222 = sectionList222[sectionIndex222];111 output += '<section class="list-group menu list-unstyled"><h3>' + ((sectionData222.sectionLink != null) ? '<a href="' + soy.$$escapeHtml(sectionData222.sectionLink) + '"' + ((sectionData222.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' : '') + soy.$$escapeHtml(sectionData222.sectionName) + ((sectionData222.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + ((sectionData222.sectionLink != null) ? '</a>' : '') + '</h3><ul class="list-group menu list-unstyled">';112 var linkList241 = sectionData222.menuLinks;113 var linkListLen241 = linkList241.length;114 for (var linkIndex241 = 0; linkIndex241 < linkListLen241; linkIndex241++) {115 var linkData241 = linkList241[linkIndex241];116 if (linkData241.subLinks != null) {117 output += '<li><a href="' + soy.$$escapeHtml(linkData241.href) + '" class="list-group-item"' + ((linkData241.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(linkData241.text) + ((linkData241.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a><ul class="list-group menu list-unstyled">';118 var sublinkList256 = linkData241.subLinks;119 var sublinkListLen256 = sublinkList256.length;120 for (var sublinkIndex256 = 0; sublinkIndex256 < sublinkListLen256; sublinkIndex256++) {121 var sublinkData256 = sublinkList256[sublinkIndex256];122 output += '<li><a href="' + soy.$$escapeHtml(sublinkData256.subhref) + '" class="list-group-item"' + ((sublinkData256.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(sublinkData256.subtext) + ((sublinkData256.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a></li>';123 }124 output += '</ul></li>';125 } else {126 output += '<li><a href="' + soy.$$escapeHtml(linkData241.href) + '" class="list-group-item"' + ((linkData241.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(linkData241.text) + ((linkData241.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a></li>';127 }128 }129 output += '</ul></section>';130 }131 return output;132};133wet.builder.footer = function(opt_data, opt_ignored) {134 opt_data = opt_data || {};135 var output = '\t\t<footer id="wb-info">';136 if (opt_data.showFooter != false) {137 output += '<div class="landscape"><nav class="container wb-navcurr"><h2 class="wb-inv">Au sujet du gouvernement</h2><ul class="list-unstyled colcount-sm-2 colcount-md-3">';138 if (opt_data.contactLinks != null) {139 var linkList294 = opt_data.contactLinks;140 var linkListLen294 = linkList294.length;141 for (var linkIndex294 = 0; linkIndex294 < linkListLen294; linkIndex294++) {142 var linkData294 = linkList294[linkIndex294];143 output += (linkIndex294 == 0) ? '<li><a href="' + soy.$$escapeHtml(linkData294.href) + '">Contactez-nous</a></li>' : '';144 }145 } else {146 output += '<li><a href="https://www.canada.ca/fr/contact.html">Contactez-nous</a></li>';147 }148 output += '<li><a href="https://www.canada.ca/fr/gouvernement/min.html">Ministères et organismes</a></li><li><a href="https://www.canada.ca/fr/gouvernement/fonctionpublique.html">Fonction publique et force militaire</a></li><li><a href="https://www.canada.ca/fr/nouvelles.html">Nouvelles</a></li><li><a href="https://www.canada.ca/fr/gouvernement/systeme/lois.html">Traités, lois et règlements</a></li><li><a href="https://www.canada.ca/fr/transparence/rapports.html">Rapports à l\'échelle du gouvernement</a></li><li><a href="http://pm.gc.ca/fra">Premier ministre</a></li><li><a href="https://www.canada.ca/fr/gouvernement/systeme.html">Comment le gouvernement fonctionne</a></li><li><a href="http://ouvert.canada.ca/">Gouvernement ouvert</a></li></ul></nav></div><div class="brand"><div class="container"><div class="row"><nav class="col-md-9 col-lg-10 ftr-urlt-lnk"><h2 class="wb-inv">à propos du site</h2><ul><li><a href="https://www.canada.ca/fr/sociaux.html">Médias sociaux</a></li><li><a href="https://www.canada.ca/fr/mobile.html">Applications mobiles</a></li><li><a href="https://www1.canada.ca/fr/nouveausite.html">à propos de Canada.ca</a></li><li><a href="https://www.canada.ca/fr/transparence/avis.html">Avis</a></li><li><a href="https://www.canada.ca/fr/transparence/confidentialite.html">Confidentialité</a></li></ul></nav>';149 } else {150 output += '<div id="transactFooter" class="landscape"></div><div class="brand"><div class="container"><div class="row"><nav class="col-md-9 col-lg-10 ftr-urlt-lnk"><h2 class="wb-inv">à propos du site</h2><ul>';151 if (opt_data.contactLinks != null) {152 var linkList308 = opt_data.contactLinks;153 var linkListLen308 = linkList308.length;154 for (var linkIndex308 = 0; linkIndex308 < linkListLen308; linkIndex308++) {155 var linkData308 = linkList308[linkIndex308];156 output += (linkIndex308 == 0) ? '<li><a ' + ((linkData308.href) ? ' href="' + soy.$$escapeHtml(linkData308.href) + '"' : ' href="https://www.canada.ca/fr/contact.html"') + ((linkData308.newWindow) ? ' target="_blank" rel="noopener"' : '') + '>Coordonnées' + ((linkData308.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a></li>' : '';157 }158 } else {159 output += '<li><a href="https://www.canada.ca/fr/contact.html">Coordonnées</a></li>';160 }161 if (opt_data.termsLink != null) {162 var linkList332 = opt_data.termsLink;163 var linkListLen332 = linkList332.length;164 for (var linkIndex332 = 0; linkIndex332 < linkListLen332; linkIndex332++) {165 var linkData332 = linkList332[linkIndex332];166 output += (linkIndex332 == 0) ? '<li><a ' + ((linkData332.href) ? ' href="' + soy.$$escapeHtml(linkData332.href) + '"' : ' href="https://www.canada.ca/fr/transparence/avis.html"') + ((linkData332.newWindow) ? ' target="_blank" rel="noopener"' : '') + '>Avis' + ((linkData332.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a></li>' : '';167 }168 } else {169 output += '<li><a href="https://www.canada.ca/fr/transparence/avis.html">Avis</a></li>';170 }171 if (opt_data.privacyLink != null) {172 var linkList356 = opt_data.privacyLink;173 var linkListLen356 = linkList356.length;174 for (var linkIndex356 = 0; linkIndex356 < linkListLen356; linkIndex356++) {175 var linkData356 = linkList356[linkIndex356];176 output += (linkIndex356 == 0) ? '<li><a ' + ((linkData356.href) ? ' href="' + soy.$$escapeHtml(linkData356.href) + '"' : ' href="https://www.canada.ca/fr/transparence/confidentialite.html"') + ((linkData356.newWindow) ? ' target="_blank" rel="noopener"' : '') + '>Confidentialité' + ((linkData356.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a></li>' : '';177 }178 } else {179 output += '<li><a href="https://www.canada.ca/fr/transparence/confidentialite.html">Confidentialité</a></li>';180 }181 output += '</ul></nav>';182 }183 output += '<div class="col-xs-6 visible-sm visible-xs tofpg"><a href="#wb-cont">Haut de la page <span class="glyphicon glyphicon-chevron-up"></span></a></div><div class="col-xs-6 col-md-2 text-right"><img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/wmms-blk.svg\' alt="Symbole du gouvernement du Canada" /></div></div></div></div></footer>';184 return output;185};186wet.builder.refFooter = function(opt_data, opt_ignored) {187 opt_data = opt_data || {};188 return '\t\t<!--[if gte IE 9 | !IE ]><!--><script src="' + ((opt_data.jqueryEnv == 'external') ? 'https://ajax.googleapis.com/ajax/libs/' : wet.builder.environment(opt_data) + 'wet-boew/js/') + 'jquery/2.2.4/jquery.min.js"><\/script><script src=\'' + wet.builder.environment(opt_data) + 'wet-boew/js/wet-boew.min.js\'><\/script><!--<![endif]--><!--[if lt IE 9]><script src=\'' + wet.builder.environment(opt_data) + 'wet-boew/js/ie8-wet-boew2.min.js\'><\/script><![endif]--><script src=\'' + wet.builder.environment(opt_data) + 'gcweb/js/theme.min.js\'><\/script>' + ((opt_data.exitScript == true) ? '<script data-id="exitScript" data-token="' + soy.$$escapeHtml(opt_data.exitURL) + '" data-token-domains="' + soy.$$escapeHtml(opt_data.exitDomains) + '" data-token-modal="' + soy.$$escapeHtml(opt_data.displayModal) + '">clickA();<\/script><a id="sExitModalLink" class="wb-lbx lbx-modal wb-inv" title="" href="#sExitModal" tabindex="-1">Avis de sortie sécurisée</a><section id="sExitModal" class="mfp-hide modal-dialog modal-content overlay-def"><header class="modal-header"><h2 class="modal-title">Avertissement</h2></header><div class="modal-body"><p>' + ((opt_data.exitMsg != null && opt_data.exitMsg.length > 0) ? soy.$$escapeHtml(opt_data.exitMsg) : 'Vous êtes sur le point de quitter un site sécurisé. Voulez-vous continuer?') + '</p><ul class="list-inline text-center"><li><a class="btn btn-primary popup-modal-dismiss pull-left" id="eCancel" href="javascript:void(0)" type="button">' + ((opt_data.cancelMsg != null && opt_data.cancelMsg.length > 0) ? soy.$$escapeHtml(opt_data.cancelMsg) : 'Annuler') + '</a></li><li><a class="btn btn-default popup-modal pull-right" id="eOK" href="javascript:void(0)" type="button">' + ((opt_data.yesMsg != null && opt_data.yesMsg.length > 0) ? soy.$$escapeHtml(opt_data.yesMsg) : 'Oui') + '</a></li></ul></div></section>' : '') + ((opt_data.isApplication == true) ? '<script src=\'' + wet.builder.environment(opt_data) + 'cdts/js/cdtscustom.js\'><\/script>' : '') + ((opt_data.webAnalytics != null) ? '<script>_satellite.pageBottom();<\/script>' : '');189};190// This file was automatically generated from gcweb-appPage-fr.soy.191// Please don't edit this file by hand.192if (typeof applicationPage == 'undefined') { var applicationPage = {}; }193applicationPage.appTop = function(opt_data, opt_ignored) {194 opt_data = opt_data || {};195 var output = '<script>dataLayer = [];<\/script><!-- Google Tag Manager --><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({\'gtm.start\': new Date().getTime(),event:\'gtm.js\'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!=\'dataLayer\'?\'&l=\'+l:\'\';j.async=true;j.src= \'https://www.googletagmanager.com/gtm.js?id=\'+i+dl;f.parentNode.insertBefore(j,f);})(window,document,\'script\',\'dataLayer\',\'GTM-5DBPCQJ\');<\/script><!-- End Google Tag Manager --><ul id="wb-tphp"><li class="wb-slc"><a class="wb-sl" href="#wb-cont">Passer au contenu principal</a></li><li class="wb-slc visible-sm visible-md visible-lg"><a class="wb-sl" href="#wb-info">Passer à « ' + ((opt_data.topCusMenu == true) ? 'Liens connexes' : 'à propos de cette application Web') + ' Â»</a></li>' + ((opt_data.topSecMenu == true) ? '<li class="wb-slc visible-md visible-lg"><a class="wb-sl" href="#wb-sec">Passer au menu de la section</a></li>' : '') + '</ul><header><div id="wb-bnr" class="container">';196 if (opt_data.lngLinks != null) {197 output += '<section id="wb-lng" class="text-right"><h2 class="wb-inv">Sélection de la langue</h2><ul class="list-inline margin-bottom-none">';198 var linkList17 = opt_data.lngLinks;199 var linkListLen17 = linkList17.length;200 for (var linkIndex17 = 0; linkIndex17 < linkListLen17; linkIndex17++) {201 var linkData17 = linkList17[linkIndex17];202 output += '<li><a lang="' + soy.$$escapeHtml(linkData17.lang) + '" href="' + soy.$$escapeHtml(linkData17.href) + '">' + soy.$$escapeHtml(linkData17.text) + '</a></li>';203 }204 output += '</ul></section>';205 }206 output += '<div class="row"><div class="brand col-xs-5 col-md-4" property="publisher" typeof="GovernmentOrganization"><img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/sig-blk-fr.svg\' alt="" property="logo" /><span class="wb-inv" property="name"> Gouvernement du Canada / <span lang="en">Government of Canada</span></span><meta property="areaServed" typeOf="Country" content="Canada" /><link property="logo" href=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/wmms-blk.svg\' /></div>';207 if (opt_data.customSearch != null) {208 var itemList34 = opt_data.customSearch;209 var itemListLen34 = itemList34.length;210 for (var itemIndex34 = 0; itemIndex34 < itemListLen34; itemIndex34++) {211 var itemData34 = itemList34[itemIndex34];212 if (itemIndex34 == 0) {213 output += '<section id="wb-srch" class="col-lg-8 text-right visible-md visible-lg"><h2>Recherche' + ((itemData34.placeholder != null) ? ' ' + soy.$$escapeHtml(itemData34.placeholder) : '') + '</h2><form action="' + soy.$$escapeHtml(itemData34.action) + '" method="' + soy.$$escapeHtml(itemData34.method) + '" name="cse-search-box" role="search" class="form-inline"><div class="form-group"><label for="' + ((itemData34.id != null) ? soy.$$escapeHtml(itemData34.id) : 'wb-srch-q') + '" class="wb-inv">Rechercher' + ((itemData34.placeholder != null) ? ' dans ' + soy.$$escapeHtml(itemData34.placeholder) : '') + '</label><input id="' + ((itemData34.id != null) ? soy.$$escapeHtml(itemData34.id) : 'wb-srch-q') + '" class="wb-srch-q form-control" name="q" type="search" value="" size="34" maxlength="170" placeholder="Rechercher' + ((itemData34.placeholder != null) ? ' dans ' + soy.$$escapeHtml(itemData34.placeholder) : '') + '">';214 if (itemData34.hiddenInput != null) {215 var inputList71 = itemData34.hiddenInput;216 var inputListLen71 = inputList71.length;217 for (var inputIndex71 = 0; inputIndex71 < inputListLen71; inputIndex71++) {218 var inputData71 = inputList71[inputIndex71];219 output += '<input type="hidden" name="' + soy.$$escapeHtml(inputData71.name) + '" value="' + soy.$$escapeHtml(inputData71.value) + '" />';220 }221 }222 output += '</div><div class="form-group submit"><button type="submit" id="wb-srch-sub" class="btn btn-primary btn-small" name="wb-srch-sub"><span class="glyphicon-search glyphicon"></span><span class="wb-inv">Rechercher' + ((itemData34.placeholder != null) ? ' dans ' + soy.$$escapeHtml(itemData34.placeholder) : '') + '</span></button></div></form></section>';223 }224 }225 }226 output += '</div></div><div class="app-bar"><div class="container"><div class="row">' + ((opt_data.appSettings != null || opt_data.signOut != null || opt_data.signIn != null) ? '<section class="col-xs-12 col-sm-7">' : '<section class="col-xs-12">');227 var itemList91 = opt_data.appName;228 var itemListLen91 = itemList91.length;229 for (var itemIndex91 = 0; itemIndex91 < itemListLen91; itemIndex91++) {230 var itemData91 = itemList91[itemIndex91];231 output += (itemIndex91 == 0) ? '<h2 class="wb-inv">Nom de l\'application Web</h2><a class="app-name" href="' + soy.$$escapeHtml(itemData91.href) + '">' + soy.$$escapeHtml(itemData91.text) + '</a>' : '';232 }233 output += '</section>';234 if (opt_data.appSettings != null || opt_data.signOut != null || opt_data.signIn != null) {235 output += '<nav class="col-sm-5 hidden-xs hidden-print"><h2 class="wb-inv">Menu des paramètres du compte</h2><ul class="app-list-account list-unstyled">';236 if (opt_data.appSettings != null) {237 var itemList106 = opt_data.appSettings;238 var itemListLen106 = itemList106.length;239 for (var itemIndex106 = 0; itemIndex106 < itemListLen106; itemIndex106++) {240 var itemData106 = itemList106[itemIndex106];241 output += (itemIndex106 == 0) ? '<li><a href="' + soy.$$escapeHtml(itemData106.href) + '" class="btn"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span> Paramètres du compte</a></li> ' : '';242 }243 }244 if (opt_data.signOut != null) {245 var itemList115 = opt_data.signOut;246 var itemListLen115 = itemList115.length;247 for (var itemIndex115 = 0; itemIndex115 < itemListLen115; itemIndex115++) {248 var itemData115 = itemList115[itemIndex115];249 output += (itemIndex115 == 0) ? '<li><a href="' + soy.$$escapeHtml(itemData115.href) + '" class="btn"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Fermer la session</a></li>' : '';250 }251 } else if (opt_data.signIn != null) {252 var itemList123 = opt_data.signIn;253 var itemListLen123 = itemList123.length;254 for (var itemIndex123 = 0; itemIndex123 < itemListLen123; itemIndex123++) {255 var itemData123 = itemList123[itemIndex123];256 output += (itemIndex123 == 0) ? '<li><a href="' + soy.$$escapeHtml(itemData123.href) + '" class="btn"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Ouvrir une session</a></li>' : '';257 }258 }259 output += '</ul></nav>';260 }261 output += '</div></div></div>';262 if (opt_data.customSearch != null || opt_data.menuPath != null || opt_data.menuLinks != null || opt_data.topSecMenu == true || opt_data.appSettings != null || opt_data.signOut != null || opt_data.signIn != null) {263 output += '<div class="app-bar-mb container visible-xs-block hidden-print">';264 if (opt_data.menuPath != null || opt_data.menuLinks != null || opt_data.topSecMenu == true || opt_data.customSearch != null) {265 output += '<nav><h2 class="wb-inv">' + ((opt_data.menuPath != null || opt_data.menuLinks != null || opt_data.topSecMenu == true) ? 'Menu' + ((opt_data.customSearch != null) ? ' et recherche' : '') : 'Recherche') + '</h2><ul class="app-list-main list-unstyled">' + ((opt_data.menuPath != null || opt_data.menuLinks != null || opt_data.topSecMenu == true) ? '<li class="wb-mb-links" id="wb-glb-mn"><a href="#mb-pnl" aria-controls="mb-pnl" class="btn overlay-lnk" role="button">Menu</a><h2>Menu</h2></li>' : '') + ((opt_data.customSearch != null) ? '<li><a href="#app-srch-mb" title="Recherche" aria-controls="app-srch-mb" class="btn overlay-lnk" role="button"><span class="glyphicon-search glyphicon" aria-hidden="true"></span><span class="wb-inv">Recherche</span></a></li>' : '') + '</ul><div id="mb-pnl"></div>';266 if (opt_data.customSearch != null) {267 var itemList156 = opt_data.customSearch;268 var itemListLen156 = itemList156.length;269 for (var itemIndex156 = 0; itemIndex156 < itemListLen156; itemIndex156++) {270 var itemData156 = itemList156[itemIndex156];271 if (itemIndex156 == 0) {272 output += '<section id="app-srch-mb" class="wb-overlay modal-content overlay-def wb-bar-t"><div class="modal-header"><h3 class="modal-title">Recherche' + ((itemData156.placeholder != null) ? ' ' + soy.$$escapeHtml(itemData156.placeholder) : '') + '</h3></div><div class="modal-body"><form action="' + soy.$$escapeHtml(itemData156.action) + '" method="' + soy.$$escapeHtml(itemData156.method) + '" name="cse-search-box" role="search" class="form-inline"><div class="input-group"><label for="' + ((itemData156.id != null) ? 'app-' + soy.$$escapeHtml(itemData156.id) : 'app-srch-q-mb') + '" class="wb-inv">Recherche' + ((itemData156.placeholder != null) ? ' ' + soy.$$escapeHtml(itemData156.placeholder) : '') + '</label><input placeholder="Rechercher' + ((itemData156.placeholder != null) ? ' dans ' + soy.$$escapeHtml(itemData156.placeholder) : '') + '" id="' + ((itemData156.id != null) ? 'app-' + soy.$$escapeHtml(itemData156.id) : 'app-srch-q-mb') + '" class="app-srch-q-mb form-control" name="q" type="search" value="" size="27" maxlength="150">';273 if (itemData156.hiddenInput != null) {274 var inputList195 = itemData156.hiddenInput;275 var inputListLen195 = inputList195.length;276 for (var inputIndex195 = 0; inputIndex195 < inputListLen195; inputIndex195++) {277 var inputData195 = inputList195[inputIndex195];278 output += '<input type="hidden" name="' + soy.$$escapeHtml(inputData195.name) + '" value="' + soy.$$escapeHtml(inputData195.value) + '" />';279 }280 }281 output += '<span class="input-group-btn"><button type="submit" id="app-srch-sub-mb" class="btn btn-primary btn-small" name="app-srch-sub-mb"><span class="glyphicon-search glyphicon"></span><span class="wb-inv">Recherche' + ((itemData156.placeholder != null) ? ' ' + soy.$$escapeHtml(itemData156.placeholder) : '') + '</span></button></span></div></form></div></section>';282 }283 }284 }285 output += '</nav>';286 }287 if (opt_data.appSettings != null || opt_data.signOut != null || opt_data.signIn != null) {288 output += '<nav><h2 class="wb-inv">Menu des paramètres du compte</h2><ul class="app-list-account list-unstyled">';289 if (opt_data.appSettings != null) {290 var itemList215 = opt_data.appSettings;291 var itemListLen215 = itemList215.length;292 for (var itemIndex215 = 0; itemIndex215 < itemListLen215; itemIndex215++) {293 var itemData215 = itemList215[itemIndex215];294 output += (itemIndex215 == 0) ? '<li><a href="' + soy.$$escapeHtml(itemData215.href) + '" class="btn"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span> Paramètres du compte</a></li> ' : '';295 }296 }297 if (opt_data.signOut != null) {298 var itemList224 = opt_data.signOut;299 var itemListLen224 = itemList224.length;300 for (var itemIndex224 = 0; itemIndex224 < itemListLen224; itemIndex224++) {301 var itemData224 = itemList224[itemIndex224];302 output += (itemIndex224 == 0) ? '<li><a href="' + soy.$$escapeHtml(itemData224.href) + '" class="btn"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Fermer la session</a></li>' : '';303 }304 } else if (opt_data.signIn != null) {305 var itemList232 = opt_data.signIn;306 var itemListLen232 = itemList232.length;307 for (var itemIndex232 = 0; itemIndex232 < itemListLen232; itemIndex232++) {308 var itemData232 = itemList232[itemIndex232];309 output += (itemIndex232 == 0) ? '<li><a href="' + soy.$$escapeHtml(itemData232.href) + '" class="btn"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Ouvrir une session</a></li>' : '';310 }311 }312 output += '</ul></nav>';313 }314 output += '</div>';315 if (opt_data.menuLinks != null) {316 output += '<nav id="wb-sm" data-trgt="mb-pnl" class="wb-menu visible-md visible-lg" typeof="SiteNavigationElement"><div class="pnl-strt container nvbar"><h2 class="wb-inv">Menu de navigation principal</h2><div class="row"><ul class="list-inline menu" role="menubar">';317 var linkList244 = opt_data.menuLinks;318 var linkListLen244 = linkList244.length;319 for (var linkIndex244 = 0; linkIndex244 < linkListLen244; linkIndex244++) {320 var linkData244 = linkList244[linkIndex244];321 if (linkData244.subLinks != null) {322 output += '<li><a href="' + soy.$$escapeHtml(linkData244.id) + '" class="item"' + ((linkData244.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(linkData244.text) + ((linkData244.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a><ul class="sm list-unstyled" id="' + soy.$$escapeHtml(linkData244.id) + '" role="menu">';323 var sublinkList261 = linkData244.subLinks;324 var sublinkListLen261 = sublinkList261.length;325 for (var sublinkIndex261 = 0; sublinkIndex261 < sublinkListLen261; sublinkIndex261++) {326 var sublinkData261 = sublinkList261[sublinkIndex261];327 output += (sublinkIndex261 == sublinkListLen261 - 1) ? '<li class="slflnk"><a href="' + soy.$$escapeHtml(sublinkData261.subhref) + '"' + ((sublinkData261.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(sublinkData261.subtext) + ((sublinkData261.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a></li>' : '<li><a href="' + soy.$$escapeHtml(sublinkData261.subhref) + '"' + ((sublinkData261.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(sublinkData261.subtext) + ((sublinkData261.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a></li>';328 }329 output += '</ul></li>';330 } else {331 output += '<li><a href="' + soy.$$escapeHtml(linkData244.href) + '" class="item"' + ((linkData244.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(linkData244.text) + ((linkData244.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a></li>';332 }333 }334 output += '</ul></div></div></nav>';335 } else if (opt_data.menuPath != null) {336 output += '<nav id="wb-sm" data-ajax-replace="' + soy.$$escapeHtml(opt_data.menuPath) + '" data-trgt="mb-pnl" class="wb-menu visible-md visible-lg" typeof="SiteNavigationElement"></nav>';337 }338 }339 if (opt_data.breadcrumbs != null) {340 output += '<nav id="wb-bc" property="breadcrumb"><h2>Vous êtes ici :</h2><div class="container"><div class="row"><ol class="breadcrumb">';341 var itemList313 = opt_data.breadcrumbs;342 var itemListLen313 = itemList313.length;343 for (var itemIndex313 = 0; itemIndex313 < itemListLen313; itemIndex313++) {344 var itemData313 = itemList313[itemIndex313];345 output += '<li>' + ((itemData313.acronym != null) ? '<abbr title="' + soy.$$escapeHtml(itemData313.acronym) + '">' : '') + ((itemData313.href != null) ? '<a href="' + soy.$$escapeHtml(itemData313.href) + '">' : '') + soy.$$escapeHtml(itemData313.title) + ((itemData313.href != null) ? '</a>' : '') + ((itemData313.acronym != null) ? '</abbr>' : '') + '</li>';346 }347 output += '</ol></div></div></nav>';348 }349 output += '</header>' + ((opt_data.showPreContent != false) ? '' : '');350 return output;351};352applicationPage.appFooter = function(opt_data, opt_ignored) {353 opt_data = opt_data || {};354 var output = '\t\t<footer id="wb-info">';355 if (opt_data.footerSections != null) {356 output += '<div class="landscape"><nav class="container wb-navcurr"><h2 class="wb-inv">Liens connexes</h2><ul class="list-unstyled colcount-sm-2 colcount-md-3">';357 var linkList343 = opt_data.footerSections;358 var linkListLen343 = linkList343.length;359 for (var linkIndex343 = 0; linkIndex343 < linkListLen343; linkIndex343++) {360 var linkData343 = linkList343[linkIndex343];361 output += '<li><a href="' + soy.$$escapeHtml(linkData343.href) + '"' + ((linkData343.newWindow == true) ? ' target="_blank" rel="noopener"' : '') + '>' + soy.$$escapeHtml(linkData343.text) + ((linkData343.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a></li>';362 }363 output += '</ul></nav></div>';364 }365 output += '<div class="brand"><div class="container"><div class="row"><nav class="col-md-10 ftr-urlt-lnk"><h2 class="wb-inv">à propos de cette application Web</h2><ul>';366 if (opt_data.contactLink != null) {367 var linkList361 = opt_data.contactLink;368 var linkListLen361 = linkList361.length;369 for (var linkIndex361 = 0; linkIndex361 < linkListLen361; linkIndex361++) {370 var linkData361 = linkList361[linkIndex361];371 output += (linkIndex361 == 0) ? '<li><a ' + ((linkData361.href) ? ' href="' + soy.$$escapeHtml(linkData361.href) + '"' : ' href="https://www.canada.ca/fr/contact.html"') + ((linkData361.newWindow) ? ' target="_blank" rel="noopener"' : '') + '>Coordonnées' + ((linkData361.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a></li>' : '';372 }373 } else {374 output += '<li><a href="https://www.canada.ca/fr/contact.html">Coordonnées</a></li>';375 }376 if (opt_data.termsLink != null) {377 var linkList385 = opt_data.termsLink;378 var linkListLen385 = linkList385.length;379 for (var linkIndex385 = 0; linkIndex385 < linkListLen385; linkIndex385++) {380 var linkData385 = linkList385[linkIndex385];381 output += (linkIndex385 == 0) ? '<li><a ' + ((linkData385.href) ? ' href="' + soy.$$escapeHtml(linkData385.href) + '"' : ' href="https://www.canada.ca/fr/transparence/avis.html"') + ((linkData385.newWindow) ? ' target="_blank" rel="noopener"' : '') + '>Avis' + ((linkData385.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a></li>' : '';382 }383 } else {384 output += '<li><a href="https://www.canada.ca/fr/transparence/avis.html">Avis</a></li>';385 }386 if (opt_data.privacyLink != null) {387 var linkList409 = opt_data.privacyLink;388 var linkListLen409 = linkList409.length;389 for (var linkIndex409 = 0; linkIndex409 < linkListLen409; linkIndex409++) {390 var linkData409 = linkList409[linkIndex409];391 output += (linkIndex409 == 0) ? '<li><a ' + ((linkData409.href) ? ' href="' + soy.$$escapeHtml(linkData409.href) + '"' : ' href="https://www.canada.ca/fr/transparence/confidentialite.html"') + ((linkData409.newWindow) ? ' target="_blank" rel="noopener"' : '') + '>Confidentialité' + ((linkData409.newWindow == true) ? '<span class="wb-inv"> Ce lien ouvrira dans une nouvelle fenêtre</span>' : '') + '</a></li>' : '';392 }393 } else {394 output += '<li><a href="https://www.canada.ca/fr/transparence/confidentialite.html">Confidentialité</a></li>';395 }396 output += '</ul></nav><div class="col-xs-6 visible-sm visible-xs tofpg"><a href="#wb-cont">Haut de la page <span class="glyphicon glyphicon-chevron-up"></span></a></div><div class="col-xs-6 col-md-3 col-lg-2 text-right"><img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/wmms-blk.svg\' alt="Symbole du gouvernement du Canada" /></div></div></div></div></footer>';397 return output;398};399// This file was automatically generated from gcweb-serverPage.soy.400// Please don't edit this file by hand.401if (typeof serverPage == 'undefined') { var serverPage = {}; }402serverPage.serverRefTop = function(opt_data, opt_ignored) {403 return '\t\t<!--[if gte IE 9 | !IE ]><!--><link href=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/favicon.ico\' rel="icon" type="image/x-icon"><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'gcweb/css/theme.min.css\'><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'cdts/css/cdtsfixes.css\'><!--<![endif]--><!--[if lt IE 9]><link href=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/favicon.ico\' rel="shortcut icon" /><link rel="stylesheet" href=\'' + wet.builder.environment(opt_data) + 'gcweb/css/ie8-theme-srv.min.css\' /><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"><\/script><script src=\'' + wet.builder.environment(opt_data) + 'wet-boew/js/ie8-wet-boew.min.js\'><\/script><![endif]-->';404};405serverPage.serverTop = function(opt_data, opt_ignored) {406 return '\t<header><div id="wb-bnr" class="container"><div class="row"><div class="brand col-xs-8 col-sm-9 col-md-6"> <a href="https://canada.ca"><img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/sig-blk-en.svg\' alt="" /><span class="wb-inv"> Government of Canada / Gouvernement du Canada</span></a> </div></div></div></header>';407};408serverPage.serverBottom = function(opt_data, opt_ignored) {409 return '\t<footer id="wb-info"><div class="brand"><div class="container"><div class="row"><div class="col-xs-6 visible-sm visible-xs tofpg"> <a href="#wb-cont">Top of page / <span lang="fr">Haut de la page</span> <span class="glyphicon glyphicon-chevron-up"></span></a> </div><div class="col-xs-6 col-md-12 text-right"><img src=\'' + wet.builder.environment(opt_data) + 'gcweb/assets/wmms-blk.svg\' alt="Symbol of the Government of Canada / Symbole du gouvernement du Canada" /></div></div></div></div></footer>';...
exitScript.js
Source:exitScript.js
1const exitScriptPage = require('../pageobjects/exitScript.page');2const generateTestFile = require('../../TestFileGenerator.js');3const runAccessbilityTest = require('../../TestA11y.js');4require('../setup/basic.js');5describe('ExitScript Tests - GCWeb', () => {6 const theme = 'gcweb';7 8 generateTestFile('./test/html/gcweb/template-exitscript-en.html', 'gcweb', 'gcweb-exitscript-en', {9 refTop: '{"cdnEnv": "localhost"}',10 top: '{"cdnEnv": "localhost"}',11 preFooter: '{"cdnEnv": "localhost"}',12 footer: '{"cdnEnv": "localhost"}',13 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitURL": "exiturl-en.html", "exitMsg": "This is a custom message. You are about to leave a secure site, do you wish to continue?", "cancelMsg": "Nope", "yesMsg" : "Sure", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'14 });15 generateTestFile('./test/html/gcweb/template-exitscript-fr.html', 'gcweb', 'gcweb-exitscript-fr', {16 refTop: '{"cdnEnv": "localhost"}',17 top: '{"cdnEnv": "localhost"}',18 preFooter: '{"cdnEnv": "localhost"}',19 footer: '{"cdnEnv": "localhost"}',20 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitURL": "exiturl-fr.html", "exitMsg": "Ceci est un message personnalisé. Vous êtes sur le point de quitter un site sécurisé, désirez-vous continuer?", "cancelMsg": "Arrêter", "yesMsg" : "Continuer", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'21 });22 generateTestFile('./test/html/gcweb/template-exitscript-en.html', 'gcweb', 'gcweb-exitscript-noCustomMsg-en', {23 refTop: '{"cdnEnv": "localhost"}',24 top: '{"cdnEnv": "localhost"}',25 preFooter: '{"cdnEnv": "localhost"}',26 footer: '{"cdnEnv": "localhost"}',27 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitURL": "exiturl-en.html", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'28 });29 generateTestFile('./test/html/gcweb/template-exitscript-fr.html', 'gcweb', 'gcweb-exitscript-noCustomMsg-fr', {30 refTop: '{"cdnEnv": "localhost"}',31 top: '{"cdnEnv": "localhost"}',32 preFooter: '{"cdnEnv": "localhost"}',33 footer: '{"cdnEnv": "localhost"}',34 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitURL": "exiturl-fr.html", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'35 });36 generateTestFile('./test/html/gcweb/template-exitscript-en.html', 'gcweb', 'gcweb-exitscript-noDisplay-en', {37 refTop: '{"cdnEnv": "localhost"}',38 top: '{"cdnEnv": "localhost"}',39 preFooter: '{"cdnEnv": "localhost"}',40 footer: '{"cdnEnv": "localhost"}',41 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": false, "exitURL": "exiturl-en.html", "exitMsg": "This is a custom message. You are about to leave a secure site, do you wish to continue?", "cancelMsg": "Nope", "yesMsg" : "Sure", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'42 });43 generateTestFile('./test/html/gcweb/template-exitscript-fr.html', 'gcweb', 'gcweb-exitscript-noDisplay-fr', {44 refTop: '{"cdnEnv": "localhost"}',45 top: '{"cdnEnv": "localhost"}',46 preFooter: '{"cdnEnv": "localhost"}',47 footer: '{"cdnEnv": "localhost"}',48 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": false, "exitURL": "exiturl-fr.html", "exitMsg": "Ceci est un message personnalisé. Vous êtes sur le point de quitter un site sécurisé, désirez-vous continuer?", "cancelMsg": "Arrêter", "yesMsg" : "Continuer", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'49 });50 generateTestFile('./test/html/gcweb/template-exitscript-en.html', 'gcweb', 'gcweb-exitscript-noDisplayNewWindow-en', {51 refTop: '{"cdnEnv": "localhost"}',52 top: '{"cdnEnv": "localhost"}',53 preFooter: '{"cdnEnv": "localhost"}',54 footer: '{"cdnEnv": "localhost"}',55 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "displayModalForNewWindow": false, "exitURL": "exiturl-en.html", "exitMsg": "This is a custom message. You are about to leave a secure site, do you wish to continue?", "cancelMsg": "Nope", "yesMsg" : "Sure", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'56 });57 generateTestFile('./test/html/gcweb/template-exitscript-fr.html', 'gcweb', 'gcweb-exitscript-noDisplayNewWindow-fr', {58 refTop: '{"cdnEnv": "localhost"}',59 top: '{"cdnEnv": "localhost"}',60 preFooter: '{"cdnEnv": "localhost"}',61 footer: '{"cdnEnv": "localhost"}',62 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "displayModalForNewWindow": false, "exitURL": "exiturl-fr.html", "exitMsg": "Ceci est un message personnalisé. Vous êtes sur le point de quitter un site sécurisé, désirez-vous continuer?", "cancelMsg": "Arrêter", "yesMsg" : "Continuer", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'63 });64 generateTestFile('./test/html/gcweb/template-exitscript-en.html', 'gcweb', 'gcweb-exitscript-disabled-en', {65 refTop: '{"cdnEnv": "localhost"}',66 top: '{"cdnEnv": "localhost"}',67 preFooter: '{"cdnEnv": "localhost"}',68 footer: '{"cdnEnv": "localhost"}',69 refFooter: '{"exitSecureSite" : {"exitScript": false, "displayModal": true, "exitURL": "exiturl-en.html", "exitMsg": "This is a custom message. You are about to leave a secure site, do you wish to continue?", "cancelMsg": "Nope", "yesMsg" : "Sure", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'70 });71 generateTestFile('./test/html/gcweb/template-exitscript-fr.html', 'gcweb', 'gcweb-exitscript-disabled-fr', {72 refTop: '{"cdnEnv": "localhost"}',73 top: '{"cdnEnv": "localhost"}',74 preFooter: '{"cdnEnv": "localhost"}',75 footer: '{"cdnEnv": "localhost"}',76 refFooter: '{"exitSecureSite" : {"exitScript": false, "displayModal": true, "exitURL": "exiturl-fr.html", "exitMsg": "Ceci est un message personnalisé. Vous êtes sur le point de quitter un site sécurisé, désirez-vous continuer?", "cancelMsg": "Arrêter", "yesMsg" : "Continuer", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'77 });78 generateTestFile('./test/html/gcweb/template-exitscript-en.html', 'gcweb', 'gcweb-exitscript-noExitUrl-en', {79 refTop: '{"cdnEnv": "localhost"}',80 top: '{"cdnEnv": "localhost"}',81 preFooter: '{"cdnEnv": "localhost"}',82 footer: '{"cdnEnv": "localhost"}',83 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitMsg": "This is a custom message. You are about to leave a secure site, do you wish to continue?", "cancelMsg": "Nope", "yesMsg" : "Sure", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'84 });85 generateTestFile('./test/html/gcweb/template-exitscript-fr.html', 'gcweb', 'gcweb-exitscript-noExitUrl-fr', {86 refTop: '{"cdnEnv": "localhost"}',87 top: '{"cdnEnv": "localhost"}',88 preFooter: '{"cdnEnv": "localhost"}',89 footer: '{"cdnEnv": "localhost"}',90 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitMsg": "Ceci est un message personnalisé. Vous êtes sur le point de quitter un site sécurisé, désirez-vous continuer?", "cancelMsg": "Arrêter", "yesMsg" : "Continuer", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'91 });92 generateTestFile('./test/html/gcweb/template-exitscript-en.html', 'gcweb', 'gcweb-exitscript-parameters-en', {93 refTop: '{"cdnEnv": "localhost"}',94 top: '{"cdnEnv": "localhost"}',95 preFooter: '{"cdnEnv": "localhost"}',96 footer: '{"cdnEnv": "localhost"}',97 refFooter: '{"exitScript": true, "displayModal": true, "exitURL": "exiturl-en.html", "exitMsg": "This is a custom message. You are about to leave a secure site, do you wish to continue?", "cancelMsg": "Nope", "yesMsg" : "Sure", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca", "cdnEnv": "localhost"}'98 });99 generateTestFile('./test/html/gcweb/template-exitscript-fr.html', 'gcweb', 'gcweb-exitscript-parameters-fr', {100 refTop: '{"cdnEnv": "localhost"}',101 top: '{"cdnEnv": "localhost"}',102 preFooter: '{"cdnEnv": "localhost"}',103 footer: '{"cdnEnv": "localhost"}',104 refFooter: '{"exitScript": true, "displayModal": true, "exitURL": "exiturl-fr.html", "exitMsg": "Ceci est un message personnalisé. Vous êtes sur le point de quitter un site sécurisé, désirez-vous continuer?", "cancelMsg": "Arrêter", "yesMsg" : "Continuer", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca", "cdnEnv": "localhost"}'105 });106 107 it('Straight forward path of exit script', async () => {108 await straightPath(theme);109 await straightPath_FR(theme);110 }); 111 it('Test default message and button labels', async () => {112 await testDefaultLabels(theme);113 });114 it('Test default message and button labels - FR', async () => {115 await testDefaultLabels_FR(theme);116 });117 it('Launch the modal, test custom message/button labels but click cancel', async () => {118 await testCustomLabels(theme);119 await testCustomLabels_FR(theme);120 });121 it('Test link that will open in new window', async () => {122 await testTargetMsg(theme);123 await testTargetMsg_FR(theme);124 });125 it('Test link within same domain', async () => {126 await sameDomainLink(theme);127 await sameDomainLink_FR(theme);128 });129 it('Test link with exempt domain', async () => {130 await exemptDomainLink(theme);131 await exemptDomainLink_FR(theme);132 });133 it('Test display turned off', async () => {134 await displayOff(theme);135 await displayOff_FR(theme);136 });137 138 //To test if display is off for a link that opens in new window, uncomment below and run it manually139 /*it('Test display turned off for new window', async () => {140 await displayOffForNewWindow(theme);141 await displayOffForNewWindow_FR(theme);142 });*/143 it('Test exitscript turned off', async () => {144 await exitScriptNotEnabled(theme);145 await exitScriptNotEnabled_FR(theme);146 });147 it('Test no exit url', async () => {148 await noExitUrl(theme);149 await noExitUrl_FR(theme);150 });151 it('Test ExitScript pop up for menu links', async () => {152 await testExitScriptForMenuLinks(theme, 'en');153 await testExitScriptForMenuLinks(theme, 'fr');154 });155 it('Test backwards compatibility', async () => {156 await exitScriptBackwardsCompatible(theme, 'en');157 await exitScriptBackwardsCompatible(theme, 'fr');158 });159 it('Accessibility', async () => {160 await accessibility(theme, 'en');161 await accessibility(theme, 'fr');162 });163});164describe('ExitScript Tests - GCIntranet', () => {165 const theme = 'gcintranet';166 generateTestFile('./test/html/gcintranet/template-exitscript-en.html', 'gcintranet', 'gcintranet-exitscript-en', {167 refTop: '{"cdnEnv": "localhost"}',168 top: '{"cdnEnv": "localhost"}',169 preFooter: '{"cdnEnv": "localhost"}',170 footer: '{"cdnEnv": "localhost"}',171 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitURL": "exiturl-en.html", "exitMsg": "This is a custom message. You are about to leave a secure site, do you wish to continue?", "cancelMsg": "Nope", "yesMsg" : "Sure", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'172 });173 generateTestFile('./test/html/gcintranet/template-exitscript-fr.html', 'gcintranet', 'gcintranet-exitscript-fr', {174 refTop: '{"cdnEnv": "localhost"}',175 top: '{"cdnEnv": "localhost"}',176 preFooter: '{"cdnEnv": "localhost"}',177 footer: '{"cdnEnv": "localhost"}',178 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitURL": "exiturl-fr.html", "exitMsg": "Ceci est un message personnalisé. Vous êtes sur le point de quitter un site sécurisé, désirez-vous continuer?", "cancelMsg": "Arrêter", "yesMsg" : "Continuer", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'179 });180 181 generateTestFile('./test/html/gcintranet/template-exitscript-en.html', 'gcintranet', 'gcintranet-exitscript-nomenu-en', {182 refTop: '{"cdnEnv": "localhost"}',183 top: '{"cdnEnv": "localhost", "siteMenu": false}',184 preFooter: '{"cdnEnv": "localhost"}',185 footer: '{"cdnEnv": "localhost"}',186 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitURL": "exiturl-en.html", "exitMsg": "This is a custom message. You are about to leave a secure site, do you wish to continue?", "cancelMsg": "Nope", "yesMsg" : "Sure", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'187 });188 generateTestFile('./test/html/gcintranet/template-exitscript-fr.html', 'gcintranet', 'gcintranet-exitscript-nomenu-fr', {189 refTop: '{"cdnEnv": "localhost"}',190 top: '{"cdnEnv": "localhost", "siteMenu": false}',191 preFooter: '{"cdnEnv": "localhost"}',192 footer: '{"cdnEnv": "localhost"}',193 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitURL": "exiturl-fr.html", "exitMsg": "Ceci est un message personnalisé. Vous êtes sur le point de quitter un site sécurisé, désirez-vous continuer?", "cancelMsg": "Arrêter", "yesMsg" : "Continuer", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'194 });195 generateTestFile('./test/html/gcintranet/template-exitscript-en.html', 'gcintranet', 'gcintranet-exitscript-noCustomMsg-en', {196 refTop: '{"cdnEnv": "localhost"}',197 top: '{"cdnEnv": "localhost"}',198 preFooter: '{"cdnEnv": "localhost"}',199 footer: '{"cdnEnv": "localhost"}',200 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitURL": "exiturl-en.html", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'201 });202 generateTestFile('./test/html/gcintranet/template-exitscript-fr.html', 'gcintranet', 'gcintranet-exitscript-noCustomMsg-fr', {203 refTop: '{"cdnEnv": "localhost"}',204 top: '{"cdnEnv": "localhost"}',205 preFooter: '{"cdnEnv": "localhost"}',206 footer: '{"cdnEnv": "localhost"}',207 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitURL": "exiturl-fr.html", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'208 });209 generateTestFile('./test/html/gcintranet/template-exitscript-en.html', 'gcintranet', 'gcintranet-exitscript-noDisplay-en', {210 refTop: '{"cdnEnv": "localhost"}',211 top: '{"cdnEnv": "localhost"}',212 preFooter: '{"cdnEnv": "localhost"}',213 footer: '{"cdnEnv": "localhost"}',214 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": false, "exitURL": "exiturl-en.html", "exitMsg": "This is a custom message. You are about to leave a secure site, do you wish to continue?", "cancelMsg": "Nope", "yesMsg" : "Sure", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'215 });216 generateTestFile('./test/html/gcintranet/template-exitscript-fr.html', 'gcintranet', 'gcintranet-exitscript-noDisplay-fr', {217 refTop: '{"cdnEnv": "localhost"}',218 top: '{"cdnEnv": "localhost"}',219 preFooter: '{"cdnEnv": "localhost"}',220 footer: '{"cdnEnv": "localhost"}',221 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": false, "exitURL": "exiturl-fr.html", "exitMsg": "Ceci est un message personnalisé. Vous êtes sur le point de quitter un site sécurisé, désirez-vous continuer?", "cancelMsg": "Arrêter", "yesMsg" : "Continuer", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'222 });223 generateTestFile('./test/html/gcintranet/template-exitscript-en.html', 'gcintranet', 'gcintranet-exitscript-noDisplayNewWindow-en', {224 refTop: '{"cdnEnv": "localhost"}',225 top: '{"cdnEnv": "localhost"}',226 preFooter: '{"cdnEnv": "localhost"}',227 footer: '{"cdnEnv": "localhost"}',228 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "displayModalForNewWindow": false, "exitURL": "exiturl-en.html", "exitMsg": "This is a custom message. You are about to leave a secure site, do you wish to continue?", "cancelMsg": "Nope", "yesMsg" : "Sure", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'229 });230 generateTestFile('./test/html/gcintranet/template-exitscript-fr.html', 'gcintranet', 'gcintranet-exitscript-noDisplayNewWindow-fr', {231 refTop: '{"cdnEnv": "localhost"}',232 top: '{"cdnEnv": "localhost"}',233 preFooter: '{"cdnEnv": "localhost"}',234 footer: '{"cdnEnv": "localhost"}',235 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "displayModalForNewWindow": false, "exitURL": "exiturl-fr.html", "exitMsg": "Ceci est un message personnalisé. Vous êtes sur le point de quitter un site sécurisé, désirez-vous continuer?", "cancelMsg": "Arrêter", "yesMsg" : "Continuer", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'236 });237 generateTestFile('./test/html/gcintranet/template-exitscript-en.html', 'gcintranet', 'gcintranet-exitscript-disabled-en', {238 refTop: '{"cdnEnv": "localhost"}',239 top: '{"cdnEnv": "localhost"}',240 preFooter: '{"cdnEnv": "localhost"}',241 footer: '{"cdnEnv": "localhost"}',242 refFooter: '{"exitSecureSite" : {"exitScript": false, "displayModal": true, "exitURL": "exiturl-en.html", "exitMsg": "This is a custom message. You are about to leave a secure site, do you wish to continue?", "cancelMsg": "Nope", "yesMsg" : "Sure", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'243 });244 generateTestFile('./test/html/gcintranet/template-exitscript-fr.html', 'gcintranet', 'gcintranet-exitscript-disabled-fr', {245 refTop: '{"cdnEnv": "localhost"}',246 top: '{"cdnEnv": "localhost"}',247 preFooter: '{"cdnEnv": "localhost"}',248 footer: '{"cdnEnv": "localhost"}',249 refFooter: '{"exitSecureSite" : {"exitScript": false, "displayModal": true, "exitURL": "exiturl-fr.html", "exitMsg": "Ceci est un message personnalisé. Vous êtes sur le point de quitter un site sécurisé, désirez-vous continuer?", "cancelMsg": "Arrêter", "yesMsg" : "Continuer", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'250 });251 generateTestFile('./test/html/gcintranet/template-exitscript-en.html', 'gcintranet', 'gcintranet-exitscript-noExitUrl-en', {252 refTop: '{"cdnEnv": "localhost"}',253 top: '{"cdnEnv": "localhost"}',254 preFooter: '{"cdnEnv": "localhost"}',255 footer: '{"cdnEnv": "localhost"}',256 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitMsg": "This is a custom message. You are about to leave a secure site, do you wish to continue?", "cancelMsg": "Nope", "yesMsg" : "Sure", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'257 });258 generateTestFile('./test/html/gcintranet/template-exitscript-fr.html', 'gcintranet', 'gcintranet-exitscript-noExitUrl-fr', {259 refTop: '{"cdnEnv": "localhost"}',260 top: '{"cdnEnv": "localhost"}',261 preFooter: '{"cdnEnv": "localhost"}',262 footer: '{"cdnEnv": "localhost"}',263 refFooter: '{"exitSecureSite" : {"exitScript": true, "displayModal": true, "exitMsg": "Ceci est un message personnalisé. Vous êtes sur le point de quitter un site sécurisé, désirez-vous continuer?", "cancelMsg": "Arrêter", "yesMsg" : "Continuer", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca"}, "cdnEnv": "localhost"}'264 });265 generateTestFile('./test/html/gcintranet/template-exitscript-en.html', 'gcintranet', 'gcintranet-exitscript-parameters-en', {266 refTop: '{"cdnEnv": "localhost"}',267 top: '{"cdnEnv": "localhost"}',268 preFooter: '{"cdnEnv": "localhost"}',269 footer: '{"cdnEnv": "localhost"}',270 refFooter: '{"exitScript": true, "displayModal": true, "exitURL": "exiturl-en.html", "exitMsg": "This is a custom message. You are about to leave a secure site, do you wish to continue?", "cancelMsg": "Nope", "yesMsg" : "Sure", "targetWarning": "Warning: This will open in another window!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca", "cdnEnv": "localhost"}'271 });272 generateTestFile('./test/html/gcintranet/template-exitscript-fr.html', 'gcintranet', 'gcintranet-exitscript-parameters-fr', {273 refTop: '{"cdnEnv": "localhost"}',274 top: '{"cdnEnv": "localhost"}',275 preFooter: '{"cdnEnv": "localhost"}',276 footer: '{"cdnEnv": "localhost"}',277 refFooter: '{"exitScript": true, "displayModal": true, "exitURL": "exiturl-fr.html", "exitMsg": "Ceci est un message personnalisé. Vous êtes sur le point de quitter un site sécurisé, désirez-vous continuer?", "cancelMsg": "Arrêter", "yesMsg" : "Continuer", "targetWarning": "Attention: cela va s\'ouvrir dans une autre fenêtre!", "exitDomains" : "google.com, www.esdc.gc.ca, www.jobbank.gc.ca", "cdnEnv": "localhost"}'278 });279 it('Straight forward path of exit script', async () => {280 await straightPath(theme);281 await straightPath_FR(theme);282 }); 283 it('Test default message and button labels', async () => {284 await testDefaultLabels(theme);285 });286 it('Test default message and button labels - FR', async () => {287 await testDefaultLabels_FR(theme);288 });289 it('Launch the modal, test custom message/button labels but click cancel', async () => {290 await testCustomLabels(theme);291 await testCustomLabels_FR(theme);292 });293 it('Test link that will open in new window', async () => {294 await testTargetMsg(theme);295 await testTargetMsg_FR(theme);296 });297 it('Test link within same domain', async () => {298 await sameDomainLink(theme);299 await sameDomainLink_FR(theme);300 });301 it('Test link with exempt domain', async () => {302 await exemptDomainLink(theme);303 await exemptDomainLink_FR(theme);304 });305 it('Test display turned off', async () => {306 await displayOff(theme);307 await displayOff_FR(theme);;308 });309 310 //To test if display is off for a link that opens in new window, uncomment below and run it manually311 /*it('Test display turned off for new window', async () => {312 await displayOffForNewWindow(theme);313 await displayOffForNewWindow_FR(theme);314 });*/315 it('Test exitscript turned off', async () => {316 await exitScriptNotEnabled(theme);317 await exitScriptNotEnabled_FR(theme);318 });319 it('Test no exit url', async () => {320 await noExitUrl(theme);321 await noExitUrl_FR(theme);322 });323 it('Test ExitScript pop up for menu links', async () => {324 await testExitScriptForMenuLinksGCIntranet(theme, 'en');325 await testExitScriptForMenuLinksGCIntranet(theme, 'fr');326 });327 it('Test backwards compatibility', async () => {328 await exitScriptBackwardsCompatible(theme, 'en');329 await exitScriptBackwardsCompatible(theme, 'fr');330 });331 it('Accessibility', async () => {332 await accessibility(theme, 'en', 'nomenu');333 await accessibility(theme, 'fr', 'nomenu');334 });335});336async function straightPath(theme){337 await exitScriptPage.open(theme, 'en');338 const extLink = await exitScriptPage.extLink;339 await extLink.waitUntil(async () => {340 const extLinkClass = await extLink.getAttribute('class');341 return extLinkClass === 'wb-exitscript';342 }, {343 timeout: 5000, 344 timeoutMsg: 'Expected class to be wb-exitscript after 5s'345 });346 347 await extLink.click();348 const yesBtn = await exitScriptPage.yesBtn;349 await yesBtn.waitForExist({timeout: 3000})350 await yesBtn.click();351 await expect(browser).toHaveUrlContaining('targetUrl');352}353async function testCustomLabels(theme){354 await exitScriptPage.open(theme, 'en');355 const extLink = await exitScriptPage.extLink;356 await extLink.waitUntil(async () => {357 const extLinkClass = await extLink.getAttribute('class');358 return extLinkClass === 'wb-exitscript';359 }, {360 timeout: 5000, 361 timeoutMsg: 'Expected class to be wb-exitscript after 5s'362 });363 await extLink.click();364 await (await exitScriptPage.modalText).waitForExist({timeout: 3000})365 await expect(exitScriptPage.modalText).toHaveTextContaining('This is a custom message');366 await expect(exitScriptPage.modalYesBtn).toHaveTextContaining('Sure');367 await expect(exitScriptPage.modalCancelBtn).toHaveTextContaining('Nope');368 const cancelBtn = await exitScriptPage.modalCancelBtn;369 await cancelBtn.click();370 await (await exitScriptPage.pageTitle).waitForExist({timeout: 3000})371 await expect(exitScriptPage.pageTitle).toHaveTextContaining('Leaving a secure site');372}373async function testTargetMsg(theme){374 await exitScriptPage.open(theme, 'en');375 const extLink = await exitScriptPage.extLinkNewWin;376 await extLink.waitUntil(async () => {377 const extLinkClass = await extLink.getAttribute('class');378 return extLinkClass === 'wb-exitscript';379 }, {380 timeout: 5000, 381 timeoutMsg: 'Expected class to be wb-exitscript after 5s'382 });383 await extLink.click();384 await (await exitScriptPage.modalText).waitForExist({timeout: 3000})385 await expect(exitScriptPage.modalText).toHaveTextContaining('Warning: This will open in another window!');386}387async function sameDomainLink(theme){388 await exitScriptPage.open(theme, 'en');389 const extLink = await exitScriptPage.extLinkSameDomain;390 await extLink.click();391 await expect(browser).toHaveUrlContaining('breadcrumbs-en');392}393async function exemptDomainLink(theme){394 await exitScriptPage.open(theme, 'en');395 const extLink = await exitScriptPage.extLinkExemptDomain;396 await extLink.click();397 await expect(browser).toHaveUrlContaining('google');398}399async function displayOff(theme){400 await exitScriptPage.open(theme, 'en', 'noDisplay');401 const extLink = await exitScriptPage.extLink;402 await extLink.waitUntil(async () => {403 const extLinkHref = await extLink.getAttribute('href');404 return extLinkHref === 'exiturl-en.html?targetUrl=https%3A%2F%2Fwww.google.ca%2F';405 }, {406 timeout: 5000, 407 timeoutMsg: 'Expected href to be modified after 5s'408 });409 await extLink.click();410 await expect(browser).toHaveUrlContaining('exiturl-en');411}412async function displayOffForNewWindow(theme){413 await exitScriptPage.open(theme, 'en', 'noDisplayNewWindow');414 const extLink = await exitScriptPage.extLinkNewWin;415 await extLink.click();416 await expect(browser).toHaveUrlContaining('noDisplayNewWindow');417}418async function exitScriptNotEnabled(theme){419 await exitScriptPage.open(theme, 'en', 'disabled');420 const extLink = await exitScriptPage.extLink;421 await extLink.click();422 await expect(browser).toHaveUrlContaining('google');423}424async function testDefaultLabels(theme){425 await exitScriptPage.open(theme, 'en', 'noCustomMsg');426 const extLink = await exitScriptPage.extLink;427 await extLink.waitUntil(async () => {428 const extLinkClass = await extLink.getAttribute('class');429 return extLinkClass === 'wb-exitscript';430 }, {431 timeout: 5000, 432 timeoutMsg: 'Expected class to be wb-exitscript after 5s'433 });434 await extLink.click();435 await (await exitScriptPage.modalText).waitForExist({timeout: 3000})436 await expect(exitScriptPage.modalText).toHaveTextContaining('You are about to leave a secure site');437 await expect(exitScriptPage.modalYesBtn).toHaveTextContaining('Yes');438 await expect(exitScriptPage.modalCancelBtn).toHaveTextContaining('Cancel');439 const btnPrimary = await exitScriptPage.modalCancelBtn;440 await btnPrimary.click()441}442async function noExitUrl(theme){443 await exitScriptPage.open(theme, 'en', 'noExitUrl');444 const extLink = await exitScriptPage.extLink;445 await extLink.waitUntil(async () => {446 const extLinkClass = await extLink.getAttribute('class');447 return extLinkClass === 'wb-exitscript';448 }, {449 timeout: 5000, 450 timeoutMsg: 'Expected class to be wb-exitscript after 5s'451 });452 await extLink.click();453 const yesBtn = await exitScriptPage.yesBtn;454 await yesBtn.waitForExist({timeout: 3000})455 await yesBtn.click();456 await expect(browser).toHaveUrlContaining('google');457}458async function testExitScriptForMenuLinks(theme, lang){459 await exitScriptPage.open(theme, lang);460 const menuBtn = await exitScriptPage.menuBtn;461 const menuTrainingLink = await exitScriptPage.menuTrainingLink;462 await menuTrainingLink.waitUntil(async () => {463 const extLinkClass = await menuTrainingLink.getAttribute('class');464 return extLinkClass === 'wb-exitscript';465 }, {466 timeout: 5000, 467 timeoutMsg: 'Expected class to be wb-exitscript after 5s'468 });469 await menuBtn.click();470 await menuTrainingLink.click();471 await (await exitScriptPage.exitScriptModal).waitForExist({timeout: 3000})472 //await expect(exitScriptPage.exitScriptModal).toExist(); 473}474async function testExitScriptForMenuLinksGCIntranet(theme, lang){475 await exitScriptPage.open(theme, lang);476 const menuNewsLink = (lang === 'en') ? await exitScriptPage.menuNewsLink : await exitScriptPage.menuNewsLinkFR;477 const menuBtn = await exitScriptPage.menuBtnGCIntranet;478 await menuNewsLink.waitUntil(async () => {479 const extLinkClass = await menuNewsLink.getAttribute('class');480 return extLinkClass === 'wb-exitscript';481 }, {482 timeout: 5000, 483 timeoutMsg: 'Expected class to be wb-exitscript after 5s'484 });485 await menuBtn.click();486 await menuNewsLink.click();487 await (await exitScriptPage.exitScriptModal).waitForExist({timeout: 3000})488 //await expect(exitScriptPage.exitScriptModal).toExist(); 489}490async function exitScriptBackwardsCompatible(theme, lang){491 await exitScriptPage.open(theme, lang, 'parameters');492 const extLink = await exitScriptPage.extLink;493 await extLink.waitUntil(async () => {494 const extLinkClass = await extLink.getAttribute('class');495 return extLinkClass === 'wb-exitscript';496 }, {497 timeout: 5000, 498 timeoutMsg: 'Expected class to be wb-exitscript after 5s'499 });500 await extLink.click();501 const yesBtn = await exitScriptPage.yesBtn;502 await yesBtn.waitForExist({timeout: 3000});503 504 if (lang === 'en') {505 await expect(exitScriptPage.modalText).toHaveTextContaining('This is a custom message');506 await expect(exitScriptPage.modalYesBtn).toHaveTextContaining('Sure');507 await expect(exitScriptPage.modalCancelBtn).toHaveTextContaining('Nope');508 } else {509 await expect(exitScriptPage.modalText).toHaveTextContaining('Ceci est un message personnalisé');510 await expect(exitScriptPage.modalYesBtn).toHaveTextContaining('Continuer');511 await expect(exitScriptPage.modalCancelBtn).toHaveTextContaining('Arrêter');512 }513 514 await yesBtn.click();515 await expect(browser).toHaveUrlContaining('targetUrl');516}517//French518async function straightPath_FR(theme){519 await exitScriptPage.open(theme, 'fr');520 const extLink = await exitScriptPage.extLink;521 await extLink.waitUntil(async () => {522 const extLinkClass = await extLink.getAttribute('class');523 return extLinkClass === 'wb-exitscript';524 }, {525 timeout: 5000, 526 timeoutMsg: 'Expected class to be wb-exitscript after 5s'527 });528 await extLink.click();529 const yesBtn = await exitScriptPage.yesBtn;530 await yesBtn.waitForExist({timeout: 3000})531 await yesBtn.click();532 await expect(browser).toHaveUrlContaining('targetUrl');533}534async function testCustomLabels_FR(theme){535 await exitScriptPage.open(theme, 'fr');536 const extLink = await exitScriptPage.extLink;537 await extLink.waitUntil(async () => {538 const extLinkClass = await extLink.getAttribute('class');539 return extLinkClass === 'wb-exitscript';540 }, {541 timeout: 5000, 542 timeoutMsg: 'Expected class to be wb-exitscript after 5s'543 });544 await extLink.click();545 await (await exitScriptPage.modalText).waitForExist({timeout: 3000})546 await expect(exitScriptPage.modalText).toHaveTextContaining('Ceci est un message personnalisé');547 await expect(exitScriptPage.modalYesBtn).toHaveTextContaining('Continuer');548 await expect(exitScriptPage.modalCancelBtn).toHaveTextContaining('Arrêter');549 const cancelBtn = await exitScriptPage.modalCancelBtn;550 await cancelBtn.waitForExist({timeout: 3000})551 await cancelBtn.click();552 await (await exitScriptPage.pageTitle).waitForExist({timeout: 3000})553 await expect(exitScriptPage.pageTitle).toHaveTextContaining('Quitter un site sécurisé');554}555async function testTargetMsg_FR(theme){556 await exitScriptPage.open(theme, 'fr');557 const extLink = await exitScriptPage.extLinkNewWin;558 await extLink.waitUntil(async () => {559 const extLinkClass = await extLink.getAttribute('class');560 return extLinkClass === 'wb-exitscript';561 }, {562 timeout: 5000, 563 timeoutMsg: 'Expected class to be wb-exitscript after 5s'564 });565 await extLink.click();566 await (await exitScriptPage.modalText).waitForExist({timeout: 3000})567 await expect(exitScriptPage.modalText).toHaveTextContaining(`Attention: cela va s'ouvrir dans une autre fenêtre`);568}569async function sameDomainLink_FR(theme){570 await exitScriptPage.open(theme, 'fr');571 const extLink = await exitScriptPage.extLinkSameDomain;572 await extLink.click();573 await expect(browser).toHaveUrlContaining('breadcrumbs-fr');574}575async function exemptDomainLink_FR(theme){576 await exitScriptPage.open(theme, 'fr');577 const extLink = await exitScriptPage.extLinkExemptDomain;578 await extLink.click();579 await expect(browser).toHaveUrlContaining('google');580}581async function displayOff_FR(theme){582 await exitScriptPage.open(theme, 'fr', 'noDisplay');583 const extLink = await exitScriptPage.extLink;584 await extLink.waitUntil(async () => {585 const extLinkHref = await extLink.getAttribute('href');586 return extLinkHref === 'exiturl-fr.html?targetUrl=https%3A%2F%2Fwww.google.ca%2F';587 }, {588 timeout: 5000, 589 timeoutMsg: 'Expected href to be modified after 5s'590 });591 592 await extLink.click();593 await expect(browser).toHaveUrlContaining('exiturl-fr');594}595async function displayOffForNewWindow_FR(theme){596 await exitScriptPage.open(theme, 'fr', 'noDisplayNewWindow');597 const extLink = await exitScriptPage.extLinkNewWin;598 await extLink.click();599 await expect(browser).toHaveUrlContaining('noDisplayNewWindow');600}601async function exitScriptNotEnabled_FR(theme){602 await exitScriptPage.open(theme, 'fr', 'disabled');603 const extLink = await exitScriptPage.extLink;604 await extLink.click();605 await expect(browser).toHaveUrlContaining('google');606}607async function testDefaultLabels_FR(theme){608 await exitScriptPage.open(theme, 'fr', 'noCustomMsg');609 const extLink = await exitScriptPage.extLink;610 await extLink.waitUntil(async () => {611 const extLinkClass = await extLink.getAttribute('class');612 return extLinkClass === 'wb-exitscript';613 }, {614 timeout: 5000, 615 timeoutMsg: 'Expected class to be wb-exitscript after 5s'616 });617 618 await extLink.click();619 await (await exitScriptPage.modalText).waitForExist({timeout: 3000})620 await expect(exitScriptPage.modalText).toHaveTextContaining('Vous êtes sur le point de quitter un site sécurisé');621 await expect(exitScriptPage.modalYesBtn).toHaveTextContaining('Oui');622 await expect(exitScriptPage.modalCancelBtn).toHaveTextContaining('Annuler');623 const cancelBtn = await exitScriptPage.modalCancelBtn;624 await cancelBtn.click();625}626async function noExitUrl_FR(theme){627 await exitScriptPage.open(theme, 'fr', 'noExitUrl');628 const extLink = await exitScriptPage.extLink;629 await extLink.waitUntil(async () => {630 const extLinkClass = await extLink.getAttribute('class');631 return extLinkClass === 'wb-exitscript';632 }, {633 timeout: 5000, 634 timeoutMsg: 'Expected class to be wb-exitscript after 5s'635 });636 await extLink.click();637 const yesBtn = await exitScriptPage.yesBtn;638 await yesBtn.waitForExist({timeout: 3000})639 await yesBtn.click();640 await expect(browser).toHaveUrlContaining('google');641}642async function accessibility(theme, lang, variant) {643 await exitScriptPage.open(theme, lang, variant);644 await runAccessbilityTest();...
server.js
Source:server.js
1const url = require('url');2const session = require('./utils/server.session');3const http = require('http');4const forwardHttp = require('./utils/server.forwardHttp');5const { resolve: resolvePenddingRequest } = require('./utils/server.penddingRequest');6const socketIO = require('socket.io');7const md5 = require('md5');8module.exports = config => {9 const token = md5(config.token);10 11 const server = http.createServer(forwardHttp);12 const io = socketIO(server, { path: config.path, serveClient: false });13 server.listen({ host: config.listen, port: config.port }, () => {14 console.log(`app run at : http://${config.listen}:${config.port}`);15 });16 io.use((socket, next) => {17 // socket ååéªè¯18 const { hostname } = url.parse(`ws://${socket.handshake.headers.host}`);19 if (config.parked && hostname !== config.parked) {20 return next(new Error('invalid domain'));21 }22 // token éªè¯23 if (socket.handshake.query.token !== token) {24 return next(new Error('authentication error'));25 }26 return next();27 });28 io.on('connection', socket => {29 console.log('client connected');30 const domains = socket.handshake.query.domains.split(',');31 const servedDomains = session.getDomains();32 let exitDomains = [];33 // ååæ¥é34 domains.forEach(domain => {35 if (servedDomains.includes(domain)) {36 exitDomains.push(domain);37 }38 });39 if (exitDomains.length) {40 socket.emit('info', `domain ${exitDomains.join(', ')} exited.`);41 socket.disconnect(true);42 return;43 }44 // æ·»å ä¼è¯45 session.addSession({46 socket,47 domains48 });49 // 客æ·ç«¯ååºæ¶åå¤è¯·æ±50 socket.on('client response', resolvePenddingRequest);51 // æå¼è¿æ¥å é¤ä¼è¯52 socket.on('disconnect', reason => {53 console.log('client disconnected');54 session.removeSession(socket.id);55 });56 });...
Gulpfile.js
Source:Gulpfile.js
...40}41async function createExampleReporter () {42 // HACK: We have to exit from all Gulp's error domains to avoid conflicts43 // with error handling inside yeoman-test helpers.44 const domains = exitDomains();45 const { createReporter } = require('./test/util');46 await createReporter();47 enterDomains(domains);48}49function testExample () {50 return spawn('npx gulp generateTestData && npx gulp test', { stdio: 'inherit', shell: true });51}52exports.lint = lint;53exports.testContent = testContent;54exports.testExample = gulp.series(createExampleReporter, testExample);...
domain.js
Source:domain.js
1function exitDomains () {2 const domains = [];3 while (process.domain) {4 domains.push(process.domain);5 process.domain.exit();6 }7 return domains;8}9function enterDomains (domains) {10 let domain = domains.pop();11 while (domain) {12 domain.enter();13 domain = domains.pop();14 }15}16module.exports = {17 exitDomains: exitDomains,18 enterDomains: enterDomains...
Using AI Code Generation
1import { Selector } from 'testcafe';2test('My first test', async t => {3 .typeText('#developer-name', 'John Smith')4 .click('#submit-button')5 .wait(5000);6});7import { Selector } from 'testcafe';8test('My first test', async t => {9 .typeText('#developer-name', 'John Smith')10 .click('#submit-button')11 .wait(5000);12});13import { Selector } from 'testcafe';14test('My first test', async t => {15 .typeText('#developer-name', 'John Smith')16 .click('#submit-button')17 .wait(5000);18});19import { Selector } from 'testcafe';20test('My first test', async t => {21 .typeText('#developer-name', 'John Smith')22 .click('#submit-button')23 .wait(5000);24});25import { Selector } from 'testcafe';26test('My first test', async t => {27 .typeText('#developer-name', 'John Smith')28 .click('#submit-button')29 .wait(5000);30});31import { Selector } from 'testcafe';32test('My first test', async t => {33 .typeText('#developer-name', 'John Smith')34 .click('#submit-button')35 .wait(5000);36});
Using AI Code Generation
1import { exitDomains } from 'testcafe-hammerhead';2test('My Test', async t => {3 .typeText('#developer-name', 'John Smith')4 .click('#submit-button');5 await exitDomains(['localhost']);6});7module.exports = {8};9{10 "scripts": {11 },12 "devDependencies": {13 }14}
Using AI Code Generation
1import { Selector } from 'testcafe';2import exitDomains from 'testcafe-exit-domains';3test('My Test', async t => {4 .typeText('#developer-name', 'John Smith')5 .click('#submit-button')6 .expect(Selector('#article-header').innerText).eql('Thank you, John Smith!');7});
Using AI Code Generation
1import { exitDomains } from 'testcafe-hammerhead';2test('My test', async t => {3 .click('#myElement')4 .expect(Selector('#myElement').innerText).eql('Hello world!');5});6exitDomains('www.example.com');7import { exitDomains } from 'testcafe-hammerhead';8test('My test', async t => {9 .click('#myElement')10 .expect(Selector('#myElement').innerText).eql('Hello world!');11});12exitDomains('www.example.com');
Using AI Code Generation
1import { exitDomains } from 'testcafe-browser-tools';2test('My first test', async t => {3 .click('#selector')4 .typeText('#developer-name', 'John Smith')5 .click('#submit-button');6 const location = await t.eval(() => window.location);7 await exitDomains(location.hostname);8});
Using AI Code Generation
1import { exitDomains } from 'testcafe-browser-tools';2test('test', async t => {3 .expect(true).ok();4 await exitDomains(['example.com']);5 .expect(true).ok();6});
Using AI Code Generation
1const createTestCafe = require('testcafe');2let testcafe = null;3createTestCafe('localhost', 1337, 1338)4 .then(tc => {5 testcafe = tc;6 const runner = testcafe.createRunner();7 .src('test.js')8 .browsers('chrome')9 .run();10 })11 .then(failedCount => {12 console.log('Tests failed: ' + failedCount);13 testcafe.close();14 });15const createTestCafe = require('testcafe');16let testcafe = null;17createTestCafe('localhost', 1337, 1338)18 .then(tc => {19 testcafe = tc;20 const runner = testcafe.createRunner();21 .src('test.js')22 .browsers('chrome')23 .run();24 })25 .then(failedCount => {26 console.log('Tests failed: ' + failedCount);27 testcafe.close();28 });29const createTestCafe = require('testcafe');30let testcafe = null;31createTestCafe('localhost', 1337, 1338)32 .then(tc => {33 testcafe = tc;34 const runner = testcafe.createRunner();35 .src('test.js')36 .browsers('chrome')37 .run();38 })39 .then(failedCount => {40 console.log('Tests failed: ' + failedCount);41 testcafe.close();42 });43const createTestCafe = require('testcafe');44let testcafe = null;45createTestCafe('localhost', 1337, 1338)46 .then(tc => {47 testcafe = tc;48 const runner = testcafe.createRunner();49 .src('test.js')50 .browsers('
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!