You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
There is several ways in which the test helpers should be improved:
The idiomatic place to put test helpers is inside /addon-test-support. We should move them. To ease the transition, we should import and reexport with a deprecation from /test-support for a while.
Afaik Ember.Test.registerHelper is not required (I think it doesn't even work!) with the new test syntax proposed in Rethink Acceptance Testing emberjs/rfcs#268 and shipped already in ember-qunit 4.2.0. Helpers. Those helpers should be explicitly importable with import { expectTranslation } from 'ember-i18n/test-support/helpers';. That means they would also work in integration tests too.
Make the helpers not rely on jQuery, as some apps don't use it anymore, and the goal is to not include it by default in future versions of Ember.
IMHO, I believe a custom assertion like assert.hasTranslation('#selector', 'login.button.submit', { count: 4 }, 'Optional assertion description') would be more idiomatic. Although personally I would use a mix of qunit-dom and the t test helper: assert.dom('#selector').hasText(t('login.button.submit', { count: 4 }), 'Optional assertion description')
This radar is so I don't forger, but I'll try to work on those points myself over Xmas. But if someone wants to beat me to it, just leave a comment here and do it.
The text was updated successfully, but these errors were encountered:
There is several ways in which the test helpers should be improved:
/addon-test-support
. We should move them. To ease the transition, we should import and reexport with a deprecation from/test-support
for a while.Ember.Test.registerHelper
is not required (I think it doesn't even work!) with the new test syntax proposed in Rethink Acceptance Testing emberjs/rfcs#268 and shipped already inember-qunit
4.2.0. Helpers. Those helpers should be explicitly importable withimport { expectTranslation } from 'ember-i18n/test-support/helpers';
. That means they would also work in integration tests too.assert.hasTranslation('#selector', 'login.button.submit', { count: 4 }, 'Optional assertion description')
would be more idiomatic. Although personally I would use a mix of qunit-dom and thet
test helper:assert.dom('#selector').hasText(t('login.button.submit', { count: 4 }), 'Optional assertion description')
This radar is so I don't forger, but I'll try to work on those points myself over Xmas. But if someone wants to beat me to it, just leave a comment here and do it.
The text was updated successfully, but these errors were encountered: