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
import{module,test}from'qunit';import{setupRenderingTest}from'ember-qunit';import{find,render,settled}from'@ember/test-helpers';importhbsfrom'htmlbars-inline-precompile';import{setupLink,linkFor}from'ember-link/test-support';module('setupLink with rendering test',function(hooks){setupRenderingTest(hooks);setupLink(hooks);test('it is a shortcut for accessing translations',asyncfunction(assert){assert.expect(2);awaitrender(hbs` <Link @route="foo" as |l|> <a data-test-link href={{l.url}} class={{if l.isActive "is-active"}} {{on "click" l.transitionTo}} > Link </a> </Link> `);assert.dom('[data-test-link]').hasAttribute(linkFor('foo').url);linkFor('foo').onTransitionTo(()=>assert.step('transitionTo'));linkFor('foo').onReplaceWith(()=>assert.step('replaceWith'));awaitclick('[data-test-link]');assert.verifySteps(['transitionTo']);});});
functionlinkFor(route: string,
...models: RouteModel[],{['queryParams'|'query']: QueryParams}?
): TestLink;functionlinkFor({route: string,model?: RouteModel,models?: RouteModel[],query?: QueryParams}): TestLink;interfaceTestLink{// all these properties can be overridden and sync to all matching `Link` instancesisActive: boolean;isActiveWithoutQueryParams: boolean;isActiveWithoutModels: boolean;isEntering: boolean;isExiting: boolean;url: string;// initialized with a guid valuereadonlyrouteName: string;readonlyqualifiedRouteName: string;// alias for `routeName`readonlymodels: RouteModel[];readonlyqueryParams?: QueryParams;readonlyonTransitionTo(listener: (event?: Event)=>void): void;readonlyonReplaceWith(listener: (event?: Event)=>void): void;}
The text was updated successfully, but these errors were encountered:
Something like this maybe?
The text was updated successfully, but these errors were encountered: