Skip to content

Commit

Permalink
fix: GlobalStatus warnings when running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
langz committed Oct 21, 2021
1 parent 388a3ff commit 7ef882f
Show file tree
Hide file tree
Showing 16 changed files with 37 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const snapshotProps = {
no_animation: true,
input_ref: null,
skip_portal: true,
global_status_id: 'main',
}

// use no_animation so we don't need to wait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
disabled="disabled"
drawer_class="drawer_class"
focusable="focusable"
global_status_id="global_status_id"
global_status_id="main"
icon="icon"
icon_position={null}
icon_size="icon_size"
Expand Down Expand Up @@ -118,7 +118,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
drawer_class="drawer_class"
fixed_position={false}
focusable="focusable"
global_status_id="global_status_id"
global_status_id="main"
handle_dismiss_focus={null}
icon="icon"
icon_position={null}
Expand Down Expand Up @@ -222,7 +222,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
disabled="disabled"
drawer_class="drawer_class"
focusable="focusable"
global_status_id="global_status_id"
global_status_id="main"
icon="icon"
icon_position={null}
icon_size="icon_size"
Expand Down Expand Up @@ -325,7 +325,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
attributes={null}
class={null}
className={null}
global_status_id="global_status_id"
global_status_id="main"
icon="error"
icon_size="medium"
id="autocomplete-id-form-status"
Expand Down Expand Up @@ -1125,7 +1125,7 @@ exports[`Autocomplete markup have to match snapshot 1`] = `
"disabled": "disabled",
"drawer_class": "drawer_class",
"focusable": "focusable",
"global_status_id": "global_status_id",
"global_status_id": "main",
"icon": "icon",
"icon_position": null,
"icon_size": "icon_size",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ props.to = null
props.custom_content = null
props.text = null
props.icon_position = 'right'
props.global_status_id = 'main'

beforeAll(() => {
jest.spyOn(global.console, 'log')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`Button component have to match default button snapshot 1`] = `
custom_method={[Function]}
disabled="disabled"
element={null}
global_status_id="global_status_id"
global_status_id="main"
href={null}
icon="question"
icon_position="right"
Expand Down Expand Up @@ -134,7 +134,7 @@ exports[`Button component have to match default button snapshot 1`] = `
custom_method={[Function]}
disabled="disabled"
element={null}
global_status_id="global_status_id"
global_status_id="main"
href={null}
icon="question"
icon_position="right"
Expand Down Expand Up @@ -300,7 +300,7 @@ exports[`Button component have to match default button snapshot 1`] = `
attributes={null}
class={null}
className={null}
global_status_id="global_status_id"
global_status_id="main"
icon="error"
icon_size="medium"
id="button-form-status"
Expand Down Expand Up @@ -333,7 +333,7 @@ exports[`Button component have to match href="..." snapshot 1`] = `
custom_method={[Function]}
disabled="disabled"
element={null}
global_status_id="global_status_id"
global_status_id="main"
href="https://url"
icon="question"
icon_position="right"
Expand Down Expand Up @@ -655,7 +655,7 @@ exports[`Button component have to match href="..." snapshot 1`] = `
custom_method={[Function]}
disabled="disabled"
element={null}
global_status_id="global_status_id"
global_status_id="main"
href="https://url"
icon="question"
icon_position="right"
Expand Down Expand Up @@ -827,7 +827,7 @@ exports[`Button component have to match href="..." snapshot 1`] = `
attributes={null}
class={null}
className={null}
global_status_id="global_status_id"
global_status_id="main"
icon="error"
icon_size="medium"
id="button-form-status"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const snapshotProps = {
skip_portal: true,
no_animation: true,
variant: 'secondary',
global_status_id: 'main',
}

// use no_animation so we don't need to wait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ exports[`Dropdown markup have to match snapshot 1`] = `
direction="bottom"
disabled="disabled"
focusable="focusable"
global_status_id="global_status_id"
global_status_id="main"
icon="icon"
icon_position={null}
icon_size="icon_size"
Expand Down Expand Up @@ -168,7 +168,7 @@ exports[`Dropdown markup have to match snapshot 1`] = `
disabled="disabled"
fixed_position={false}
focusable="focusable"
global_status_id="global_status_id"
global_status_id="main"
handle_dismiss_focus={null}
icon="icon"
icon_position={null}
Expand Down Expand Up @@ -288,7 +288,7 @@ exports[`Dropdown markup have to match snapshot 1`] = `
direction="bottom"
disabled="disabled"
focusable="focusable"
global_status_id="global_status_id"
global_status_id="main"
icon="icon"
icon_position={null}
icon_size="icon_size"
Expand Down Expand Up @@ -372,7 +372,7 @@ exports[`Dropdown markup have to match snapshot 1`] = `
attributes={null}
class={null}
className={null}
global_status_id="global_status_id"
global_status_id="main"
icon="error"
icon_size="medium"
id="dropdown-id-form-status"
Expand Down Expand Up @@ -1268,7 +1268,7 @@ exports[`Dropdown markup have to match snapshot 1`] = `
"direction": "bottom",
"disabled": "disabled",
"focusable": "focusable",
"global_status_id": "global_status_id",
"global_status_id": "main",
"icon": "icon",
"icon_position": null,
"icon_size": "icon_size",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const props = fakeProps(require.resolve('../FormRow'), {
props.id = 'form-row'
props.direction = 'horizontal'
props.label_direction = 'horizontal'
props.global_status_id = 'main'

describe('FormRow component', () => {
const Comp = mount(<Component {...props} />)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`FormRow component have to match snapshot 1`] = `
custom_method={[Function]}
direction="horizontal"
disabled="disabled"
global_status_id="global_status_id"
global_status_id="main"
id="form-row"
indent="indent"
indent_offset="indent_offset"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ props.size = null
props.readOnly = false
props.label_position = 'left'
props.direction = 'horizontal'
props.global_status_id = 'main'

describe('Radio component', () => {
// then test the state management
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`Radio component have to match snapshot 1`] = `
direction="horizontal"
disabled="disabled"
element="input"
global_status_id="global_status_id"
global_status_id="main"
group={null}
id="radio"
label="label"
Expand Down Expand Up @@ -74,7 +74,7 @@ exports[`Radio component have to match snapshot 1`] = `
attributes={null}
class={null}
className={null}
global_status_id="global_status_id"
global_status_id="main"
icon="error"
icon_size="medium"
id="radio-form-status"
Expand Down Expand Up @@ -143,7 +143,7 @@ exports[`Radio component have to match snapshot 1`] = `
"direction": "horizontal",
"disabled": "disabled",
"element": "input",
"global_status_id": "global_status_id",
"global_status_id": "main",
"group": null,
"id": "radio",
"label": "label",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ props.value = 70
props.step = 10
props.number_format = { currency: true, decimals: 0 }
props.label_direction = 'horizontal'
props.global_status_id = 'main'

describe('Slider component', () => {
const Comp = mount(<Component {...props} />)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`Slider component have to match snapshot 1`] = `
class="class"
className="className"
disabled="disabled"
global_status_id="global_status_id"
global_status_id="main"
hide_buttons="hide_buttons"
id="id"
label="label"
Expand Down Expand Up @@ -80,7 +80,7 @@ exports[`Slider component have to match snapshot 1`] = `
attributes={null}
class={null}
className={null}
global_status_id="global_status_id"
global_status_id="main"
icon="error"
icon_size="medium"
id="id-form-status"
Expand Down Expand Up @@ -575,7 +575,7 @@ exports[`Slider component have to match snapshot 1`] = `
"class": "class",
"className": "className",
"disabled": "disabled",
"global_status_id": "global_status_id",
"global_status_id": "main",
"hide_buttons": "hide_buttons",
"id": "id",
"label": "label",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ props.size = 'default'
props.label_position = 'left'
props.readOnly = false
props.label_direction = 'horizontal'
props.global_status_id = 'main'

describe('Switch component', () => {
// then test the state management
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`Switch component have to match snapshot 1`] = `
custom_method={[Function]}
default_state="default_state"
disabled="disabled"
global_status_id="global_status_id"
global_status_id="main"
id="id"
label="label"
label_direction="horizontal"
Expand Down Expand Up @@ -74,7 +74,7 @@ exports[`Switch component have to match snapshot 1`] = `
attributes={null}
class={null}
className={null}
global_status_id="global_status_id"
global_status_id="main"
icon="error"
icon_size="medium"
id="id-form-status"
Expand Down Expand Up @@ -148,7 +148,7 @@ exports[`Switch component have to match snapshot 1`] = `
"custom_method": [Function],
"default_state": "default_state",
"disabled": "disabled",
"global_status_id": "global_status_id",
"global_status_id": "main",
"id": "id",
"label": "label",
"label_direction": "horizontal",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ props.icon_position = 'left'
props.label_direction = 'horizontal'
props.variant = 'checkbox'
props.readOnly = false
props.global_status_id = 'main'

describe('ToggleButton component', () => {
// then test the state management
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`ToggleButton component have to match snapshot 1`] = `
custom_element={Object {}}
custom_method={[Function]}
disabled="disabled"
global_status_id="global_status_id"
global_status_id="main"
icon="icon"
icon_position="left"
icon_size="icon_size"
Expand Down Expand Up @@ -66,7 +66,7 @@ exports[`ToggleButton component have to match snapshot 1`] = `
attributes={null}
class={null}
className={null}
global_status_id="global_status_id"
global_status_id="main"
icon="error"
icon_size="medium"
id="toggle-button-form-status"
Expand Down Expand Up @@ -445,7 +445,7 @@ exports[`ToggleButton component have to match snapshot 1`] = `
"custom_element": Object {},
"custom_method": [Function],
"disabled": "disabled",
"global_status_id": "global_status_id",
"global_status_id": "main",
"icon": "icon",
"icon_position": "left",
"icon_size": "icon_size",
Expand Down

0 comments on commit 7ef882f

Please sign in to comment.