@@ -287,7 +287,8 @@ describe("Result By Range Of Order", function () {
287
287
} ) ;
288
288
289
289
describe ( "Result By Test And Status" , function ( ) {
290
- before ( "navigate to Result By Test And Status" , function ( ) {
290
+ // This will run before every test case
291
+ beforeEach ( "Navigate to Results page" , function ( ) {
291
292
homePage = loginPage . goToHomePage ( ) ;
292
293
result = homePage . goToResultsByTestAndStatus ( ) ;
293
294
} ) ;
@@ -298,6 +299,18 @@ describe("Result By Test And Status", function () {
298
299
} ) ;
299
300
} ) ;
300
301
302
+ it ( "Search by TestName" , function ( ) {
303
+ cy . fixture ( "workplan" ) . then ( ( order ) => {
304
+ result . selectTestName ( order . testName ) ;
305
+ result . searchResults ( ) ;
306
+ result . expandSampleDetails ( ) ;
307
+ } ) ;
308
+ cy . fixture ( "result" ) . then ( ( res ) => {
309
+ result . selectTestMethod ( res . pcrTestMethod ) ;
310
+ } ) ;
311
+ result . submitResults ( ) ;
312
+ } ) ;
313
+
301
314
it ( "Search by Collection Date" , function ( ) {
302
315
cy . fixture ( "result" ) . then ( ( res ) => {
303
316
result . enterCollectionDate ( ) ;
@@ -307,7 +320,6 @@ describe("Result By Test And Status", function () {
307
320
result . selectTestMethod ( res . pcrTestMethod ) ;
308
321
} ) ;
309
322
result . submitResults ( ) ;
310
- cy . reload ( ) ;
311
323
} ) ;
312
324
313
325
it ( "Search by Received Date" , function ( ) {
@@ -318,7 +330,6 @@ describe("Result By Test And Status", function () {
318
330
result . selectTestMethod ( res . pcrTestMethod ) ;
319
331
} ) ;
320
332
result . submitResults ( ) ;
321
- cy . reload ( ) ;
322
333
} ) ;
323
334
324
335
it ( "Search by Sample status" , function ( ) {
@@ -329,7 +340,6 @@ describe("Result By Test And Status", function () {
329
340
result . selectTestMethod ( res . pcrTestMethod ) ;
330
341
} ) ;
331
342
result . submitResults ( ) ;
332
- cy . reload ( ) ;
333
343
} ) ;
334
344
335
345
it ( "Search by Test Analysis" , function ( ) {
@@ -340,19 +350,5 @@ describe("Result By Test And Status", function () {
340
350
result . selectTestMethod ( res . pcrTestMethod ) ;
341
351
} ) ;
342
352
result . submitResults ( ) ;
343
- cy . reload ( ) ;
344
- } ) ;
345
-
346
- it ( "Search by TestName" , function ( ) {
347
- cy . reload ( ) ;
348
- cy . fixture ( "workplan" ) . then ( ( order ) => {
349
- result . selectTestName ( order . testName ) ;
350
- result . searchResults ( ) ;
351
- result . expandSampleDetails ( ) ;
352
- } ) ;
353
- cy . fixture ( "result" ) . then ( ( res ) => {
354
- result . selectTestMethod ( res . pcrTestMethod ) ;
355
- } ) ;
356
- result . submitResults ( ) ;
357
353
} ) ;
358
354
} ) ;
0 commit comments