LinesSnapCoordinate.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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/Line/Line2P/Tests/LinesSnapCoordinate.js
  21. // Timestamp : 2011-02-11 16:32:54
  22. // Description : Lines drawn with coordinate snap
  23. include('scripts/Pro/Developer/TestingDashboard/TdbTest.js');
  24. function LinesSnapCoordinate() {
  25. TdbTest.call(this, 'scripts/Draw/Line/Line2P/Tests/LinesSnapCoordinate.js');
  26. }
  27. LinesSnapCoordinate.prototype = new TdbTest();
  28. LinesSnapCoordinate.prototype.test00 = function() {
  29. qDebug('running LinesSnapCoordinate.test00()...');
  30. this.setUp();
  31. this.clickOnWidget('MainWindow::MainToolsPanel::LineToolsPanelButton');
  32. this.clickOnWidget('MainWindow::LineToolsPanel::Line2PButton');
  33. this.clickOnWidget('MainWindow::SnapToolsPanel::SnapCoordinateButton');
  34. this.setToolOption('SnapCoordinate/X', [ 0, 0 ] );
  35. this.setToolOption('SnapCoordinate/Y', [ 0, 0 ] );
  36. this.setToolOption('SnapCoordinate/Relative', 'false');
  37. this.updateToolOptions();
  38. this.clickOnWidget('MainWindow::Options::Set');
  39. this.setToolOption('SnapCoordinate/X', [ 10, 0 ] );
  40. this.setToolOption('SnapCoordinate/Y', [ 10, 0 ] );
  41. this.setToolOption('SnapCoordinate/Relative', 'false');
  42. this.updateToolOptions();
  43. this.clickOnWidget('MainWindow::Options::Set');
  44. this.setToolOption('SnapCoordinate/X', [ 20, 0 ] );
  45. this.setToolOption('SnapCoordinate/Y', [ 10, 0 ] );
  46. this.setToolOption('SnapCoordinate/Relative', 'false');
  47. this.updateToolOptions();
  48. this.clickOnWidget('MainWindow::Options::Set');
  49. this.setToolOption('SnapCoordinate/X', [ 0, 0 ] );
  50. this.setToolOption('SnapCoordinate/Y', [ 0, 0 ] );
  51. this.setToolOption('SnapCoordinate/Relative', 'false');
  52. this.updateToolOptions();
  53. this.clickOnWidget('MainWindow::Options::Set');
  54. this.sendMouseEventToGv(QEvent.MouseButtonPress, new QPoint(232, 117), Qt.RightButton, 2, 0);
  55. this.sendMouseEventToGv(QEvent.MouseButtonRelease, new QPoint(232, 117), Qt.RightButton, 0, 0);
  56. this.sendMouseEventToGv(QEvent.MouseButtonPress, new QPoint(204, 124), Qt.RightButton, 2, 0);
  57. this.sendMouseEventToGv(QEvent.MouseButtonRelease, new QPoint(204, 124), Qt.RightButton, 0, 0);
  58. this.sendMouseEventToGv(QEvent.MouseButtonPress, new QPoint(182, 240), Qt.RightButton, 2, 0);
  59. this.sendMouseEventToGv(QEvent.MouseButtonRelease, new QPoint(182, 240), Qt.RightButton, 0, 0);
  60. this.verifyDrawing('LinesSnapCoordinate_000.dxf');
  61. this.tearDown();
  62. qDebug('finished LinesSnapCoordinate.test00()');
  63. };