Sha256: d09002e208c1b3f05406980ac863c3065d9345baaf4aac5ac1344a23777e6995

Contents?: true

Size: 1.87 KB

Versions: 7

Compression:

Stored size: 1.87 KB

Contents

//describe('pageflow.sitemap.ViewModel', function() {
//  var f = support.factories;
//  var p = pageflow;
//  var s = window.sitemap;
//
//  it('sets selected property on pages from selection', function() {
//    var entry = f.entry();
//    var chapter = f.chapter(entry);
//    var page = f.page(chapter);
//    var selection = new s.Selection();
//
//    selection.select('pages', [page]);
//    var viewModel = new s.ViewModel(entry, selection);
//
//    expect(viewModel.pages[0].selected).to.eq(true);
//  });
//
//  it('applies dragDx and dragDy to selected page', function() {
//    var entry = f.entry();
//    var chapter = f.chapter(entry);
//    var page = f.page(chapter);
//    var selection = new s.Selection();
//
//    selection.select('pages', [page]);
//    var viewModel = new s.ViewModel(entry, selection, {dragDx: 10, dragDy: 10});
//
//    expect(viewModel.pages[0].x).to.eq(10);
//    expect(viewModel.pages[0].y).to.eq(10);
//  });
//
//  it('does not apply dragDx and dragDy to unselected page', function() {
//    var entry = f.entry();
//    var chapter = f.chapter(entry);
//    var page = f.page(chapter);
//    var selection = new s.Selection();
//
//    var viewModel = new s.ViewModel(entry, selection, {dragDx: 10, dragDy: 10});
//
//    expect(viewModel.pages[0].x).to.eq(0);
//    expect(viewModel.pages[0].y).to.eq(0);
//  });
//
//  describe('chapters[].virtualPages', function() {
//    it('contains non selected pages of chapter', function() {
//      var entry = f.entry();
//      var chapter = f.chapter(entry, {configuration: {lane: 1, row: 1}});
//      var otherChapter = f.chapter(entry, {configuration: {lane: 2, row: 1}});
//      var page = f.page(chapter);
//      var selection = new s.Selection();
//
//      var viewModel = new s.ViewModel(entry, selection);
//
//      expect(viewModel.chapters[0].virtualPages).to.deep.eq([page]);
//    });
//  });
//});

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pageflow-sitemap-1.5.0 spec/javascripts/pageflow/sitemap/editor/d3/view_model_spec.js
pageflow-sitemap-1.4.0 spec/javascripts/pageflow/sitemap/editor/d3/view_model_spec.js
pageflow-sitemap-1.3.0 spec/javascripts/pageflow/sitemap/editor/d3/view_model_spec.js
pageflow-sitemap-1.2.0 spec/javascripts/pageflow/sitemap/editor/d3/view_model_spec.js
pageflow-sitemap-1.1.0 spec/javascripts/pageflow/sitemap/editor/d3/view_model_spec.js
pageflow-sitemap-1.0.0 spec/javascripts/pageflow/sitemap/editor/d3/view_model_spec.js
pageflow-sitemap-0.1.0 spec/javascripts/pageflow/sitemap/editor/d3/view_model_spec.js