Skip to content

Commit

Permalink
Added test for top addons link
Browse files Browse the repository at this point in the history
  • Loading branch information
yohanmishkin committed Mar 5, 2019
1 parent dbc5b25 commit 03ffeee
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/acceptance/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,19 @@ module('Acceptance: Index', function(hooks) {
assert.equal(currentRouteName(), 'not-found');
});

test('provides a link to the top addons', async function(assert) {
server.create('addon', { name: 'ember-a-thing' });
server.create('addon', { name: 'ember-test-me', description: 'A thin addon' });

await visit(`/?query=test`);

await click(findByText('.top-addons a', 'See all top 100 addons'));

await percySnapshot('/lists/top-addons');

assert.equal(currentURL(), '/lists/top-addons', 'link to top addons works');
});

function testSearch(url, assertForContentOnUrl) {
test(`visiting ${url} with a query`, async function(assert) {
server.create('addon', { name: 'ember-a-thing' });
Expand Down

0 comments on commit 03ffeee

Please sign in to comment.