From 6478ed82c21a7035b54bead4d0267a2d470973f9 Mon Sep 17 00:00:00 2001 From: Chuck Carpenter Date: Fri, 29 Jun 2018 16:42:18 -0700 Subject: [PATCH] update tests and dependency to use shepherd with popper --- .bowerrc | 4 ---- bower.json | 5 ----- index.js | 1 + package.json | 8 ++------ tests/acceptance/ember-shepherd-test.js | 12 ++++++------ 5 files changed, 9 insertions(+), 21 deletions(-) delete mode 100644 .bowerrc delete mode 100644 bower.json diff --git a/.bowerrc b/.bowerrc deleted file mode 100644 index 959e1696..00000000 --- a/.bowerrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "directory": "bower_components", - "analytics": false -} diff --git a/bower.json b/bower.json deleted file mode 100644 index 1c6a6dfc..00000000 --- a/bower.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "ember-shepherd", - "dependencies": { - } -} diff --git a/index.js b/index.js index 36101a75..984a07f3 100644 --- a/index.js +++ b/index.js @@ -37,6 +37,7 @@ module.exports = { srcDir: 'dist', import: { include: [ + 'js/popper.js', 'js/shepherd.js', this.theme ], diff --git a/package.json b/package.json index 346d8602..599d68db 100644 --- a/package.json +++ b/package.json @@ -49,9 +49,8 @@ "ember-cli-babel": "^6.6.0", "ember-cli-node-assets": "0.2.2", "ember-getowner-polyfill": "2.2.0", - "ember-tether": "1.0.0", "fastboot-transform": "^0.1.3", - "tether-shepherd": "1.8.1" + "tether-shepherd": "git@github.com:shipshapecode/shepherd.git#2.0-alpha" }, "devDependencies": { "@html-next/flexi-config": "^2.1.1", @@ -100,10 +99,7 @@ }, "ember-addon": { "configPath": "tests/dummy/config", - "demoURL": "http://ember-shepherd.shipshape.io/", - "after": [ - "ember-tether" - ] + "demoURL": "http://ember-shepherd.shipshape.io/" }, "greenkeeper": { "ignore": [ diff --git a/tests/acceptance/ember-shepherd-test.js b/tests/acceptance/ember-shepherd-test.js index a2dfb2ab..353bfcf0 100644 --- a/tests/acceptance/ember-shepherd-test.js +++ b/tests/acceptance/ember-shepherd-test.js @@ -134,7 +134,7 @@ module('Acceptance | Tour functionality tests', function(hooks) { await click('.toggleHelpModal'); assert.ok(document.body.classList.contains('shepherd-active'), 'Body gets class of shepherd-active, when shepherd becomes active'); - assert.equal(document.querySelectorAll('.shepherd-enabled').length, 2, 'attachTo element and tour have shepherd-enabled class'); + assert.equal(document.querySelectorAll('.shepherd-enabled').length, 1, 'attachTo element has the shepherd-enabled class'); assert.ok(document.querySelector('#shepherdOverlay'), '#shepherdOverlay exists, since modal'); }); @@ -146,7 +146,7 @@ module('Acceptance | Tour functionality tests', function(hooks) { await click('.toggleHelpNonmodal'); assert.ok(document.body.classList.contains('shepherd-active'), 'Body gets class of shepherd-active, when shepherd becomes active'); - assert.equal(document.querySelectorAll('.shepherd-enabled').length, 2, 'attachTo element and tour get shepherd-enabled class'); + assert.equal(document.querySelectorAll('.shepherd-enabled').length, 1, 'attachTo element has the shepherd-enabled class'); assert.notOk(document.querySelector('#shepherdOverlay'), '#shepherdOverlay should not exist, since non-modal'); }); @@ -158,15 +158,15 @@ module('Acceptance | Tour functionality tests', function(hooks) { await click('.toggleHelpModal'); await click(document.querySelector('.shepherd-content .next-button')); - assert.ok(document.querySelector('.shepherd-enabled .back-button'), 'Ensure that the back button appears'); + assert.ok(document.querySelector('.shepherd-open .back-button'), 'Ensure that the back button appears'); await click(document.querySelector('.shepherd-content .back-button')); - assert.notOk(document.querySelector('.shepherd-enabled .back-button'), 'Ensure that the back button disappears'); + assert.notOk(document.querySelector('.shepherd-open .back-button'), 'Ensure that the back button disappears'); await click(document.querySelector('.shepherd-content .cancel-button')); - assert.notOk(document.querySelector('.shepherd-enabled [class^=shepherd-button]'), 'Ensure that all buttons are gone, after exit'); + assert.notOk(document.querySelector('.shepherd-open [class^=shepherd-button]'), 'Ensure that all buttons are gone, after exit'); }); test('Highlight applied', async function(assert) { @@ -539,7 +539,7 @@ module('Acceptance | Tour functionality tests', function(hooks) { tour.show('usage'); - assert.equal(document.querySelector('.shepherd-enabled.shepherd-open .shepherd-text').textContent, + assert.equal(document.querySelector('.shepherd-open .shepherd-text').textContent, 'To use the tour service, simply inject it into your application and use it like this example.', 'Usage step shown'); });