X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/825ea4fce4ba3568f6105c17e83f4769a9323759..3c7e3cdc547ad5468421e1c049daa94b0d4b8bc0:/src/views-components/token-dialog/token-dialog.test.tsx

diff --git a/src/views-components/token-dialog/token-dialog.test.tsx b/src/views-components/token-dialog/token-dialog.test.tsx
index 928001ab..4d1412d8 100644
--- a/src/views-components/token-dialog/token-dialog.test.tsx
+++ b/src/views-components/token-dialog/token-dialog.test.tsx
@@ -2,11 +2,11 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { Button } from '@material-ui/core';
 import { mount, configure } from 'enzyme';
-import * as Adapter from 'enzyme-adapter-react-16';
-import * as CopyToClipboard from 'react-copy-to-clipboard';
+import Adapter from 'enzyme-adapter-react-16';
+import CopyToClipboard from 'react-copy-to-clipboard';
 import { TokenDialogComponent } from './token-dialog';
 
 configure({ adapter: new Adapter() });
@@ -39,12 +39,12 @@ describe('<CurrentTokenDialog />', () => {
 
     it('should show the token expiration if present', () => {
       expect(props.tokenExpiration).toBeUndefined();
-      expect(wrapper.html()).not.toContain('Expires at:');
+      expect(wrapper.html()).toContain('This token does not have an expiration date');
 
       const someDate = '2140-01-01T00:00:00.000Z'
       props.tokenExpiration = new Date(someDate);
       wrapper = mount(<TokenDialogComponent {...props} />);
-      expect(wrapper.html()).toContain('Expires at:');
+      expect(wrapper.html()).toContain(props.tokenExpiration.toLocaleString());
     });
 
     it('should show a create new token button when allowed', () => {
