UNPKG

siesta-lite

Version:

Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers

49 lines (37 loc) 1.45 kB
describe('Using host page when recording then playing test back', function (t) { t.expectGlobal("0") t.getHarness( { autoRun : false, viewDOM : true, scaleToFit : false }, [ { hostPageUrl : '../testpages/testpage1.html', url : 'testfiles/601_siesta_ui_passing.t.js' } ] ); t.chain( { waitFor : 'harnessReady' }, function (next) { // sometimes dom container is still collapsed (probably because of cookies sharing between the project page // in different tests t.cq1('domcontainer').expand(false); next() }, { runFirstTest : [] }, { click : ">>button[action=toggle-recorder]" }, function (next) { // Do not ignore recording synthetic events t.cq1('>>recorderpanel').getRecorder().ignoreSynthetic = false; next() }, { click : ">>recorderpanel button[action=recorder-start]" }, { click : "iframe.tr-iframe -> button" }, { waitForSelector : '.x-grid-cell:contains(.someclass)'}, { click : ">>recorderpanel button[action=recorder-play]" }, { waitForEvent : [ Harness, 'testsuiteend' ] }, function() { // View should still have one record in it t.expect(t.cq1('>>recorderpanel').store.getCount()).toBe(1); } ); })