Sha256: 1b3801bcf4bad387b5172b9830dc62276d4a06ba866591611ac98151fa57a2d2
Contents?: true
Size: 1.06 KB
Versions: 3
Compression:
Stored size: 1.06 KB
Contents
import Controller from '@ember/controller'; import { QueryParamTestCase, moduleFor } from 'internal-test-helpers'; moduleFor( 'Query Params - paramless link-to', class extends QueryParamTestCase { testParamlessLinks(assert, routeName) { assert.expect(1); this.addTemplate(routeName, "{{link-to 'index' 'index' id='index-link'}}"); this.add( `controller:${routeName}`, Controller.extend({ queryParams: ['foo'], foo: 'wat', }) ); return this.visit('/?foo=YEAH').then(() => { assert.equal(document.getElementById('index-link').getAttribute('href'), '/?foo=YEAH'); }); } ["@test param-less links in an app booted with query params in the URL don't reset the query params: application"]( assert ) { return this.testParamlessLinks(assert, 'application'); } ["@test param-less links in an app booted with query params in the URL don't reset the query params: index"]( assert ) { return this.testParamlessLinks(assert, 'index'); } } );
Version data entries
3 entries across 3 versions & 1 rubygems