diff --git a/apps/demos/testing/widgets/charts/Export.test.js b/apps/demos/testing/widgets/charts/Export.test.js new file mode 100644 index 000000000000..a3f9ccbea148 --- /dev/null +++ b/apps/demos/testing/widgets/charts/Export.test.js @@ -0,0 +1,25 @@ +import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; +import { Selector as $ } from 'testcafe'; +import { runManualTest } from '../../../utils/visual-tests/matrix-test-helper'; +import { testScreenshot } from '../../../utils/visual-tests/helpers/theme-utils'; + +fixture('Charts.Export') + .page('http://localhost:8080/') + .before(async (ctx) => { + ctx.initialWindowSize = [900, 600]; + }); + +runManualTest('Charts', 'ExportCustomMarkup', ['jQuery', 'React', 'Vue', 'Angular'], (test) => { + test('Export', async (t) => { + let dialogAppeared = false; + + await t.setNativeDialogHandler(() => { + dialogAppeared = true; + return false; + }); + + await t.click('dx-button[icon=export]'); + + await t.expect(dialogAppeared).ok('Save dialog should appear'); + }); +});