DimHorizontalTest00.js 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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/Dimension/DimHorizontal/Tests/DimHorizontalTest00.js
  21. // Timestamp : 2011-04-27 09:34:36
  22. // Description :
  23. include('scripts/Pro/Developer/TestingDashboard/TdbTest.js');
  24. function DimHorizontalTest00() {
  25. TdbTest.call(this, 'scripts/Draw/Dimension/DimHorizontal/Tests/DimHorizontalTest00.js');
  26. }
  27. DimHorizontalTest00.prototype = new TdbTest();
  28. DimHorizontalTest00.prototype.test00 = function() {
  29. qDebug('running DimHorizontalTest00.test00()...');
  30. this.setUp();
  31. this.importFile('scripts/Draw/Dimension/Tests/drawing00.dxf');
  32. TdbTest.clickOnWidget('MainWindow::CadToolBar::MainToolsPanel::DimensionToolsPanelButton');
  33. TdbTest.clickOnWidget('MainWindow::CadToolBar::DimensionToolsPanel::DimHorizontalButton');
  34. this.setToolOption('Dimension/Prefix', '(No prefix)');
  35. this.setToolOption('Dimension/Text', '');
  36. this.setToolOption('Dimension/UpperTolerance', '');
  37. this.setToolOption('Dimension/LowerTolerance', '');
  38. this.updateToolOptions();
  39. this.setZoom(10.357815442561206, new RVector(6.27885, -2.65002, 0) );
  40. var p = new RVector(6.07897, 37.020197);
  41. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  42. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  43. this.setZoom(10.357815442561206, new RVector(6.27885, -2.65002, 0) );
  44. var p = new RVector(35.042606, 33.158379);
  45. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  46. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  47. this.setZoom(10.357815442561206, new RVector(6.27885, -2.65002, 0) );
  48. var p = new RVector(34.559879, 40.013106);
  49. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  50. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  51. this.setToolOption('Dimension/Prefix', '\u25FB (Square)');
  52. this.setToolOption('Dimension/Text', '12345');
  53. this.setToolOption('Dimension/UpperTolerance', '0.1');
  54. this.setToolOption('Dimension/LowerTolerance', '0.2');
  55. this.updateToolOptions();
  56. this.setZoom(10.357815442561206, new RVector(6.27885, -2.65002, 0) );
  57. var p = new RVector(10.616606, 19.159288);
  58. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  59. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  60. this.setZoom(10.357815442561206, new RVector(6.27885, -2.65002, 0) );
  61. var p = new RVector(30.794606, 19.159288);
  62. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  63. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  64. this.setZoom(10.357815442561206, new RVector(6.27885, -2.65002, 0) );
  65. var p = new RVector(31.277333, 7.380742);
  66. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  67. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  68. this.setToolOption('Dimension/Prefix', '(No prefix)');
  69. this.setToolOption('Dimension/Text', '');
  70. this.setToolOption('Dimension/UpperTolerance', '');
  71. this.setToolOption('Dimension/LowerTolerance', '');
  72. this.updateToolOptions();
  73. this.setZoom(10.357815442561206, new RVector(6.27885, -2.65002, 0) );
  74. var p = new RVector(24.13297, 14.428561);
  75. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  76. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  77. this.setZoom(10.357815442561206, new RVector(6.27885, -2.65002, 0) );
  78. var p = new RVector(30.118788, 19.931652);
  79. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  80. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  81. this.setZoom(10.357815442561206, new RVector(6.27885, -2.65002, 0) );
  82. var p = new RVector(34.849515, 24.85547);
  83. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  84. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  85. var p = new RVector(37.842424, 22.441833);
  86. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.RightButton, 2, 0);
  87. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.RightButton, 0, 0);
  88. this.setZoom(10.357815442561206, new RVector(6.27885, -2.65002, 0) );
  89. var p = new RVector(36.490788, 26.110561);
  90. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  91. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  92. this.setZoom(10.357815442561206, new RVector(6.27885, -2.65002, 0) );
  93. var p = new RVector(2.313697, 27.848379);
  94. this.sendMouseEventModelPos(QEvent.MouseButtonPress, p, Qt.LeftButton, 1, 0);
  95. this.sendMouseEventModelPos(QEvent.MouseButtonRelease, p, Qt.LeftButton, 0, 0);
  96. this.verifyDrawing('DimHorizontalTest00_000.dxf');
  97. this.tearDown();
  98. qDebug('finished DimHorizontalTest00.test00()');
  99. };