Skip to content

Commit

Permalink
feat(icon): update icons set to 4.2.1 (VIV-1158) (#1401)
Browse files Browse the repository at this point in the history
* update icons

* Remove flaky test

---------

Co-authored-by: Yonatan Kra <yonatan.kra@vonage.com>
  • Loading branch information
rachelbt and YonatanKra committed Jun 29, 2023
1 parent 5b9171f commit 489c24a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion components/icon/src/vwc-icon.ts
Expand Up @@ -20,7 +20,7 @@ declare global {

// noinspection CssUnresolvedCustomProperty
const BASE_URL = 'https://icon.resources.vonage.com'; // namespaced as 3f7739a0-a898-4f69-a82b-ad9d743170b6 on icons.resources.vonage.com
const ICON_SET_VERSION = '4.2.0';
const ICON_SET_VERSION = '4.2.1';
const PLACEHOLDER_ICON = '<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><style>@keyframes rotation { from { transform: rotate(0deg) } to { transform: rotate(360deg) } } g#circle { transform-origin: center center; animation: 1s rotation 0s linear infinite; } path { fill: currentColor }</style> <g id="circle"> <path d="M7.5 2C3.91014 2 1 4.91014 1 8.5C1 12.0899 3.91014 15 7.5 15C11.0899 15 14 12.0899 14 8.5C14 8.22386 14.2239 8 14.5 8C14.7761 8 15 8.22386 15 8.5C15 12.6421 11.6421 16 7.5 16C3.35786 16 0 12.6421 0 8.5C0 4.35786 3.35786 1 7.5 1C10.3622 1 12.7088 2.78366 13.9478 5.27753C14.0706 5.52484 13.9698 5.82492 13.7225 5.94778C13.4752 6.07065 13.1751 5.96977 13.0522 5.72247C11.9472 3.49834 9.90985 2 7.5 2Z"/><path d="M13.5 0C13.7761 0 14 0.223858 14 0.5V5.5C14 5.77614 13.7761 6 13.5 6H8.5C8.22386 6 8 5.77614 8 5.5C8 5.22386 8.22386 5 8.5 5H13V0.5C13 0.223858 13.2239 0 13.5 0Z"/></g></svg>';
const PLACEHOLDER_DELAY = 500; // Start displaying placeholder if waiting more than this period of time
const PLACEHOLDER_TIMEOUT = 2000; // Stop displaying placeholder if exceeding this period of time (will also stop one an icon is loaded)
Expand Down
16 changes: 0 additions & 16 deletions components/icon/test/icon.test.js
Expand Up @@ -38,22 +38,6 @@ describe('vwc-icon', () => {
it('Should be empty', () => {
assert.isEmpty(iconEl.innerHTML);
});

Object.entries(ICON_SAMPLE).forEach(([iconName, iconData]) => {
it(`Should contain "${iconName}" path`, function () {
this.timeout((LOAD_TRIAL_COUNT + 1) * LOAD_TIME);
iconEl.setAttribute('type', iconName);
return Array(LOAD_TRIAL_COUNT)
.fill(0)
.reduce(promise => promise
.then(status => status || sleep(LOAD_TIME)
.then(() => iconEl.shadowRoot
?.querySelector('svg > path:first-child')
?.getAttribute('d') === iconData)),
Promise.resolve(false))
.then(status => assert(status, `Icon ${iconName} failed to verify`));
});
});
});

describe('icon layout', () => {
Expand Down

0 comments on commit 489c24a

Please sign in to comment.