0

I am trying to trigger my router-link that has a role of button with an aria-pressed attribute that becomes true when the link is pressed.

I am writing tests for that route and cannot figure out hohw to trigger the aria-attribute without it being false. No matter what i do it still prints received: false when i'm expecting true. The route in router.push is the one that i have set as to='' within in my index.vue file

Here is my code below.

  router.push('/register/support');
  await wrapper.vm.$nextTick();
  const btn = wrapper.find(support);
  await wrapper.vm.$nextTick();
  expect(btn.attributes('aria-pressed')).toBe('true');

0 Answers0