aboutsummaryrefslogtreecommitdiff
path: root/javascript/tests/acceptance
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-09-19 11:22:21 +1000
committerYuchen Pei <hi@ypei.me>2022-09-19 11:22:21 +1000
commitef1b927861f9a949aed20341144ffb5bfd42f038 (patch)
tree48bd4688928546bedc6504aad76bf6e0327fcef9 /javascript/tests/acceptance
parent117850d8f659517cb818a857dc04c8f5157795c4 (diff)
Removing the web client
Diffstat (limited to 'javascript/tests/acceptance')
-rw-r--r--javascript/tests/acceptance/haskell-module-test.js28
-rw-r--r--javascript/tests/acceptance/package-test.js23
-rw-r--r--javascript/tests/acceptance/packages-test.js16
3 files changed, 0 insertions, 67 deletions
diff --git a/javascript/tests/acceptance/haskell-module-test.js b/javascript/tests/acceptance/haskell-module-test.js
deleted file mode 100644
index 4eab15d..0000000
--- a/javascript/tests/acceptance/haskell-module-test.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { module, test } from 'qunit';
-import { visit, currentURL, find } from '@ember/test-helpers';
-import { setupApplicationTest } from 'ember-qunit';
-
-
-module('Acceptance | haskell-module', function(hooks) {
- setupApplicationTest(hooks);
-
- //Test data is in 'server/mocks/packages.js'
- test('visiting /package/test-package-0.1.0.0/show/app/Main.hs', async function(assert) {
- await visit('/package/test-package-0.1.0.0/show/app/Main.hs');
-
- assert.equal(currentURL(), '/package/test-package-0.1.0.0/show/app/Main.hs');
-
- const lines = Array.from(find('tbody').children).map((tr) => {
- return tr.children[1].innerText;
- });
-
- assert.deepEqual(lines,["module Main where",
- "",
- "import Lib",
- "",
- "main :: IO ()",
- "main = someFunc",
- "",
- ""]);
- });
-});
diff --git a/javascript/tests/acceptance/package-test.js b/javascript/tests/acceptance/package-test.js
deleted file mode 100644
index 09b73f2..0000000
--- a/javascript/tests/acceptance/package-test.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import { module, test } from 'qunit';
-import { visit, currentURL, find } from '@ember/test-helpers';
-import { setupApplicationTest } from 'ember-qunit';
-
-
-module('Acceptance | package', function(hooks) {
- setupApplicationTest(hooks);
-
- //Test data is in 'server/mocks/packages.js'
- test('visiting /package/test-package-0.1.0.0', async function(assert) {
- await visit('/package/test-package-0.1.0.0');
- assert.equal(currentURL(), '/package/test-package-0.1.0.0');
-
- const moduleNames = Array.from(find('ul.modules').children).map((li) => {
- return [li.innerText,li.children[0].getAttribute('href')];
- });
-
- assert.deepEqual(moduleNames,[["app/Main.hs","/package/test-package-0.1.0.0/show/app/Main.hs"],
- ["src/Lib.hs","/package/test-package-0.1.0.0/show/src/Lib.hs"],
- ["src/Types.hs","/package/test-package-0.1.0.0/show/src/Types.hs"],
- ["test/Spec.hs","/package/test-package-0.1.0.0/show/test/Spec.hs"]]);
- });
-});
diff --git a/javascript/tests/acceptance/packages-test.js b/javascript/tests/acceptance/packages-test.js
deleted file mode 100644
index 106e16a..0000000
--- a/javascript/tests/acceptance/packages-test.js
+++ /dev/null
@@ -1,16 +0,0 @@
-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');
- });
-});