Merge branch 'develop' into feature/Digital/SSR-139_merge

This commit is contained in:
Jeremy Zimmerman 2022-12-07 16:33:58 -05:00
commit 01436e0e83
8 changed files with 70 additions and 13 deletions

View file

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 30 14" viewBox="0 0 30 14">
<path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#fff"/>
<path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#06f"/>
<path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" style="fill:#fff"/>
<path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" style="fill:#06f"/>
</svg>

After

Width:  |  Height:  |  Size: 865 B

View file

Before

Width:  |  Height:  |  Size: 650 B

After

Width:  |  Height:  |  Size: 650 B

View file

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 446 B

View file

@ -1,4 +1,4 @@
import { shallowMount } from "@vue/test-utils";
import { mount, shallowMount } from "@vue/test-utils";
import menuModal from "./menu-modal";
describe("menu-modal.vue", () => {
@ -32,12 +32,28 @@ describe("menu-modal.vue", () => {
expect(wrapper.html()).toContain("Terms of use");
});
it("Should return Privacy policy text link text", async () => {
it('Should return "Your privacy choices" text link text', async () => {
// Act
const wrapper = shallowMount(menuModal);
const wrapper = mount(menuModal);
// Expect
expect(wrapper.html()).toContain("Privacy policy");
expect(wrapper.html()).toContain("Your privacy choices");
});
test('Icon for link to "Privacy Policies" page is displayed with the correct alternate text', () => {
// NOTE: We need a way to target a specific <textLink> component so we can be sure that
// an icon is coming from a specific <textLink> component.
// That requires an additional prop in the <textLink> component. Will hold off on adding the prop
// until there is more clarity on how we handle shared components.
// For now the test is below is the best we can do.
// Arrange
const wrapper = mount(menuModal);
// Expect
const icon = wrapper.find('[data-id="ccpa-icon"]');
expect(icon.isVisible()).toBe(true);
expect(icon.attributes('alt')).toBe('Your privacy choices');
});
it("Should returnDo not sell my information text link text", async () => {

View file

@ -28,7 +28,21 @@
</div>
<div class="modal-body d-flex flex-column">
<textLink linkType="navigation" text="Terms of use" href="https://www.safelite.com/terms-of-use" target="_blank" />
<textLink linkType="navigation" text="Privacy policy" href="https://www.safelite.com/safelite-group-privacy-policy" target="_blank" />
<textLink
linkType="navigation"
text="Your privacy choices"
href="//www.safelite.com/privacy-center"
target="_blank"
>
<template v-slot:after-text>
<img
class="ccpa-icon"
src="~@/assets/img/icons/ccpa-icon.svg"
alt="Your privacy choices"
data-id="ccpa-icon"
/>
</template>
</textLink>
<textLink linkType="navigation" text="Do not sell my information" href="https://privacyportal-cdn.onetrust.com/dsarwebform/d3b95a93-e22e-4d4d-a806-482052406557/9e371601-eae3-4338-9430-b90b9036022b.html" target="_blank" />
</div>
<div class="modal-footer d-flex justify-content-start">
@ -118,6 +132,11 @@
overflow-y: visible;
.modal-body {
padding: 2rem;
.ccpa-icon {
width: 2.0625rem;
height: 1rem;
margin-left: 0.5rem;
}
}
.modal-fullscreen {
width: 100vw;
@ -175,4 +194,3 @@
}
}
</style>

View file

@ -145,7 +145,7 @@ export default {
}
input {
&.has-icon {
background-image: url(~@/assets/icons/location-pin.svg);
background-image: url(~@/assets/img/icons/location-pin.svg);
background-repeat: no-repeat;
background-position: .75rem 50%;
background-size: 1rem auto;

View file

@ -42,7 +42,7 @@ export default {
//Spinner basics
&:after {
content: "";
mask: url(../../assets/icons/spinner.svg);
mask: url(../../assets/img/icons/spinner.svg);
mask-size: cover;
position: relative;
width: 1rem;

View file

@ -1,9 +1,24 @@
<template>
<a v-if="linkType === 'navigation'" @click="handleClick" class="navigation-link" :href="href">{{text}}</a>
<a v-else-if="linkType === 'footer'" @click="handleClick" class="footer-link" :href="href" target="_blank">{{text}}</a>
<a v-else-if="linkType === 'textSmall'" @click="handleClick" class="small" :href="href">{{text}}</a>
<a v-else-if="linkType === 'dashedUnderline'" @click="handleClick" class="dashed-underline" :href="href">{{text}}</a>
<a v-else-if="linkType === 'text'" @click="handleClick" :href="href">{{text}}</a>
<a v-if="linkType === 'navigation'" @click="handleClick" class="navigation-link" :href="href">
{{text}}
<slot name="after-text"></slot>
</a>
<a v-else-if="linkType === 'footer'" @click="handleClick" class="footer-link" :href="href" target="_blank">
{{text}}
<slot name="after-text"></slot>
</a>
<a v-else-if="linkType === 'textSmall'" @click="handleClick" class="small" :href="href">
{{text}}
<slot name="after-text"></slot>
</a>
<a v-else-if="linkType === 'dashedUnderline'" @click="handleClick" class="dashed-underline" :href="href">
{{text}}
<slot name="after-text"></slot>
</a>
<a v-else-if="linkType === 'text'" @click="handleClick" :href="href">
{{text}}
<slot name="after-text"></slot>
</a>
</template>
<script>
@ -32,6 +47,7 @@
line-height: 26px;
padding: 0 0 4px 0;
font-weight: 500;
max-width: fit-content;
&:hover {
color: $blue-700;
}
@ -45,6 +61,7 @@
color: $black;
line-height: 26px;
white-space: nowrap;
align-items: center;
}
&.footer-link {
color: $gray-600;