UNPKG

siesta-lite

Version:

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

61 lines (40 loc) 2.17 kB
StartTest(function (t) { var siestaRoot = window.top.location.href.substring(0, window.top.location.href.toLowerCase().indexOf('siesta') + 7); var guidesRoot = siestaRoot + 'resources/docs/guides'; t.afterEach(function() { t.clearHighlight(); }) t.it('resources/docs/guides/getting_started_browser/images/demo.png', function (t) { t.chain( { waitFor : 'waitForViewRendered', args : '>>testgrid gridview' }, { click : 'treefilter => .fa-close' }, { waitForEvent : [t.global.project, 'testfinalize'], trigger : { dblclick : '.x-grid-item:contains(basic_form)' } }, { screenshot : 'build/doc-images/guides/getting_started_browser/images/demo.png' } ) }) t.it('resources/docs/guides/getting_started_browser/images/synopsys.png', function (t) { t.chain( { setUrl : guidesRoot + '/getting_started_browser/tests' }, { click : 'treefilter => .fa-close' }, { waitForEvent : function() { return [t.global.project, 'testsuiteend'] }, trigger : { click : '>>[actionName=run-all]' } }, { waitForTextNotPresent : [ 'not found' ] }, { screenshot : 'build/doc-images/guides/getting_started_browser/images/synopsys.png' } ) }) t.it('resources/docs/guides/getting_started_browser/images/ui-context-menu.png', function (t) { t.chain( { setUrl : guidesRoot + '/getting_started_browser/tests' }, { rightclick : 'testgrid => .x-grid-item', offset : [10, 10] }, { spotlight : '>>testgridcontextmenu'}, { screenshot : 'build/doc-images/guides/getting_started_browser/images/ui-context-menu.png' } ) }) t.it('resources/docs/guides/getting_started_browser/images/ui-options-button.png', function (t) { t.chain( { setUrl : guidesRoot + '/getting_started_browser/tests' }, { click : '>>testgrid [action=options]' }, { spotlight : '>>#tool-menu'}, { screenshot : 'build/doc-images/guides/getting_started_browser/images/ui-options-button.png' } ) }) })