Merge branch 'develop' into feature/Digital/SSR-51
This commit is contained in:
commit
05844d2500
9 changed files with 49 additions and 17 deletions
|
|
@ -82,5 +82,8 @@ stages:
|
||||||
appDeployVariables:
|
appDeployVariables:
|
||||||
__VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__)
|
__VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__)
|
||||||
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
|
__VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__)
|
||||||
|
indexDeployVariables:
|
||||||
|
__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__)
|
||||||
|
__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__)
|
||||||
cfDistributionId: $(cfDistributionId)
|
cfDistributionId: $(cfDistributionId)
|
||||||
|
|
||||||
6
package-lock.json
generated
6
package-lock.json
generated
|
|
@ -3571,9 +3571,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"bootstrap": {
|
"bootstrap": {
|
||||||
"version": "5.2.1",
|
"version": "5.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.2.tgz",
|
||||||
"integrity": "sha512-UQi3v2NpVPEi1n35dmRRzBJFlgvWHYwyem6yHhuT6afYF+sziEt46McRbT//kVXZ7b1YUYEVGdXEH74Nx3xzGA=="
|
"integrity": "sha512-dEtzMTV71n6Fhmbg4fYJzQsw1N29hJKO1js5ackCgIpDcGid2ETMGC6zwSYw09v05Y+oRdQ9loC54zB1La3hHQ=="
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@popperjs/core": "^2.10.2",
|
"@popperjs/core": "^2.10.2",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"bootstrap": "^5.1.1",
|
"bootstrap": "^5.2.2",
|
||||||
"jest-junit": "^13.0.0",
|
"jest-junit": "^13.0.0",
|
||||||
"maska": "^1.5.0",
|
"maska": "^1.5.0",
|
||||||
"pinia": "^2.0.22",
|
"pinia": "^2.0.22",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="">
|
<html lang="">
|
||||||
<head>
|
<head>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = [{}];
|
||||||
|
</script>
|
||||||
|
<script><%= process.env.VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY %></script>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
|
@ -8,6 +12,12 @@
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<!-- Google Tag Manager -->
|
||||||
|
<noscript>
|
||||||
|
<iframe src="<%= process.env.VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC %>"
|
||||||
|
height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
||||||
|
</noscript>
|
||||||
|
|
||||||
<noscript>
|
<noscript>
|
||||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,14 @@ import { shallowMount } from "@vue/test-utils";
|
||||||
|
|
||||||
describe("site sub header", () => {
|
describe("site sub header", () => {
|
||||||
|
|
||||||
const subHeaderText = "<p>let's fix your glass</p>";
|
const subHeaderText = "let's fix your glass";
|
||||||
const mockMixin = {
|
const mockMixin = {
|
||||||
methods: {
|
methods: {
|
||||||
getCmsContent: jest.fn().mockImplementation(()=> {
|
getCmsContent: jest.fn().mockImplementation(()=> {
|
||||||
return subHeaderText;
|
return subHeaderText;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
it("should contain the cms content", () => {
|
it("should contain the cms content", () => {
|
||||||
const wrapper = shallowMount(siteSubHeader, {
|
const wrapper = shallowMount(siteSubHeader, {
|
||||||
|
|
@ -18,10 +18,9 @@ describe("site sub header", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
wrapper.getCmsContent = jest.fn();
|
wrapper.getCmsContent = jest.fn();
|
||||||
const actual = wrapper.find("p");
|
const actual = wrapper.find("span");
|
||||||
|
expect(actual.html()).toContain(subHeaderText);
|
||||||
expect(actual.html()).toBe(subHeaderText);
|
});
|
||||||
})
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div id="subHeader" v-html="content"></div>
|
<div class="d-flex align-items-center justify-content-center container-fluid overflow-hidden">
|
||||||
|
<h5 class="text-center fw-normal mb-0" >
|
||||||
|
<span>
|
||||||
|
{{ content }}
|
||||||
|
</span>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default ({
|
export default ({
|
||||||
|
|
@ -19,9 +25,13 @@
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
#subHeader{
|
h5 {
|
||||||
margin: 16px auto;
|
line-height: 32px;
|
||||||
text-align: center;
|
|
||||||
}
|
button {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -11,7 +11,7 @@ const routes = [
|
||||||
async beforeEnter(to, from, next) {
|
async beforeEnter(to, from, next) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
to.query.issPage = !to.query.issPage ? issPageValues.WELCOME_PAGE : to.query.issPage;
|
to.query.issPage = !to.query.issPage ? issPageValues.VEHICLE_YEAR : to.query.issPage;
|
||||||
|
|
||||||
if (router.hasRoute(to.query.issPage)) {
|
if (router.hasRoute(to.query.issPage)) {
|
||||||
return next({ name: to.query.issPage, query: to.query, params: to.params });
|
return next({ name: to.query.issPage, query: to.query, params: to.params });
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,12 @@
|
||||||
process.env.VUE_APP_CONSUMER_CF_DISTRO ="https://digitalapi.dev.safelite.io";
|
process.env.VUE_APP_CONSUMER_CF_DISTRO ="https://digitalapi.dev.safelite.io";
|
||||||
process.env.VUE_APP_CURRENT_ENVIRONMENT = "Localhost";
|
process.env.VUE_APP_CURRENT_ENVIRONMENT = "Localhost";
|
||||||
|
|
||||||
|
|
||||||
|
// GA & GTM
|
||||||
|
// NOTE: Using the old ISS site GTM Cotnainer ID for now, will create a new one soon.
|
||||||
|
process.env.VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY = "(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-KKNWZ3');";
|
||||||
|
process.env.VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC = "https://www.googletagmanager.com/ns.html?id=GTM-KKNWZ3>m_auth=amlAYNhxUxuskQo7jmjadg>m_preview=env-38>m_cookies_win=x";
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
publicPath: "/",
|
publicPath: "/",
|
||||||
css: {
|
css: {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
process.env.VUE_APP_CONSUMER_CF_DISTRO = "__VUE_APP_CONSUMER_CF_DISTRO__";
|
process.env.VUE_APP_CONSUMER_CF_DISTRO = "__VUE_APP_CONSUMER_CF_DISTRO__";
|
||||||
process.env.VUE_APP_CURRENT_ENVIRONMENT = "__VUE_APP_CURRENT_ENVIRONMENT__";
|
process.env.VUE_APP_CURRENT_ENVIRONMENT = "__VUE_APP_CURRENT_ENVIRONMENT__";
|
||||||
|
|
||||||
|
// GA & GTM
|
||||||
|
process.env.VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY = "__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__";
|
||||||
|
process.env.VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC = "__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__"
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
publicPath: "/",
|
publicPath: "/",
|
||||||
css: {
|
css: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue