web/storagenode: fix use of v-html

Change-Id: I0ebbefc7b562c712dd30158c6c688aa0c524abac
This commit is contained in:
Egon Elbre 2021-08-23 12:32:02 +03:00
parent b7555980c4
commit 6f2258d870
12 changed files with 39 additions and 47 deletions

View File

@ -36,8 +36,6 @@ module.exports = {
"vue/max-attributes-per-line": ["off"],
"vue/singleline-html-element-content-newline": ["off"],
"vue/no-v-html": ["off"], // needs a dedicated fix
"vue/block-lang": ["error", {"script": {"lang": "ts"}}],
"vue/html-button-has-type": ["error"],
"vue/no-unused-properties": ["warn"],

View File

@ -8,7 +8,9 @@
<span v-if="!notification.isRead" class="notification-item__new-indicator-container__circle" />
</div>
<div class="notification-item__icon-container">
<div class="icon" v-html="notification.icon" />
<div class="icon">
<component :is="notification.icon" />
</div>
</div>
<div class="notification-item__text-container">
<p

View File

@ -1,9 +1,15 @@
// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
import { NotificationIcon } from '@/app/utils/notificationIcons';
import Vue, {VueConstructor} from 'vue';
import { Notification, NotificationTypes } from '@/storagenode/notifications/notifications';
import DisqualificationIcon from "@/../static/images/notifications/disqualified.svg";
import FailIcon from "@/../static/images/notifications/fail.svg";
import InfoIcon from "@/../static/images/notifications/info.svg";
import SuspendedIcon from "@/../static/images/notifications/suspended.svg";
/**
* Holds all notifications module state.
*/
@ -21,7 +27,6 @@ export class NotificationsState {
* Describes notification entity.
*/
export class UINotification {
public icon: NotificationIcon;
public isRead: boolean;
public id: string;
public senderId: string;
@ -33,7 +38,6 @@ export class UINotification {
public constructor(notification: Partial<UINotification> = new Notification()) {
Object.assign(this, notification);
this.setIcon();
this.isRead = !!this.readAt;
}
@ -67,19 +71,16 @@ export class UINotification {
/**
* setIcon selects notification icon depends on type.
*/
private setIcon(): void {
public get icon(): VueConstructor<Vue> {
switch (this.type) {
case NotificationTypes.AuditCheckFailure:
this.icon = NotificationIcon.FAIL;
break;
return FailIcon;
case NotificationTypes.Disqualification:
this.icon = NotificationIcon.SOFTWARE_UPDATE;
break;
return DisqualificationIcon;
case NotificationTypes.Suspension:
this.icon = NotificationIcon.SUSPENDED;
break;
return SuspendedIcon;
default:
this.icon = NotificationIcon.INFO;
return InfoIcon;
}
}
}

View File

@ -2,7 +2,7 @@
// See LICENSE for copying information.
declare module '*.svg' {
import Vue, {VueConstructor} from 'vue';
const content: VueConstructor<Vue>;
export default content;
}
import Vue, {VueConstructor} from 'vue';
const content: VueConstructor<Vue>;
export default content;
}

View File

@ -1,23 +0,0 @@
// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
export class NotificationIcon {
public static readonly SOFTWARE_UPDATE: string = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.77228 9.83486C1.91418 10.3214 2.11111 10.7905 2.36016 11.2307L1.65065 12.1255C1.41898 12.418 1.44504 12.835 1.70568 13.0986L2.92776 14.3207C3.19129 14.5842 3.6083 14.6073 3.90079 14.3757L4.78984 13.6719C5.2474 13.9355 5.73392 14.1411 6.24071 14.2859L6.37392 15.4298C6.41736 15.8005 6.73012 16.0785 7.1008 16.0785H8.82967C9.20035 16.0785 9.51311 15.8004 9.55655 15.4298L9.68397 14.3264C10.2284 14.1845 10.7497 13.9731 11.2391 13.698L12.0992 14.3786C12.3917 14.6102 12.8087 14.5842 13.0722 14.3235L14.2943 13.1014C14.5578 12.8379 14.581 12.4209 14.3493 12.1284L13.6804 11.2799C13.9584 10.7991 14.1756 10.2866 14.3204 9.75085L15.3513 9.63212C15.722 9.58868 16 9.27592 16 8.90524V7.17636C16 6.80569 15.722 6.49292 15.3513 6.44949L14.3348 6.33075C14.1958 5.8008 13.9873 5.29401 13.7209 4.81908L14.3464 4.02849C14.5781 3.736 14.5521 3.31898 14.2914 3.05545L13.0722 1.83626C12.8087 1.57273 12.3917 1.54957 12.0992 1.78124L11.3318 2.38939C10.8337 2.0969 10.3008 1.87391 9.74192 1.72332L9.62608 0.730018C9.58264 0.359339 9.26988 0.0813293 8.8992 0.0813293H7.17033C6.79965 0.0813293 6.48689 0.359339 6.44345 0.730018L6.32761 1.72332C5.75422 1.87681 5.20689 2.10848 4.6972 2.41256L3.90082 1.78124C3.60833 1.54957 3.19132 1.57563 2.92779 1.83626L1.7057 3.05835C1.44217 3.32188 1.41901 3.73889 1.65068 4.03138L2.31675 4.8741C2.05032 5.35482 1.8476 5.8674 1.71439 6.40025L0.648689 6.52188C0.27801 6.56532 0 6.87808 0 7.24876V8.97764C0 9.34832 0.27801 9.66107 0.648689 9.70451L1.77228 9.83486ZM8.03618 5.15793C9.61157 5.15793 10.8945 6.44083 10.8945 8.01621C10.8945 9.5916 9.61157 10.8745 8.03618 10.8745C6.46082 10.8745 5.1779 9.5916 5.1779 8.01621C5.1779 6.44083 6.4608 5.15793 8.03618 5.15793Z" fill="#535F77"/>
</svg>`;
public static readonly DISQUALIFIED: string = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.6625 12.9324C15.441 12.5231 15.2181 12.1132 14.996 11.7019C14.5825 10.939 14.1698 10.1761 13.7571 9.41319C13.2614 8.49914 12.7671 7.58367 12.2721 6.66963C11.7939 5.78722 11.3172 4.90619 10.8391 4.02453C10.4875 3.37625 10.1374 2.72727 9.78581 2.07837C9.69089 1.90259 9.59596 1.72682 9.50105 1.55243C9.40261 1.36962 9.29855 1.19384 9.14949 1.04478C8.62918 0.520942 7.76574 0.420394 7.13997 0.816268C6.87137 0.986424 6.67732 1.2276 6.52826 1.50392C6.29975 1.92581 6.07122 2.34767 5.84271 2.77096C5.42646 3.54087 5.00951 4.31081 4.59326 5.08072C4.09192 5.99971 3.59482 6.92086 3.0956 7.84192C2.6231 8.71521 2.1499 9.58707 1.6767 10.4611C1.33076 11.1009 0.984114 11.7394 0.637488 12.3792C0.546082 12.5479 0.45468 12.7167 0.363276 12.8854C0.235307 13.1231 0.134766 13.3635 0.103122 13.6378C0.013826 14.4126 0.556632 15.1762 1.30687 15.3661C1.50516 15.4167 1.70062 15.4188 1.90102 15.4188H14.276H14.2957C14.7035 15.4104 15.0902 15.2571 15.3891 14.9793C15.6773 14.7122 15.8461 14.3465 15.8939 13.9598C15.9396 13.5956 15.8341 13.2511 15.6626 12.9325L15.6625 12.9324ZM7.29666 5.27876C7.29666 4.88501 7.6187 4.59321 7.99978 4.57564C8.37947 4.55806 8.70289 4.91174 8.70289 5.27876V10.2302C8.70289 10.6239 8.38085 10.9157 7.99978 10.9333C7.62008 10.9509 7.29666 10.5972 7.29666 10.2302V5.27876ZM7.99978 13.3282C7.60462 13.3282 7.28399 13.0083 7.28399 12.6124C7.28399 12.2172 7.6039 11.8966 7.99978 11.8966C8.39493 11.8966 8.71556 12.2165 8.71556 12.6124C8.71556 13.0075 8.39495 13.3282 7.99978 13.3282Z" fill="#535F77"/>
</svg>`;
public static readonly SUSPENDED: string = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.6625 12.9324C15.441 12.5231 15.2181 12.1132 14.996 11.7019C14.5825 10.939 14.1698 10.1761 13.7571 9.41319C13.2614 8.49914 12.7671 7.58367 12.2721 6.66963C11.7939 5.78722 11.3172 4.90619 10.8391 4.02453C10.4875 3.37625 10.1374 2.72727 9.78581 2.07837C9.69089 1.90259 9.59596 1.72682 9.50105 1.55243C9.40261 1.36962 9.29855 1.19384 9.14949 1.04478C8.62918 0.520942 7.76574 0.420394 7.13997 0.816268C6.87137 0.986424 6.67732 1.2276 6.52826 1.50392C6.29975 1.92581 6.07122 2.34767 5.84271 2.77096C5.42646 3.54087 5.00951 4.31081 4.59326 5.08072C4.09192 5.99971 3.59482 6.92086 3.0956 7.84192C2.6231 8.71521 2.1499 9.58707 1.6767 10.4611C1.33076 11.1009 0.984114 11.7394 0.637488 12.3792C0.546082 12.5479 0.45468 12.7167 0.363276 12.8854C0.235307 13.1231 0.134766 13.3635 0.103122 13.6378C0.013826 14.4126 0.556632 15.1762 1.30687 15.3661C1.50516 15.4167 1.70062 15.4188 1.90102 15.4188H14.276H14.2957C14.7035 15.4104 15.0902 15.2571 15.3891 14.9793C15.6773 14.7122 15.8461 14.3465 15.8939 13.9598C15.9396 13.5956 15.8341 13.2511 15.6626 12.9325L15.6625 12.9324ZM7.29666 5.27876C7.29666 4.88501 7.6187 4.59321 7.99978 4.57564C8.37947 4.55806 8.70289 4.91174 8.70289 5.27876V10.2302C8.70289 10.6239 8.38085 10.9157 7.99978 10.9333C7.62008 10.9509 7.29666 10.5972 7.29666 10.2302V5.27876ZM7.99978 13.3282C7.60462 13.3282 7.28399 13.0083 7.28399 12.6124C7.28399 12.2172 7.6039 11.8966 7.99978 11.8966C8.39493 11.8966 8.71556 12.2165 8.71556 12.6124C8.71556 13.0075 8.39495 13.3282 7.99978 13.3282Z" fill="#535F77"/>
</svg>`;
public static readonly FAIL: string = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path class="close-cross-svg-path" d="M15.7071 1.70711C16.0976 1.31658 16.0976 0.683417 15.7071 0.292893C15.3166 -0.0976311 14.6834 -0.0976311 14.2929 0.292893L15.7071 1.70711ZM0.292893 14.2929C-0.0976311 14.6834 -0.0976311 15.3166 0.292893 15.7071C0.683417 16.0976 1.31658 16.0976 1.70711 15.7071L0.292893 14.2929ZM1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L1.70711 0.292893ZM14.2929 15.7071C14.6834 16.0976 15.3166 16.0976 15.7071 15.7071C16.0976 15.3166 16.0976 14.6834 15.7071 14.2929L14.2929 15.7071ZM14.2929 0.292893L0.292893 14.2929L1.70711 15.7071L15.7071 1.70711L14.2929 0.292893ZM0.292893 1.70711L14.2929 15.7071L15.7071 14.2929L1.70711 0.292893L0.292893 1.70711Z" fill="#384B65"/>
</svg>
`;
public static readonly INFO: string = `<svg width="15" height="18" viewBox="0 0 15 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.09394 2.14899C3.66843 2.80225 1.87523 5.10849 1.87523 7.85462V11.7819C1.87523 12.1437 1.59447 12.4364 1.25145 12.4364C0.560552 12.4364 0.000244141 13.0245 0.000244141 13.7455C0.000244141 14.469 0.560552 15.0546 1.25389 15.0546H13.7466C14.4387 15.0546 15.0002 14.4665 15.0002 13.7455C15.0002 13.0219 14.4375 12.4364 13.749 12.4364C13.4048 12.4364 13.1253 12.1449 13.1253 11.7819V7.85462C13.1253 5.1099 11.3333 2.80353 8.90655 2.14899V1.47272C8.90655 0.657093 8.27668 0 7.50031 0C6.72516 0 6.09407 0.659646 6.09407 1.47272L6.09394 2.14899ZM5.3127 15.7091H9.68766C9.68766 16.9747 8.70867 18 7.50018 18C6.29169 18 5.3127 16.9747 5.3127 15.7091Z" fill="#535F77"/>
</svg>`;
}

View File

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.6625 12.9324C15.441 12.5231 15.2181 12.1132 14.996 11.7019C14.5825 10.939 14.1698 10.1761 13.7571 9.41319C13.2614 8.49914 12.7671 7.58367 12.2721 6.66963C11.7939 5.78722 11.3172 4.90619 10.8391 4.02453C10.4875 3.37625 10.1374 2.72727 9.78581 2.07837C9.69089 1.90259 9.59596 1.72682 9.50105 1.55243C9.40261 1.36962 9.29855 1.19384 9.14949 1.04478C8.62918 0.520942 7.76574 0.420394 7.13997 0.816268C6.87137 0.986424 6.67732 1.2276 6.52826 1.50392C6.29975 1.92581 6.07122 2.34767 5.84271 2.77096C5.42646 3.54087 5.00951 4.31081 4.59326 5.08072C4.09192 5.99971 3.59482 6.92086 3.0956 7.84192C2.6231 8.71521 2.1499 9.58707 1.6767 10.4611C1.33076 11.1009 0.984114 11.7394 0.637488 12.3792C0.546082 12.5479 0.45468 12.7167 0.363276 12.8854C0.235307 13.1231 0.134766 13.3635 0.103122 13.6378C0.013826 14.4126 0.556632 15.1762 1.30687 15.3661C1.50516 15.4167 1.70062 15.4188 1.90102 15.4188H14.276H14.2957C14.7035 15.4104 15.0902 15.2571 15.3891 14.9793C15.6773 14.7122 15.8461 14.3465 15.8939 13.9598C15.9396 13.5956 15.8341 13.2511 15.6626 12.9325L15.6625 12.9324ZM7.29666 5.27876C7.29666 4.88501 7.6187 4.59321 7.99978 4.57564C8.37947 4.55806 8.70289 4.91174 8.70289 5.27876V10.2302C8.70289 10.6239 8.38085 10.9157 7.99978 10.9333C7.62008 10.9509 7.29666 10.5972 7.29666 10.2302V5.27876ZM7.99978 13.3282C7.60462 13.3282 7.28399 13.0083 7.28399 12.6124C7.28399 12.2172 7.6039 11.8966 7.99978 11.8966C8.39493 11.8966 8.71556 12.2165 8.71556 12.6124C8.71556 13.0075 8.39495 13.3282 7.99978 13.3282Z" fill="#535F77"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path class="close-cross-svg-path" d="M15.7071 1.70711C16.0976 1.31658 16.0976 0.683417 15.7071 0.292893C15.3166 -0.0976311 14.6834 -0.0976311 14.2929 0.292893L15.7071 1.70711ZM0.292893 14.2929C-0.0976311 14.6834 -0.0976311 15.3166 0.292893 15.7071C0.683417 16.0976 1.31658 16.0976 1.70711 15.7071L0.292893 14.2929ZM1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L1.70711 0.292893ZM14.2929 15.7071C14.6834 16.0976 15.3166 16.0976 15.7071 15.7071C16.0976 15.3166 16.0976 14.6834 15.7071 14.2929L14.2929 15.7071ZM14.2929 0.292893L0.292893 14.2929L1.70711 15.7071L15.7071 1.70711L14.2929 0.292893ZM0.292893 1.70711L14.2929 15.7071L15.7071 14.2929L1.70711 0.292893L0.292893 1.70711Z" fill="#384B65"/>
</svg>

After

Width:  |  Height:  |  Size: 885 B

View File

@ -0,0 +1,3 @@
<svg width="15" height="18" viewBox="0 0 15 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.09394 2.14899C3.66843 2.80225 1.87523 5.10849 1.87523 7.85462V11.7819C1.87523 12.1437 1.59447 12.4364 1.25145 12.4364C0.560552 12.4364 0.000244141 13.0245 0.000244141 13.7455C0.000244141 14.469 0.560552 15.0546 1.25389 15.0546H13.7466C14.4387 15.0546 15.0002 14.4665 15.0002 13.7455C15.0002 13.0219 14.4375 12.4364 13.749 12.4364C13.4048 12.4364 13.1253 12.1449 13.1253 11.7819V7.85462C13.1253 5.1099 11.3333 2.80353 8.90655 2.14899V1.47272C8.90655 0.657093 8.27668 0 7.50031 0C6.72516 0 6.09407 0.659646 6.09407 1.47272L6.09394 2.14899ZM5.3127 15.7091H9.68766C9.68766 16.9747 8.70867 18 7.50018 18C6.29169 18 5.3127 16.9747 5.3127 15.7091Z" fill="#535F77"/>
</svg>

After

Width:  |  Height:  |  Size: 814 B

View File

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.77228 9.83486C1.91418 10.3214 2.11111 10.7905 2.36016 11.2307L1.65065 12.1255C1.41898 12.418 1.44504 12.835 1.70568 13.0986L2.92776 14.3207C3.19129 14.5842 3.6083 14.6073 3.90079 14.3757L4.78984 13.6719C5.2474 13.9355 5.73392 14.1411 6.24071 14.2859L6.37392 15.4298C6.41736 15.8005 6.73012 16.0785 7.1008 16.0785H8.82967C9.20035 16.0785 9.51311 15.8004 9.55655 15.4298L9.68397 14.3264C10.2284 14.1845 10.7497 13.9731 11.2391 13.698L12.0992 14.3786C12.3917 14.6102 12.8087 14.5842 13.0722 14.3235L14.2943 13.1014C14.5578 12.8379 14.581 12.4209 14.3493 12.1284L13.6804 11.2799C13.9584 10.7991 14.1756 10.2866 14.3204 9.75085L15.3513 9.63212C15.722 9.58868 16 9.27592 16 8.90524V7.17636C16 6.80569 15.722 6.49292 15.3513 6.44949L14.3348 6.33075C14.1958 5.8008 13.9873 5.29401 13.7209 4.81908L14.3464 4.02849C14.5781 3.736 14.5521 3.31898 14.2914 3.05545L13.0722 1.83626C12.8087 1.57273 12.3917 1.54957 12.0992 1.78124L11.3318 2.38939C10.8337 2.0969 10.3008 1.87391 9.74192 1.72332L9.62608 0.730018C9.58264 0.359339 9.26988 0.0813293 8.8992 0.0813293H7.17033C6.79965 0.0813293 6.48689 0.359339 6.44345 0.730018L6.32761 1.72332C5.75422 1.87681 5.20689 2.10848 4.6972 2.41256L3.90082 1.78124C3.60833 1.54957 3.19132 1.57563 2.92779 1.83626L1.7057 3.05835C1.44217 3.32188 1.41901 3.73889 1.65068 4.03138L2.31675 4.8741C2.05032 5.35482 1.8476 5.8674 1.71439 6.40025L0.648689 6.52188C0.27801 6.56532 0 6.87808 0 7.24876V8.97764C0 9.34832 0.27801 9.66107 0.648689 9.70451L1.77228 9.83486ZM8.03618 5.15793C9.61157 5.15793 10.8945 6.44083 10.8945 8.01621C10.8945 9.5916 9.61157 10.8745 8.03618 10.8745C6.46082 10.8745 5.1779 9.5916 5.1779 8.01621C5.1779 6.44083 6.4608 5.15793 8.03618 5.15793Z" fill="#535F77"/>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.6625 12.9324C15.441 12.5231 15.2181 12.1132 14.996 11.7019C14.5825 10.939 14.1698 10.1761 13.7571 9.41319C13.2614 8.49914 12.7671 7.58367 12.2721 6.66963C11.7939 5.78722 11.3172 4.90619 10.8391 4.02453C10.4875 3.37625 10.1374 2.72727 9.78581 2.07837C9.69089 1.90259 9.59596 1.72682 9.50105 1.55243C9.40261 1.36962 9.29855 1.19384 9.14949 1.04478C8.62918 0.520942 7.76574 0.420394 7.13997 0.816268C6.87137 0.986424 6.67732 1.2276 6.52826 1.50392C6.29975 1.92581 6.07122 2.34767 5.84271 2.77096C5.42646 3.54087 5.00951 4.31081 4.59326 5.08072C4.09192 5.99971 3.59482 6.92086 3.0956 7.84192C2.6231 8.71521 2.1499 9.58707 1.6767 10.4611C1.33076 11.1009 0.984114 11.7394 0.637488 12.3792C0.546082 12.5479 0.45468 12.7167 0.363276 12.8854C0.235307 13.1231 0.134766 13.3635 0.103122 13.6378C0.013826 14.4126 0.556632 15.1762 1.30687 15.3661C1.50516 15.4167 1.70062 15.4188 1.90102 15.4188H14.276H14.2957C14.7035 15.4104 15.0902 15.2571 15.3891 14.9793C15.6773 14.7122 15.8461 14.3465 15.8939 13.9598C15.9396 13.5956 15.8341 13.2511 15.6626 12.9325L15.6625 12.9324ZM7.29666 5.27876C7.29666 4.88501 7.6187 4.59321 7.99978 4.57564C8.37947 4.55806 8.70289 4.91174 8.70289 5.27876V10.2302C8.70289 10.6239 8.38085 10.9157 7.99978 10.9333C7.62008 10.9509 7.29666 10.5972 7.29666 10.2302V5.27876ZM7.99978 13.3282C7.60462 13.3282 7.28399 13.0083 7.28399 12.6124C7.28399 12.2172 7.6039 11.8966 7.99978 11.8966C8.39493 11.8966 8.71556 12.2165 8.71556 12.6124C8.71556 13.0075 8.39495 13.3282 7.99978 13.3282Z" fill="#535F77"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -10,7 +10,7 @@ import { UINotification } from '@/app/types/notifications';
import { NotificationsHttpApi } from '@/storagenode/api/notifications';
import { Notification, NotificationTypes } from '@/storagenode/notifications/notifications';
import { NotificationsService } from '@/storagenode/notifications/service';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import { createLocalVue, mount } from '@vue/test-utils';
const localVue = createLocalVue();
localVue.use(Vuex);
@ -23,7 +23,7 @@ const store = new Vuex.Store({ modules: { notificationsModule }});
describe('SNONotification', (): void => {
it('renders correctly with default props', (): void => {
const wrapper = shallowMount(SNONotification, {
const wrapper = mount(SNONotification, {
store,
localVue,
});
@ -41,7 +41,7 @@ describe('SNONotification', (): void => {
'message1',
);
const wrapper = shallowMount(SNONotification, {
const wrapper = mount(SNONotification, {
store,
localVue,
propsData: {

View File

@ -6,9 +6,8 @@ exports[`SNONotification renders correctly 1`] = `
<div class="notification-item__new-indicator-container"><span class="notification-item__new-indicator-container__circle"></span></div>
<div class="notification-item__icon-container">
<div class="icon"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path class="close-cross-svg-path" d="M15.7071 1.70711C16.0976 1.31658 16.0976 0.683417 15.7071 0.292893C15.3166 -0.0976311 14.6834 -0.0976311 14.2929 0.292893L15.7071 1.70711ZM0.292893 14.2929C-0.0976311 14.6834 -0.0976311 15.3166 0.292893 15.7071C0.683417 16.0976 1.31658 16.0976 1.70711 15.7071L0.292893 14.2929ZM1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L1.70711 0.292893ZM14.2929 15.7071C14.6834 16.0976 15.3166 16.0976 15.7071 15.7071C16.0976 15.3166 16.0976 14.6834 15.7071 14.2929L14.2929 15.7071ZM14.2929 0.292893L0.292893 14.2929L1.70711 15.7071L15.7071 1.70711L14.2929 0.292893ZM0.292893 1.70711L14.2929 15.7071L15.7071 14.2929L1.70711 0.292893L0.292893 1.70711Z" fill="#384B65"></path>
</svg>
</div>
<path d="M15.7071 1.70711C16.0976 1.31658 16.0976 0.683417 15.7071 0.292893C15.3166 -0.0976311 14.6834 -0.0976311 14.2929 0.292893L15.7071 1.70711ZM0.292893 14.2929C-0.0976311 14.6834 -0.0976311 15.3166 0.292893 15.7071C0.683417 16.0976 1.31658 16.0976 1.70711 15.7071L0.292893 14.2929ZM1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L1.70711 0.292893ZM14.2929 15.7071C14.6834 16.0976 15.3166 16.0976 15.7071 15.7071C16.0976 15.3166 16.0976 14.6834 15.7071 14.2929L14.2929 15.7071ZM14.2929 0.292893L0.292893 14.2929L1.70711 15.7071L15.7071 1.70711L14.2929 0.292893ZM0.292893 1.70711L14.2929 15.7071L15.7071 14.2929L1.70711 0.292893L0.292893 1.70711Z" fill="#384B65" class="close-cross-svg-path"></path>
</svg></div>
</div>
<div class="notification-item__text-container">
<p class="notification-item__text-container__message"><b class="notification-item__text-container__message__bold">title1:</b> message1