ngx-fullpage
Version:
Angular fullpage scrolling
60 lines • 3.26 kB
JavaScript
/**
* @author Meiblorn (Vadim Fedorenko) <meiblorn@gmail.com | admin@meiblorn.com> on 15/05/16.
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { async, TestBed } from '@angular/core/testing';
import { Component, Input } from '@angular/core';
import { MnFullpageOptions } from './mnFullpage-options.class';
import { MnFullpageModule } from '@fullpage/mnFullpage.module';
describe('mnFullpage directive spec', function () {
var TestComponent = /** @class */ (function () {
function TestComponent() {
this.options = MnFullpageOptions.create({
controlArrows: false,
scrollingSpeed: 1000,
css3: true
});
}
__decorate([
Input(),
__metadata("design:type", MnFullpageOptions)
], TestComponent.prototype, "options", void 0);
TestComponent = __decorate([
Component({
template: "\n <!--suppress HtmlUnknownAttribute -->\n <div id=\"content-wrapper\" [mnFullpage]=\"options\">\n <div class=\"section fp-section fp-table\">\n <div class=\"fp-tableCell\">\n First section\n </div>\n </div>\n <div class=\"section fp-section fp-table\">\n <div class=\"fp-tableCell\">\n Second section\n </div>\n </div>\n </div>\n ",
})
], TestComponent);
return TestComponent;
}());
beforeEach(async(function () {
TestBed.configureTestingModule({
imports: [
MnFullpageModule.forRoot()
],
declarations: [
TestComponent
]
}).compileComponents();
}));
it('compiled element should have fullpage-wrapper class, 100% height style', function () {
TestBed.compileComponents().then(function () {
var fixture = TestBed.createComponent(TestComponent);
fixture.autoDetectChanges(true);
fixture.whenRenderingDone().then(function () {
var compiled = fixture.debugElement.nativeElement.children[0];
expect(compiled.id).toEqual('content-wrapper');
expect(compiled.classList.contains('fullpage-wrapper')).toBeTruthy();
expect(compiled.style.height).toEqual('100%');
});
});
});
});
//# sourceMappingURL=mnFullpage.directive.spec.js.map