mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 23:46:05 -03:30
fix: user token list item tests
This commit is contained in:
@@ -26,7 +26,7 @@ const token = {
|
|||||||
},
|
},
|
||||||
created: '2020-06-23T15:06:43.188634Z',
|
created: '2020-06-23T15:06:43.188634Z',
|
||||||
modified: '2020-06-23T15:06:43.224151Z',
|
modified: '2020-06-23T15:06:43.224151Z',
|
||||||
description: '',
|
description: 'foobar-token',
|
||||||
user: 1,
|
user: 1,
|
||||||
token: '************',
|
token: '************',
|
||||||
refresh_token: '************',
|
refresh_token: '************',
|
||||||
@@ -62,8 +62,9 @@ describe('<UserTokenListItem />', () => {
|
|||||||
});
|
});
|
||||||
expect(wrapper.find('Td').first().prop('select').isSelected).toBe(false);
|
expect(wrapper.find('Td').first().prop('select').isSelected).toBe(false);
|
||||||
expect(wrapper.find('Td').at(1).text()).toBe('Foobar app');
|
expect(wrapper.find('Td').at(1).text()).toBe('Foobar app');
|
||||||
expect(wrapper.find('Td').at(2).text()).toContain('Read');
|
expect(wrapper.find('Td').at(2).text()).toBe('Foobar-token');
|
||||||
expect(wrapper.find('Td').at(3).text()).toContain('10/25/3019, 3:06:43 PM');
|
expect(wrapper.find('Td').at(3).text()).toContain('Read');
|
||||||
|
expect(wrapper.find('Td').at(4).text()).toContain('10/25/3019, 3:06:43 PM');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should render personal access token row properly', async () => {
|
test('should render personal access token row properly', async () => {
|
||||||
@@ -89,8 +90,9 @@ describe('<UserTokenListItem />', () => {
|
|||||||
});
|
});
|
||||||
expect(wrapper.find('Td').first().prop('select').isSelected).toBe(false);
|
expect(wrapper.find('Td').first().prop('select').isSelected).toBe(false);
|
||||||
expect(wrapper.find('Td').at(1).text()).toEqual('Personal access token');
|
expect(wrapper.find('Td').at(1).text()).toEqual('Personal access token');
|
||||||
expect(wrapper.find('Td').at(2).text()).toEqual('Write');
|
expect(wrapper.find('Td').at(2).text()).toEqual('Foobar-token');
|
||||||
expect(wrapper.find('Td').at(3).text()).toContain('10/25/3019, 3:06:43 PM');
|
expect(wrapper.find('Td').at(3).text()).toEqual('Write');
|
||||||
|
expect(wrapper.find('Td').at(4).text()).toContain('10/25/3019, 3:06:43 PM');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should be checked', async () => {
|
test('should be checked', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user