fix: user token list item tests

This commit is contained in:
Alexandre Bortoluzzi
2022-05-06 14:26:00 +02:00
parent e1705738a1
commit bbdab82433

View File

@@ -26,7 +26,7 @@ const token = {
},
created: '2020-06-23T15:06:43.188634Z',
modified: '2020-06-23T15:06:43.224151Z',
description: '',
description: 'foobar-token',
user: 1,
token: '************',
refresh_token: '************',
@@ -62,8 +62,9 @@ describe('<UserTokenListItem />', () => {
});
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(2).text()).toContain('Read');
expect(wrapper.find('Td').at(3).text()).toContain('10/25/3019, 3:06:43 PM');
expect(wrapper.find('Td').at(2).text()).toBe('Foobar-token');
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 () => {
@@ -89,8 +90,9 @@ describe('<UserTokenListItem />', () => {
});
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(2).text()).toEqual('Write');
expect(wrapper.find('Td').at(3).text()).toContain('10/25/3019, 3:06:43 PM');
expect(wrapper.find('Td').at(2).text()).toEqual('Foobar-token');
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 () => {