mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-05-05 19:22:58 +03:00
Created new Result component to display operation result messages consistently
This commit is contained in:
parent
c25355c531
commit
b211a29fc5
19 changed files with 110 additions and 72 deletions
test/servers
|
@ -30,12 +30,12 @@ describe('<CreateServer />', () => {
|
|||
const wrapper = createWrapper();
|
||||
|
||||
expect(wrapper.find(ServerForm)).toHaveLength(1);
|
||||
expect(wrapper.find('Result')).toHaveLength(0);
|
||||
expect(wrapper.find('ImportResult')).toHaveLength(0);
|
||||
});
|
||||
|
||||
it('shows success message when imported is true', () => {
|
||||
const wrapper = createWrapper(true);
|
||||
const result = wrapper.find('Result');
|
||||
const result = wrapper.find('ImportResult');
|
||||
|
||||
expect(result).toHaveLength(1);
|
||||
expect(result.prop('type')).toEqual('success');
|
||||
|
@ -43,7 +43,7 @@ describe('<CreateServer />', () => {
|
|||
|
||||
it('shows error message when import failed', () => {
|
||||
const wrapper = createWrapper(false, true);
|
||||
const result = wrapper.find('Result');
|
||||
const result = wrapper.find('ImportResult');
|
||||
|
||||
expect(result).toHaveLength(1);
|
||||
expect(result.prop('type')).toEqual('error');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue