ShapeRectanglePPTest01.js 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // Auto generated by Testing Dashboard
  2. // File : scripts/Draw/Shape/ShapeRectanglePP/Tests/ShapeRectanglePPTest01.js
  3. // Timestamp : 2017-03-13 15:19:49
  4. // Description :
  5. include('scripts/Pro/Developer/TestingDashboard/TdbTest.js');
  6. function ShapeRectanglePPTest01() {
  7. TdbTest.call(this, 'scripts/Draw/Shape/ShapeRectanglePP/Tests/ShapeRectanglePPTest01.js');
  8. }
  9. ShapeRectanglePPTest01.prototype = new TdbTest();
  10. ShapeRectanglePPTest01.prototype.test00 = function() {
  11. qDebug('running ShapeRectanglePPTest01.test00()...');
  12. this.setUp();
  13. TdbTest.clickOnWidget('MainWindow::CadToolBar::MainToolsPanel::ShapeToolsPanelButton');
  14. TdbTest.clickOnWidget('MainWindow::CadToolBar::ShapeToolsPanel::ShapeRectanglePPButton');
  15. this.setToolOption('Shape/CreatePolyline', 'true');
  16. this.setToolOption('Shape/Fill', 'true');
  17. this.setToolOption('Shape/RoundCorners', 'false');
  18. this.setToolOption('Shape/Radius', '1');
  19. this.updateToolOptions();
  20. this.setZoom(10, new RVector(5, 5, 0, true));
  21. var p = new RVector(10.2, 10);
  22. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  23. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  24. this.setZoom(10, new RVector(5, 5, 0, true));
  25. var p = new RVector(19.9, 29.8);
  26. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  27. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  28. this.setToolOption('Shape/CreatePolyline', 'false');
  29. this.setToolOption('Shape/Fill', 'true');
  30. this.setToolOption('Shape/RoundCorners', 'false');
  31. this.setToolOption('Shape/Radius', '1');
  32. this.updateToolOptions();
  33. this.setZoom(10, new RVector(5, 5, 0, true));
  34. var p = new RVector(29.8, 9.9);
  35. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  36. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  37. this.setZoom(10, new RVector(5, 5, 0, true));
  38. var p = new RVector(40.1, 30);
  39. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  40. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  41. this.setToolOption('Shape/CreatePolyline', 'false');
  42. this.setToolOption('Shape/Fill', 'false');
  43. this.setToolOption('Shape/RoundCorners', 'false');
  44. this.setToolOption('Shape/Radius', '1');
  45. this.updateToolOptions();
  46. this.setToolOption('Shape/CreatePolyline', 'false');
  47. this.setToolOption('Shape/Fill', 'false');
  48. this.setToolOption('Shape/RoundCorners', 'false');
  49. this.setToolOption('Shape/Radius', '1');
  50. this.updateToolOptions();
  51. var p = new RVector(45.4, 12.4);
  52. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.MidButton, 4, 0);
  53. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.MidButton, 0, 0);
  54. this.setZoom(10, new RVector(-9.2, 4.6, 0, true));
  55. var p = new RVector(49.9, 10.2);
  56. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  57. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  58. this.setZoom(10, new RVector(-9.2, 4.6, 0, true));
  59. var p = new RVector(60, 30);
  60. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  61. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  62. var p = new RVector(54.7, 16.5);
  63. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
  64. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
  65. var p = new RVector(54.5, 18.4);
  66. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
  67. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
  68. this.verifyDrawing('ShapeRectanglePPTest01_000.dxf');
  69. this.tearDown();
  70. qDebug('finished ShapeRectanglePPTest01.test00()');
  71. };