ember-test-helpers icon indicating copy to clipboard operation
ember-test-helpers copied to clipboard

How to refresh current visiting page in Ember Test?

Open KingStar1001 opened this issue 1 year ago • 0 comments

I changed untracked property and try to visit same page. But the page didn't reload.

Error case

  test('visiting your route', async function (assert) {
    await visit('your route');

    // Change untracked property
    // ...

    await visit('your route');
  })

So I changed as below code and it works well. But it looks so strange...

Solution

  test('visiting your route', async function (assert) {
    await visit('your route');

    // Change untracked property
    // ...

    await visit('/')
    await visit('your route');
  })

Is there any better way to refresh current page?

KingStar1001 avatar Jul 25 '23 13:07 KingStar1001