aboutsummaryrefslogtreecommitdiff
path: root/javascript/tests/acceptance/packages-test.js
blob: 106e16a322e715f675d98c255ddceb03281ac7b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { module, test } from 'qunit';
import { visit, currentURL, find } from '@ember/test-helpers';
import { setupApplicationTest } from 'ember-qunit';

module('Acceptance | packages', function(hooks) {
  setupApplicationTest(hooks);

  //Test data is in file 'server/mocks/packages.js'
  test('visiting /', async function(assert) {
    await visit('/');
    assert.equal(currentURL(), '/');
    const linkToPackage = find('ul a:first-child');
    assert.equal(linkToPackage.innerText, 'test-package-0.1.0.0');
    assert.equal(linkToPackage.getAttribute('href'), '/package/test-package-0.1.0.0');
  });
});