|
15 | 15 | */ |
16 | 16 | package org.labkey.test.pipeline; |
17 | 17 |
|
| 18 | +import org.apache.commons.lang3.StringUtils; |
18 | 19 | import org.labkey.test.BaseWebDriverTest; |
19 | 20 | import org.labkey.test.Locator; |
20 | 21 | import org.labkey.test.components.Component; |
@@ -115,26 +116,39 @@ public void validate(PipelineTestParams tp) |
115 | 116 | String[] names = tp.getExperimentLinks(); |
116 | 117 | for (String name : names) |
117 | 118 | { |
118 | | - assertNodePresent(name); |
119 | | - String baseName = getBaseName(tp); |
120 | | - assertInputPresent(tp.getParametersFile()); |
121 | | - for (String inputExt : tp.getInputExtensions()) |
122 | | - assertInputPresent(baseName + inputExt); |
123 | | - for (String outputExt : tp.getOutputExtensions()) |
124 | | - assertOutputPresent(baseName + outputExt); |
| 119 | + if (getWrapper().isTextPresent(name)) |
| 120 | + { |
| 121 | + assertNodePresent(name); |
| 122 | + String baseName = getBaseName(tp); |
| 123 | + assertInputPresent(tp.getParametersFile()); |
| 124 | + for (String inputExt : tp.getInputExtensions()) |
| 125 | + assertInputPresent(baseName + inputExt); |
| 126 | + for (String outputExt : tp.getOutputExtensions()) |
| 127 | + assertOutputPresent(baseName + outputExt); |
| 128 | + return; |
| 129 | + } |
125 | 130 | } |
| 131 | + |
| 132 | + assertTrue("Unable to find experiment links: " + StringUtils.join(names, ", "), false); |
126 | 133 | } |
127 | 134 |
|
128 | 135 | private String getBaseName(PipelineTestParams tp) |
129 | 136 | { |
130 | 137 | String[] sampleNames = tp.getSampleNames(); |
131 | | - for (String sampleName : sampleNames) |
| 138 | + if (sampleNames.length == 0) |
| 139 | + { |
| 140 | + // AbstractMS2SearchProtocol.getJoinedBaseName() is hard-coded to use "all" |
| 141 | + return "all"; |
| 142 | + } |
| 143 | + else |
132 | 144 | { |
133 | | - if (getWrapper().isTextPresent(sampleName)) |
134 | | - return sampleName; |
| 145 | + for (String sampleName : sampleNames) |
| 146 | + { |
| 147 | + if (getWrapper().isTextPresent(sampleName)) |
| 148 | + return sampleName; |
| 149 | + } |
135 | 150 | } |
136 | 151 |
|
137 | | - // AbstractMS2SearchProtocol.getJoinedBaseName() is hard-coded to use "all" |
138 | 152 | // Probably fail later, but simpler than checking for null return. |
139 | 153 | return "all"; |
140 | 154 | } |
|
0 commit comments