aboutsummaryrefslogtreecommitdiff
path: root/javascript/tests/acceptance/packages-test.js
blob: 4c970b16b1eed0e810cc817f1ada6ecc9b050146 (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');
  });
});