HatchFromSelectionTest08.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Auto generated by Testing Dashboard
  2. // File : scripts/Draw/Hatch/HatchFromSelection/Tests/HatchFromSelectionTest08.js
  3. // Timestamp : 2015-11-24 14:42:44
  4. // Description :
  5. include('scripts/Pro/Developer/TestingDashboard/TdbTest.js');
  6. function HatchFromSelectionTest08() {
  7. TdbTest.call(this, 'scripts/Draw/Hatch/HatchFromSelection/Tests/HatchFromSelectionTest08.js');
  8. }
  9. HatchFromSelectionTest08.prototype = new TdbTest();
  10. HatchFromSelectionTest08.prototype.test00 = function() {
  11. qDebug('running HatchFromSelectionTest08.test00()...');
  12. this.setUp();
  13. this.importFile('scripts/Draw/Hatch/HatchFromSelection/Tests/data/hatch_block_line.dxf');
  14. TdbTest.clickOnWidget('MainWindow::CadToolBar::MainToolsPanel::SelectToolsPanelButton');
  15. TdbTest.clickOnWidget('MainWindow::CadToolBar::SelectToolsPanel::SelectAllButton');
  16. TdbTest.clickOnWidget('MainWindow::CadToolBar::SelectToolsPanel::BackButton');
  17. this.dlgStart();
  18. this.dlgAppendCode('var map = new Map()');
  19. this.dlgAppendCode("map.put('DialogOpenedByTdb/Type', 'HatchPattern')");
  20. this.dlgAppendCode("map.put('DialogOpenedByTdb/Pattern', 'ANSI31')");
  21. this.dlgAppendCode("map.put('DialogOpenedByTdb/Scale', '1.0')");
  22. this.dlgAppendCode("map.put('DialogOpenedByTdb/Angle', '0.0')");
  23. this.dlgAppendCode("WidgetFactory.restoreState(dialog, 'DialogOpenedByTdb', undefined, false, undefined, map)");
  24. this.dlgEnd();
  25. this.clickOnWidget('MainWindow::MainToolsPanel::HatchToolsPanelButton');
  26. this.clickOnWidget('MainWindow::HatchToolsPanel::HatchFromSelectionButton');
  27. this.setZoom(17.65289256198347, new RVector(-8.4588, -7.48081, 0, true));
  28. var p = new RVector(34.63015, 8.670412);
  29. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  30. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  31. this.verifyDrawing('HatchFromSelectionTest08_000.dxf');
  32. this.tearDown();
  33. qDebug('finished HatchFromSelectionTest08.test00()');
  34. };