mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-30 18:17:55 +00:00 
			
		
		
		
	attempts to fix flaky token-expire-warning test (#16197)
This commit is contained in:
		| @@ -2,13 +2,13 @@ import { module, test } from 'qunit'; | |||||||
| import { setupRenderingTest } from 'ember-qunit'; | import { setupRenderingTest } from 'ember-qunit'; | ||||||
| import { find, render, waitUntil } from '@ember/test-helpers'; | import { find, render, waitUntil } from '@ember/test-helpers'; | ||||||
| import hbs from 'htmlbars-inline-precompile'; | import hbs from 'htmlbars-inline-precompile'; | ||||||
| import { addMinutes } from 'date-fns'; | import { addMinutes, subMinutes } from 'date-fns'; | ||||||
|  |  | ||||||
| module('Integration | Component | token-expire-warning', function (hooks) { | module('Integration | Component | token-expire-warning', function (hooks) { | ||||||
|   setupRenderingTest(hooks); |   setupRenderingTest(hooks); | ||||||
|  |  | ||||||
|   test('it renders a warning when the token is expired', async function (assert) { |   test('it renders a warning when the token is expired', async function (assert) { | ||||||
|     const expirationDate = Date.now(); |     const expirationDate = subMinutes(Date.now(), 30); | ||||||
|     this.set('expirationDate', expirationDate); |     this.set('expirationDate', expirationDate); | ||||||
|  |  | ||||||
|     await render(hbs`<TokenExpireWarning @expirationDate={{expirationDate}}/>`); |     await render(hbs`<TokenExpireWarning @expirationDate={{expirationDate}}/>`); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jordan Reimer
					Jordan Reimer