Skip to content

Commit

Permalink
:| cypress why
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Sep 18, 2023
1 parent 34a77bd commit 5c7549c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/components/combo_box/combo_box.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@
import React, { useState } from 'react';
import { EuiComboBox } from './index';

// CI doesn't have access to the Inter font, so we need to manually include it
// for truncation font calculations to work correctly
before(() => {
const linkElem = document.createElement('link');
linkElem.setAttribute('rel', 'stylesheet');
linkElem.setAttribute(
'href',
'https://fonts.googleapis.com/css2?family=Inter:wght@400,700&display=swap'
);
document.head.appendChild(linkElem);
cy.wait(1000); // Wait a second to give the font time to load/swap in
});

describe('EuiComboBox', () => {
describe('Focus management', () => {
it('keeps focus on the input box when clicking a disabled item', () => {
Expand All @@ -38,19 +51,6 @@ describe('EuiComboBox', () => {
});

describe('truncation', () => {
// CI doesn't have access to the Inter font, so we need to manually include it
// for font calculations to work correctly
before(() => {
const linkElem = document.createElement('link');
linkElem.setAttribute('rel', 'stylesheet');
linkElem.setAttribute(
'href',
'https://fonts.googleapis.com/css2?family=Inter:wght@400,700&display=swap'
);
document.head.appendChild(linkElem);
cy.wait(1000); // Wait a second to give the font time to load/swap in
});

const sharedProps = {
style: { width: 200 },
options: [
Expand Down

0 comments on commit 5c7549c

Please sign in to comment.