De promotiewebsite die de reguliere site vervangt tijdens de Kick-In.
https://join.harambee.utwente.nl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.4 KiB
42 lines
1.4 KiB
6 years ago
|
|
||
|
QUnit.test('Testing lockAnchors:true', function(assert) {
|
||
|
var id = '#fullpage';
|
||
|
var FP = initFullpageNew(id, Object.assign({}, allBasicOptions, {lockAnchors: true}));
|
||
|
|
||
|
var done = assert.async(1);
|
||
|
|
||
|
//scrolling down won't change the anchor
|
||
|
FP.moveSectionDown();
|
||
|
assert.equal('', window.location.hash, 'Anchor link should be an empty string');
|
||
|
assert.ok($(SECTION_SEL).eq(1).hasClass(ACTIVE), 'We expect section 2 to be active');
|
||
|
|
||
|
//changing the URL won't scroll to the given section
|
||
|
window.location.hash = '#page3';
|
||
|
|
||
|
setTimeout(function() {
|
||
|
assert.ok(!$(SECTION_SEL).eq(2).hasClass(ACTIVE), 'We dont expect section 3 to be active');
|
||
|
done();
|
||
|
}, 100);
|
||
|
});
|
||
|
|
||
|
|
||
|
QUnit.test('Testing lockAnchors:false', function(assert) {
|
||
|
var id = '#fullpage';
|
||
|
var FP = initFullpageNew(id, Object.assign({}, allBasicOptions, {lockAnchors: false}));
|
||
|
|
||
|
var done = assert.async(1);
|
||
|
|
||
|
//scrolling down will change the anchor
|
||
|
FP.moveSectionDown();
|
||
|
assert.equal('#page2', window.location.hash, 'Anchor link should not be an empty');
|
||
|
assert.ok($(SECTION_SEL).eq(1).hasClass(ACTIVE), 'We expect section 2 to be active');
|
||
|
|
||
|
//changing the URL will scroll to the given section
|
||
|
window.location.hash = '#page3';
|
||
|
|
||
|
setTimeout(function() {
|
||
|
assert.ok($(SECTION_SEL).eq(2).hasClass(ACTIVE), 'We expect section 3 to be active');
|
||
|
done();
|
||
|
}, 100);
|
||
|
});
|