MCPcopy
hub / github.com/layerJS/layerJS / showState

Function showState

test/spec/state_spec.js:313–331  ·  view source on GitHub ↗
(html, states, expectedState, expectedFrameName, done)

Source from the content-addressed store, hash-verified

311 });
312
313 function showState(html, states, expectedState, expectedFrameName, done) {
314 utilities.setHtml(html);
315
316 var layerView1 = document.querySelector("[data-lj-type='layer']")._ljView;
317
318 state.showState(states);
319
320 setTimeout(function() {
321 if (expectedFrameName === '!none') {
322 expect(layerView1.currentFrame).toBe(null);
323 } else {
324 expect(layerView1.currentFrame.name()).toBe(expectedFrameName);
325 }
326
327 var exportedState = state.exportState();
328 expect(exportedState).toEqual(expectedState);
329 done();
330 }, 1000);
331 }
332
333 describe('can show to a named state', function() {
334 var html = "<div data-lj-type='stage' id='stage1'>" +

Callers 1

state_spec.jsFile · 0.85

Calls 1

setTimeoutFunction · 0.85

Tested by

no test coverage detected