Commit 6535ca5d authored by Kushal Pandya's avatar Kushal Pandya Committed by Alexander Turinske

Update environment picker tests to be more readable

parent 4dd67a77
...@@ -98,9 +98,11 @@ describe('EnvironmentPicker component', () => { ...@@ -98,9 +98,11 @@ describe('EnvironmentPicker component', () => {
}); });
it('disables the environments dropdown', () => { it('disables the environments dropdown', () => {
expect(findDropdown().attributes('disabled')).toBe('true'); expect(findDropdown().attributes()).toMatchObject({
expect(findDropdown().attributes('text')).toBe(INVALID_CURRENT_ENVIRONMENT_NAME); disabled: 'true',
expect(findDropdown().attributes('loading')).toBe(undefined); text: INVALID_CURRENT_ENVIRONMENT_NAME,
loading: undefined,
});
}); });
it('has no dropdown items', () => { it('has no dropdown items', () => {
...@@ -132,9 +134,11 @@ describe('EnvironmentPicker component', () => { ...@@ -132,9 +134,11 @@ describe('EnvironmentPicker component', () => {
}); });
it('disables the environments dropdown', () => { it('disables the environments dropdown', () => {
expect(findDropdown().attributes('disabled')).toBe('true'); expect(findDropdown().attributes()).toMatchObject({
expect(findDropdown().attributes('text')).toBe(LOADING_TEXT); disabled: 'true',
expect(findDropdown().attributes('loading')).toBe('true'); text: LOADING_TEXT,
loading: 'true',
});
}); });
}); });
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment