Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleJu committed Jan 24, 2025
1 parent 593d5a4 commit 871dd0a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client-src/elements/chromedash-form-field_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
STAGE_BLINK_ORIGIN_TRIAL,
STAGE_BLINK_SHIPPING,
} from './form-field-enums';
import {ChromeStatusClient} from '../js-src/cs-client';
import sinon from 'sinon';

describe('chromedash-form-field', () => {
it('renders a checkbox type of field', async () => {
Expand Down Expand Up @@ -66,10 +68,15 @@ describe('chromedash-form-field', () => {
});

it('renders Web Feature ID field with a link', async () => {
window.csClient = new ChromeStatusClient('fake_token', 1);
const webdxFeaturesStub = sinon.stub(window.csClient, 'getWebdxFeatures');
webdxFeaturesStub.returns(Promise.resolve({}));

const component = await fixture(
html` <chromedash-form-field name="web_feature" value="hwb">
</chromedash-form-field>`
);

assert.exists(component);
assert.instanceOf(component, ChromedashFormField);
const fieldRow = component.renderRoot.querySelector('tr');
Expand Down

0 comments on commit 871dd0a

Please sign in to comment.