diff --git a/plugins/EditTestingList - Copy.form b/plugins/EditTestingList - Copy.form deleted file mode 100644 index 4b9d90f..0000000 --- a/plugins/EditTestingList - Copy.form +++ /dev/null @@ -1,195 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/EditTestingList.form b/plugins/EditTestingList.form index 4b9d90f..60e0dd8 100644 --- a/plugins/EditTestingList.form +++ b/plugins/EditTestingList.form @@ -16,6 +16,7 @@ + diff --git a/plugins/EditTestingList.java b/plugins/EditTestingList.java index e3bf37a..b5803e6 100644 --- a/plugins/EditTestingList.java +++ b/plugins/EditTestingList.java @@ -15,6 +15,7 @@ import java.util.Properties; import java.util.Vector; import java.util.logging.Level; import java.util.logging.Logger; +import javax.swing.ImageIcon; import javax.swing.JFileChooser; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableModel; @@ -41,7 +42,7 @@ public class EditTestingList extends javax.swing.JPanel { public EditTestingList(TableModel hDetails) { initComponents(); - //fillComponents(hDetails); + // fillComponents(hDetails); loadTests(); } @@ -214,8 +215,7 @@ public class EditTestingList extends javax.swing.JPanel { } } } - - + /** * scan tests directory, scan devices directory, search for their test cases @@ -237,7 +237,7 @@ public class EditTestingList extends javax.swing.JPanel { int iCounter = 0; //search devices and their tests //Scan the list of devices - File[] listOfFiles = (testingList.TESTS_DEVICES_DEFAULT_DIR.toFile()).listFiles(); + File[] listOfFiles = (TestingList.TESTS_DEVICES_DEFAULT_DIR.toFile()).listFiles(); for (File listOfFile : listOfFiles) { propDevice.clear(); if (listOfFile.isFile()) { @@ -259,7 +259,7 @@ public class EditTestingList extends javax.swing.JPanel { //config of device was loaded. now load the config of each test belonging to the device //sTestName = TESTS_TESTS_DEFAULT_DIR + propDevice.getProperty("tests"); //testsFolder = new File(sTestName); - testsFolder = Paths.get(testingList.TESTS_TESTS_DEFAULT_DIR.toString(), propDevice.getProperty("tests")).toFile(); + testsFolder = Paths.get(TestingList.TESTS_TESTS_DEFAULT_DIR.toString(), propDevice.getProperty("tests")).toFile(); if (testsFolder.exists() && testsFolder.isDirectory()) { File[] listOfTests = testsFolder.listFiles(); for (File listOfTest : listOfTests) { @@ -302,7 +302,32 @@ public class EditTestingList extends javax.swing.JPanel { } } + //append test info to table + private void addToTable(String deviceName, + String deviceDescription, + String testSuite, + String testName, + String testParams, + String testDescription, + String testHelp) { + try { + String sDate = ""; + if (testName.equals("") || deviceName.equals("")) { + return; + } + ImageIcon icon = null;// new ImageIcon(getClass().getResource("/icons/button_pause-16px.png")); + DefaultTableModel model = (DefaultTableModel) jTable1.getModel(); + //String testPath = FilenameUtils.separatorsToSystem(TESTS_TESTS_DEFAULT_DIR + testSuite + "/" + testName + "/" + testName + ".py"); + String testPath = Paths.get(TestingList.TESTS_TESTS_DEFAULT_DIR.toString(), testSuite, testName, testName + ".py").toString(); + model.addRow(new Object[]{false, "", sDate, deviceName, deviceDescription, testSuite, testName, testPath, testParams, testDescription, testHelp, "", "Pending", icon}); + jTable1.setModel(model); + } catch (Exception ex) { + Logger.getLogger(EditTestingList.class.getName()).log(Level.SEVERE, null, ex); + } + } + + private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable1MouseClicked if (this.jTable1.isEnabled()) { try { @@ -344,8 +369,4 @@ public class EditTestingList extends javax.swing.JPanel { private javax.swing.JScrollPane jScrollPane5; private javax.swing.JTable jTable1; // End of variables declaration//GEN-END:variables - - private void addToTable(String property, String property0, String property1, String property2, String property3, String property4, String property5) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. - } }