Skip to content

Commit

Permalink
update tests and dependency to use shepherd with popper
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckcarpenter committed Jun 29, 2018
1 parent 58efa61 commit 6478ed8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 21 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

5 changes: 0 additions & 5 deletions bower.json

This file was deleted.

1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module.exports = {
srcDir: 'dist',
import: {
include: [
'js/popper.js',
'js/shepherd.js',
this.theme
],
Expand Down
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": [
Expand Down
12 changes: 6 additions & 6 deletions tests/acceptance/ember-shepherd-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});

Expand All @@ -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');
});

Expand All @@ -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) {
Expand Down Expand Up @@ -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');
});
Expand Down

0 comments on commit 6478ed8

Please sign in to comment.