Circle2PRTest00.js 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /**
  2. * Copyright (c) 2011-2013 by Andrew Mustun. All rights reserved.
  3. *
  4. * This file is part of the QCAD project.
  5. *
  6. * QCAD is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * QCAD is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with QCAD.
  18. */
  19. // Auto generated by Testing Dashboard
  20. // File : scripts/Draw/Circle/Circle2PR/Tests/Circle2PRTest00.js
  21. // Timestamp : 2011-02-28 13:46:16
  22. // Description : 2 circles, same 2 points, different radii and solutions
  23. include('scripts/Pro/Developer/TestingDashboard/TdbTest.js');
  24. function Circle2PRTest00() {
  25. TdbTest.call(this, 'scripts/Draw/Circle/Circle2PR/Tests/Circle2PRTest00.js');
  26. }
  27. Circle2PRTest00.prototype = new TdbTest();
  28. Circle2PRTest00.prototype.test00 = function() {
  29. qDebug('running Circle2PRTest00.test00()...');
  30. this.setUp();
  31. this.clickOnWidget('MainWindow::MainToolsPanel::LineToolsPanelButton');
  32. this.clickOnWidget('MainWindow::LineToolsPanel::Line2PButton');
  33. this.setZoom(10, new RVector(5, 5, 0) );
  34. var p = new RVector(14, 17.3);
  35. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  36. var p = new RVector(14, 17.3);
  37. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  38. this.setZoom(10, new RVector(5, 5, 0) );
  39. var p = new RVector(34.1, 17.1);
  40. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  41. var p = new RVector(34.1, 17.1);
  42. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  43. var p = new RVector(9.2, 25.9);
  44. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
  45. var p = new RVector(9.2, 25.9);
  46. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
  47. var p = new RVector(3.7, 28.4);
  48. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
  49. var p = new RVector(3.7, 28.4);
  50. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
  51. this.clickOnWidget('MainWindow::MainToolsPanel::CircleToolsPanelButton');
  52. this.clickOnWidget('MainWindow::CircleToolsPanel::Circle2PRButton');
  53. this.setToolOption('Circle2PR/Radius', [ 8, 0 ] );
  54. this.setToolOption('Circle2PR/Solution', 'Solution1');
  55. this.updateToolOptions();
  56. this.setZoom(10, new RVector(5, 5, 0) );
  57. var p = new RVector(13.8, 17.1);
  58. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  59. var p = new RVector(13.8, 17.1);
  60. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  61. this.setZoom(10, new RVector(5, 5, 0) );
  62. var p = new RVector(21.6, 17);
  63. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  64. var p = new RVector(21.6, 17);
  65. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  66. this.setToolOption('Circle2PR/Radius', [ 10, 0 ] );
  67. this.setToolOption('Circle2PR/Solution', 'Solution2');
  68. this.updateToolOptions();
  69. this.setZoom(10, new RVector(5, 5, 0) );
  70. var p = new RVector(34, 16.9);
  71. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  72. var p = new RVector(34, 16.9);
  73. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  74. this.setZoom(10, new RVector(5, 5, 0) );
  75. var p = new RVector(21.9, 17.1);
  76. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  77. var p = new RVector(21.9, 17.1);
  78. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  79. var p = new RVector(25.4, 10.4);
  80. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
  81. var p = new RVector(25.4, 10.4);
  82. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
  83. this.tearDown();
  84. qDebug('finished Circle2PRTest00.test00()');
  85. };