Project import generated by Copybara.
GitOrigin-RevId: d9e9e3fb4e31372ec1fb43b178994ca78fa8fe70
diff --git a/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.js b/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.js
new file mode 100644
index 0000000..690bd6a
--- /dev/null
+++ b/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.js
@@ -0,0 +1,87 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import {LitElement, html, css} from 'lit-element';
+
+/**
+ * `<mr-crbug-link>`
+ *
+ * Displays a crbug short-link to an issue.
+ *
+ */
+export class MrCrbugLink extends LitElement {
+ /** @override */
+ static get styles() {
+ return css`
+ :host {
+ /**
+ * CSS variables provided to allow conditionally hiding <mr-crbug-link>
+ * in a way that's screenreader friendly.
+ */
+ --mr-crbug-link-opacity: 1;
+ --mr-crbug-link-opacity-focused: 1;
+ }
+ a.material-icons {
+ font-size: var(--chops-icon-font-size);
+ display: inline-block;
+ color: var(--chops-primary-icon-color);
+ padding: 0 2px;
+ box-sizing: border-box;
+ text-decoration: none;
+ vertical-align: middle;
+ }
+ a {
+ opacity: var(--mr-crbug-link-opacity);
+ }
+ a:focus {
+ opacity: var(--mr-crbug-link-opacity-focused);
+ }
+ `;
+ }
+
+ /** @override */
+ render() {
+ return html`
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+ <a
+ id="bugLink"
+ class="material-icons"
+ href=${this._issueUrl}
+ title="crbug link"
+ >link</a>
+ `;
+ }
+
+ /** @override */
+ static get properties() {
+ return {
+ /**
+ * The issue being viewed. Falls back gracefully if this is only a ref.
+ */
+ issue: {type: Object},
+ };
+ }
+
+ /**
+ * Computes the URL to render in the shortlink.
+ * @return {string}
+ */
+ get _issueUrl() {
+ const issue = this.issue;
+ if (!issue) return '';
+ if (this._getHost() === 'bugs.chromium.org') {
+ const projectPart = (
+ issue.projectName == 'chromium' ? '' : issue.projectName + '/');
+ return `https://crbug.com/${projectPart}${issue.localId}`;
+ }
+ const issueType = issue.approvalValues ? 'approval' : 'detail';
+ return `/p/${issue.projectName}/issues/${issueType}?id=${issue.localId}`;
+ }
+
+ _getHost() {
+ // This function allows us to mock the host in unit testing.
+ return document.location.host;
+ }
+}
+customElements.define('mr-crbug-link', MrCrbugLink);
diff --git a/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.test.js b/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.test.js
new file mode 100644
index 0000000..aa7f21f
--- /dev/null
+++ b/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.test.js
@@ -0,0 +1,62 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import {assert} from 'chai';
+import {MrCrbugLink} from './mr-crbug-link.js';
+
+
+let element;
+
+describe('mr-crbug-link', () => {
+ beforeEach(() => {
+ element = document.createElement('mr-crbug-link');
+ document.body.appendChild(element);
+ });
+
+ afterEach(() => {
+ document.body.removeChild(element);
+ });
+
+ it('initializes', () => {
+ assert.instanceOf(element, MrCrbugLink);
+ });
+
+ it('In prod, link to crbug.com with project name specified', async () => {
+ element._getHost = () => 'bugs.chromium.org';
+ element.issue = {
+ projectName: 'test',
+ localId: 11,
+ };
+
+ await element.updateComplete;
+
+ const link = element.shadowRoot.querySelector('#bugLink');
+ assert.equal(link.href, 'https://crbug.com/test/11');
+ });
+
+ it('In prod, link to crbug.com with implicit project name', async () => {
+ element._getHost = () => 'bugs.chromium.org';
+ element.issue = {
+ projectName: 'chromium',
+ localId: 11,
+ };
+
+ await element.updateComplete;
+
+ const link = element.shadowRoot.querySelector('#bugLink');
+ assert.equal(link.href, 'https://crbug.com/11');
+ });
+
+ it('does not redirects to approval page for regular issues', async () => {
+ element.issue = {
+ projectName: 'test',
+ localId: 11,
+ };
+
+ await element.updateComplete;
+
+ const link = element.shadowRoot.querySelector('#bugLink');
+ assert.include(link.href.trim(), '/p/test/issues/detail?id=11');
+ });
+});
diff --git a/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.js b/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.js
new file mode 100644
index 0000000..1f8b01a
--- /dev/null
+++ b/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.js
@@ -0,0 +1,39 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import {LitElement, html} from 'lit-element';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+/**
+ * `<mr-hotlist-link>`
+ *
+ * Displays a link to a hotlist.
+ *
+ */
+export class MrHotlistLink extends LitElement {
+ /** @override */
+ static get styles() {
+ return SHARED_STYLES;
+ }
+
+ /** @override */
+ render() {
+ if (!this.hotlist) return html``;
+ return html`
+ <a
+ href="/u/${this.hotlist.ownerRef && this.hotlist.ownerRef.userId}/hotlists/${this.hotlist.name}"
+ title="${this.hotlist.name} - ${this.hotlist.summary}"
+ >
+ ${this.hotlist.name}</a>
+ `;
+ }
+
+ /** @override */
+ static get properties() {
+ return {
+ hotlist: {type: Object},
+ };
+ }
+}
+customElements.define('mr-hotlist-link', MrHotlistLink);
diff --git a/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.test.js b/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.test.js
new file mode 100644
index 0000000..7071b77
--- /dev/null
+++ b/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.test.js
@@ -0,0 +1,23 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import {assert} from 'chai';
+import {MrHotlistLink} from './mr-hotlist-link.js';
+
+let element;
+
+describe('mr-hotlist-link', () => {
+ beforeEach(() => {
+ element = document.createElement('mr-hotlist-link');
+ document.body.appendChild(element);
+ });
+
+ afterEach(() => {
+ document.body.removeChild(element);
+ });
+
+ it('initializes', () => {
+ assert.instanceOf(element, MrHotlistLink);
+ });
+});
diff --git a/static_src/elements/framework/links/mr-issue-link/mr-issue-link.js b/static_src/elements/framework/links/mr-issue-link/mr-issue-link.js
new file mode 100644
index 0000000..029de6c
--- /dev/null
+++ b/static_src/elements/framework/links/mr-issue-link/mr-issue-link.js
@@ -0,0 +1,119 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import {LitElement, html, css} from 'lit-element';
+import {ifDefined} from 'lit-html/directives/if-defined';
+import {issueRefToString, issueRefToUrl} from 'shared/convertersV0.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import '../../mr-dropdown/mr-dropdown.js';
+import '../../../help/mr-cue/mr-fed-ref-cue.js';
+
+/**
+ * `<mr-issue-link>`
+ *
+ * Displays a link to an issue.
+ *
+ */
+export class MrIssueLink extends LitElement {
+ /** @override */
+ static get styles() {
+ return [
+ SHARED_STYLES,
+ css`
+ a[is-closed] {
+ text-decoration: line-through;
+ }
+ mr-dropdown {
+ width: var(--chops-main-font-size);
+ --mr-dropdown-icon-font-size: var(--chops-main-font-size);
+ --mr-dropdown-menu-min-width: 100px;
+ }
+ `,
+ ];
+ }
+
+ /** @override */
+ render() {
+ let fedRefInfo;
+ if (this.issue && this.issue.extIdentifier) {
+ fedRefInfo = html`
+ <!-- TODO(jeffcarp): Figure out CSS to enable menuAlignment=left -->
+ <mr-dropdown
+ label="Federated Reference Info"
+ icon="info_outline"
+ menuAlignment="right"
+ >
+ <mr-fed-ref-cue
+ cuePrefName="federated_reference"
+ fedRefShortlink=${this.issue.extIdentifier}
+ nondismissible>
+ </mr-fed-ref-cue>
+ </mr-dropdown>
+ `;
+ }
+ return html`
+ <a
+ id="bugLink"
+ href=${this.href}
+ title=${ifDefined(this.issue && this.issue.summary)}
+ ?is-closed=${this.isClosed}
+ >${this._linkText}</a>${fedRefInfo}`;
+ }
+
+ /** @override */
+ static get properties() {
+ return {
+ // The issue being viewed. Falls back gracefully if this is only a ref.
+ issue: {type: Object},
+ text: {type: String},
+ // The global current project name. NOT the issue's project name.
+ projectName: {type: String},
+ queryParams: {type: Object},
+ short: {type: Boolean},
+ };
+ }
+
+ /** @override */
+ constructor() {
+ super();
+
+ this.issue = {};
+ this.queryParams = {};
+ this.short = false;
+ }
+
+ click() {
+ const link = this.shadowRoot.querySelector('a');
+ if (!link) return;
+ link.click();
+ }
+
+ /**
+ * @return {string} Where this issue links to.
+ */
+ get href() {
+ return issueRefToUrl(this.issue, this.queryParams);
+ }
+
+ get isClosed() {
+ if (!this.issue || !this.issue.statusRef) return false;
+
+ return this.issue.statusRef.meansOpen === false;
+ }
+
+ get _linkText() {
+ const {projectName, issue, text, short} = this;
+ if (text) return text;
+
+ if (issue && issue.extIdentifier) {
+ return issue.extIdentifier;
+ }
+
+ const prefix = short ? '' : 'Issue ';
+
+ return prefix + issueRefToString(issue, projectName);
+ }
+}
+
+customElements.define('mr-issue-link', MrIssueLink);
diff --git a/static_src/elements/framework/links/mr-issue-link/mr-issue-link.test.js b/static_src/elements/framework/links/mr-issue-link/mr-issue-link.test.js
new file mode 100644
index 0000000..1bd3ae9
--- /dev/null
+++ b/static_src/elements/framework/links/mr-issue-link/mr-issue-link.test.js
@@ -0,0 +1,147 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import {assert} from 'chai';
+import {MrIssueLink} from './mr-issue-link.js';
+
+let element;
+
+describe('mr-issue-link', () => {
+ beforeEach(() => {
+ element = document.createElement('mr-issue-link');
+ document.body.appendChild(element);
+ });
+
+ afterEach(() => {
+ document.body.removeChild(element);
+ });
+
+ it('initializes', () => {
+ assert.instanceOf(element, MrIssueLink);
+ });
+
+ it('strikethrough when closed', async () => {
+ await element.updateComplete;
+ const link = element.shadowRoot.querySelector('#bugLink');
+ assert.isFalse(
+ window.getComputedStyle(link).getPropertyValue(
+ 'text-decoration').includes('line-through'));
+ element.issue = {statusRef: {meansOpen: false}};
+
+ await element.updateComplete;
+
+ assert.isTrue(
+ window.getComputedStyle(link).getPropertyValue(
+ 'text-decoration').includes('line-through'));
+ });
+
+ it('shortens link text when short is true', () => {
+ element.issue = {
+ projectName: 'test',
+ localId: 13,
+ };
+
+ assert.equal(element._linkText, 'Issue test:13');
+
+ element.short = true;
+
+ assert.equal(element._linkText, 'test:13');
+ });
+
+ it('shows projectName only when different from global', async () => {
+ element.issue = {
+ projectName: 'test',
+ localId: 11,
+ };
+ await element.updateComplete;
+
+ const link = element.shadowRoot.querySelector('#bugLink');
+ assert.equal(link.textContent.trim(), 'Issue test:11');
+
+ element.projectName = 'test';
+ await element.updateComplete;
+
+ assert.equal(link.textContent.trim(), 'Issue 11');
+
+ element.projectName = 'other';
+ await element.updateComplete;
+
+ await element.updateComplete;
+
+ assert.equal(link.textContent.trim(), 'Issue test:11');
+ });
+
+ it('shows links for issues', async () => {
+ element.issue = {
+ projectName: 'test',
+ localId: 11,
+ };
+
+ await element.updateComplete;
+
+ const link = element.shadowRoot.querySelector('#bugLink');
+ assert.include(link.href.trim(), '/p/test/issues/detail?id=11');
+ assert.equal(link.title, '');
+ });
+
+ it('shows links for federated issues', async () => {
+ element.issue = {
+ extIdentifier: 'b/5678',
+ };
+
+ await element.updateComplete;
+
+ const link = element.shadowRoot.querySelector('#bugLink');
+ assert.include(link.href.trim(), 'https://issuetracker.google.com/issues/5678');
+ assert.equal(link.title, '');
+ });
+
+ it('displays an icon for federated references', async () => {
+ element.issue = {
+ extIdentifier: 'b/5678',
+ };
+
+ await element.updateComplete;
+
+ const dropdown = element.shadowRoot.querySelector('mr-dropdown');
+ assert.isNotNull(dropdown);
+ const anchor = dropdown.shadowRoot.querySelector('.anchor');
+ assert.isNotNull(anchor);
+ assert.include(anchor.innerText, 'info_outline');
+ });
+
+ it('displays an info popup for federated references', async () => {
+ element.issue = {
+ extIdentifier: 'b/5678',
+ };
+
+ await element.updateComplete;
+
+ const dropdown = element.shadowRoot.querySelector('mr-dropdown');
+ const anchor = dropdown.shadowRoot.querySelector('.anchor');
+ anchor.click();
+
+ await dropdown.updateComplete;
+
+ assert.isTrue(dropdown.opened);
+
+ const cue = dropdown.querySelector('mr-fed-ref-cue');
+ assert.isNotNull(cue);
+ const message = cue.shadowRoot.querySelector('#message');
+ assert.isNotNull(message);
+ assert.include(message.innerText, 'Buganizer issue tracker');
+ });
+
+ it('shows title when summary is defined', async () => {
+ element.issue = {
+ projectName: 'test',
+ localId: 11,
+ summary: 'Summary',
+ };
+
+ await element.updateComplete;
+ const link = element.shadowRoot.querySelector('#bugLink');
+ assert.equal(link.title, 'Summary');
+ });
+});
diff --git a/static_src/elements/framework/links/mr-user-link/mr-user-link.js b/static_src/elements/framework/links/mr-user-link/mr-user-link.js
new file mode 100644
index 0000000..c009f89
--- /dev/null
+++ b/static_src/elements/framework/links/mr-user-link/mr-user-link.js
@@ -0,0 +1,129 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import {LitElement, html, css} from 'lit-element';
+
+import {connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import {EMPTY_FIELD_VALUE} from 'shared/issue-fields.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+
+const NULL_DISPLAY_NAME_VALUES = [EMPTY_FIELD_VALUE, 'a_deleted_user'];
+
+/**
+ * `<mr-user-link>`
+ *
+ * Displays a link to a user profile.
+ *
+ */
+export class MrUserLink extends connectStore(LitElement) {
+ /** @override */
+ static get styles() {
+ return [
+ SHARED_STYLES,
+ css`
+ :host {
+ display: inline-block;
+ white-space: nowrap;
+ }
+ i.inline-icon {
+ font-size: var(--chops-icon-font-size);
+ color: #B71C1C;
+ vertical-align: bottom;
+ cursor: pointer;
+ }
+ i.inline-icon-unseen {
+ color: var(--chops-purple-700);
+ }
+ i.material-icons[hidden] {
+ display: none;
+ }
+ .availability-notice {
+ color: #B71C1C;
+ font-weight: bold;
+ }
+ `,
+ ];
+ }
+
+ /** @override */
+ static get properties() {
+ return {
+ referencedUsers: {
+ type: Object,
+ },
+ showAvailabilityIcon: {
+ type: Boolean,
+ },
+ showAvailabilityText: {
+ type: Boolean,
+ },
+ userRef: {
+ type: Object,
+ attribute: 'userref',
+ },
+ };
+ }
+
+ /** @override */
+ constructor() {
+ super();
+ this.userRef = {};
+ this.referencedUsers = new Map();
+ this.showAvailabilityIcon = false;
+ this.showAvailabilityText = false;
+ }
+
+ /** @override */
+ stateChanged(state) {
+ this.referencedUsers = issueV0.referencedUsers(state);
+ }
+
+ /** @override */
+ render() {
+ const availability = this._getAvailability();
+ const userLink = this._getUserLink();
+ const user = this.referencedUsers.get(this.userRef.displayName) || {};
+ return html`
+ <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
+ rel="stylesheet">
+ <i
+ id="availability-icon"
+ class="material-icons inline-icon ${user.last_visit_timestamp ? "" : "inline-icon-unseen"}"
+ title="${availability}"
+ ?hidden="${!(this.showAvailabilityIcon && availability)}"
+ >schedule</i>
+ <a
+ id="user-link"
+ href="${userLink}"
+ title="${this.userRef.displayName}"
+ ?hidden="${!userLink}"
+ >${this.userRef.displayName}</a>
+ <span
+ id="user-text"
+ ?hidden="${userLink}"
+ >${this.userRef.displayName}</span>
+ <div
+ id="availability-text"
+ class="availability-notice"
+ title="${availability}"
+ ?hidden="${!(this.showAvailabilityText && availability)}"
+ >${availability}</div>
+ `;
+ }
+
+ _getAvailability() {
+ if (!this.userRef || !this.referencedUsers) return '';
+ const user = this.referencedUsers.get(this.userRef.displayName) || {};
+ return user.availability;
+ }
+
+ _getUserLink() {
+ if (!this.userRef || !this.userRef.displayName ||
+ NULL_DISPLAY_NAME_VALUES.includes(this.userRef.displayName)) return '';
+ return `/u/${this.userRef.userId || this.userRef.displayName}`;
+ }
+}
+customElements.define('mr-user-link', MrUserLink);
diff --git a/static_src/elements/framework/links/mr-user-link/mr-user-link.test.js b/static_src/elements/framework/links/mr-user-link/mr-user-link.test.js
new file mode 100644
index 0000000..77af246
--- /dev/null
+++ b/static_src/elements/framework/links/mr-user-link/mr-user-link.test.js
@@ -0,0 +1,156 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import {assert} from 'chai';
+import {MrUserLink} from './mr-user-link.js';
+
+
+let element;
+let availabilityIcon;
+let userLink;
+let userText;
+let availabilityText;
+
+function getElements() {
+ availabilityIcon = element.shadowRoot.querySelector(
+ '#availability-icon');
+ userLink = element.shadowRoot.querySelector(
+ '#user-link');
+ userText = element.shadowRoot.querySelector(
+ '#user-text');
+ availabilityText = element.shadowRoot.querySelector(
+ '#availability-text');
+}
+
+describe('mr-user-link', () => {
+ beforeEach(() => {
+ element = document.createElement('mr-user-link');
+ document.body.appendChild(element);
+ });
+
+ afterEach(() => {
+ document.body.removeChild(element);
+ });
+
+ it('initializes', () => {
+ assert.instanceOf(element, MrUserLink);
+ });
+
+ it('no link when no userId and displayName is null value', async () => {
+ element.userRef = {displayName: '----'};
+
+ await element.updateComplete;
+ getElements();
+
+ assert.isFalse(userText.hidden);
+ assert.equal(userText.textContent, '----');
+
+ assert.isTrue(availabilityIcon.hidden);
+ assert.isTrue(userLink.hidden);
+ assert.isTrue(availabilityText.hidden);
+ });
+
+ it('link when displayName', async () => {
+ element.userRef = {displayName: 'test@example.com'};
+
+ await element.updateComplete;
+ getElements();
+
+ assert.isFalse(userLink.hidden);
+ assert.equal(userLink.textContent.trim(), 'test@example.com');
+ assert.isTrue(userLink.href.endsWith('/u/test@example.com'));
+
+ assert.isTrue(availabilityIcon.hidden);
+ assert.isTrue(userText.hidden);
+ assert.isTrue(availabilityText.hidden);
+ });
+
+ it('link when userId', async () => {
+ element.userRef = {userId: '1234', displayName: 'test@example.com'};
+
+ await element.updateComplete;
+ getElements();
+
+ assert.isFalse(userLink.hidden);
+ assert.equal(userLink.textContent.trim(), 'test@example.com');
+ assert.isTrue(userLink.href.endsWith('/u/1234'));
+
+ assert.isTrue(availabilityIcon.hidden);
+ assert.isTrue(userText.hidden);
+ assert.isTrue(availabilityText.hidden);
+ });
+
+ it('show availability', async () => {
+ element.userRef = {userId: '1234', displayName: 'test@example.com'};
+ element.referencedUsers = new Map(
+ [['test@example.com', {availability: 'foo'}]]);
+ element.showAvailabilityIcon = true;
+
+ await element.updateComplete;
+ getElements();
+
+ assert.isFalse(availabilityIcon.hidden);
+ assert.equal(availabilityIcon.title, 'foo');
+
+ assert.isFalse(userLink.hidden);
+ assert.isTrue(userText.hidden);
+ assert.isTrue(availabilityText.hidden);
+ });
+
+ it('dont show availability', async () => {
+ element.userRef = {userId: '1234', displayName: 'test@example.com'};
+ element.referencedUsers = new Map(
+ [['test@example.com', {availability: 'foo'}]]);
+
+ await element.updateComplete;
+ getElements();
+
+ assert.isTrue(availabilityIcon.hidden);
+
+ assert.isFalse(userLink.hidden);
+ assert.isTrue(userText.hidden);
+ assert.isTrue(availabilityText.hidden);
+ });
+
+ it('show availability text', async () => {
+ element.userRef = {userId: '1234', displayName: 'test@example.com'};
+ element.referencedUsers = new Map(
+ [['test@example.com', {availability: 'foo'}]]);
+ element.showAvailabilityText = true;
+
+ await element.updateComplete;
+ getElements();
+
+ assert.isFalse(availabilityText.hidden);
+ assert.equal(availabilityText.title, 'foo');
+ assert.equal(availabilityText.textContent, 'foo');
+
+ assert.isTrue(availabilityIcon.hidden);
+ assert.isFalse(userLink.hidden);
+ assert.isTrue(userText.hidden);
+ });
+
+ it('show availability user never visited', async () => {
+ element.userRef = {userId: '1234', displayName: 'test@example.com'};
+ element.referencedUsers = new Map(
+ [['test@example.com', {last_visit_timestamp: undefined}]]);
+
+ await element.updateComplete;
+ getElements();
+
+ assert.isTrue(availabilityIcon.classList.contains("inline-icon-unseen"));
+ });
+
+ it('show availability user visited', async () => {
+ element.userRef = {userId: '1234', displayName: 'test@example.com'};
+ element.referencedUsers = new Map(
+ [['test@example.com', {last_visit_timestamp: "35"}]]);
+
+ await element.updateComplete;
+ getElements();
+
+ assert.isTrue(availabilityIcon.classList.contains("inline-icon"));
+ assert.isFalse(availabilityIcon.classList.contains("inline-icon-unseen"));
+ });
+});