Skip to content

Commit 13f1788

Browse files
committed
jest fixes to match
1 parent 50f83d9 commit 13f1788

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

packages/components/src/internal/components/forms/input/__snapshots__/ColorPickerInput.test.tsx.snap

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ exports[`ColorPickerInput allowRemove 1`] = `
2121
<div
2222
class="color-picker__remove"
2323
>
24-
<span
25-
class="container--action-button"
24+
<button
25+
class="clickable-text container--action-button"
26+
type="button"
2627
>
2728
<i
2829
class="fa fa-times container--removal-icon"
2930
/>
30-
</span>
31+
</button>
3132
</div>
3233
<div
3334
class="color-picker__picker"

packages/components/src/internal/components/samples/ManageSampleStatusesPanel.test.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,11 @@ describe('SampleStatusDetail', () => {
264264
expect(selectInput).toHaveTextContent(STATE.stateType);
265265
expect(selectInput.getAttribute('class')).not.toContain('select-input__single-value--is-disabled');
266266
const buttons = document.querySelectorAll('button');
267-
expect(buttons).toHaveLength(3);
268-
expect(buttons.item(1).textContent).toContain('Delete');
269-
expect(buttons.item(1).getAttribute('disabled')).toBeFalsy();
270-
expect(buttons.item(2)).toHaveTextContent('Save');
271-
expect(buttons.item(2).getAttribute('disabled')).not.toBeNull(); // save initially disabled
267+
expect(buttons).toHaveLength(4);
268+
expect(buttons.item(2).textContent).toContain('Delete');
269+
expect(buttons.item(2).getAttribute('disabled')).toBeFalsy();
270+
expect(buttons.item(3)).toHaveTextContent('Save');
271+
expect(buttons.item(3).getAttribute('disabled')).not.toBeNull(); // save initially disabled
272272
});
273273

274274
test('in use disabled', async () => {
@@ -295,11 +295,11 @@ describe('SampleStatusDetail', () => {
295295
const selectInput = document.querySelector('.select-input__single-value');
296296
expect(selectInput.getAttribute('class')).toContain('select-input__single-value--is-disabled');
297297
const buttons = document.querySelectorAll('button');
298-
expect(buttons).toHaveLength(3);
299-
expect(buttons.item(1).textContent).toContain('Delete');
300-
expect(buttons.item(1).getAttribute('disabled')).not.toBeNull(); // delete disabled
301-
expect(buttons.item(2)).toHaveTextContent('Save');
302-
expect(buttons.item(2).getAttribute('disabled')).not.toBeNull(); // save initially disabled
298+
expect(buttons).toHaveLength(4);
299+
expect(buttons.item(2).textContent).toContain('Delete');
300+
expect(buttons.item(2).getAttribute('disabled')).not.toBeNull(); // delete disabled
301+
expect(buttons.item(3)).toHaveTextContent('Save');
302+
expect(buttons.item(3).getAttribute('disabled')).not.toBeNull(); // save initially disabled
303303
});
304304

305305
test('not local, disabled', async () => {

0 commit comments

Comments
 (0)