File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed
src/Magento/FunctionalTestingFramework Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,19 @@ public function getFilename()
8888 return $ this ->filename ;
8989 }
9090
91+ /**
92+ * Getter for the skip_test boolean
93+ *
94+ * @return string
95+ */
96+ public function isSkipped ()
97+ {
98+ if (array_key_exists ('group ' , $ this ->annotations ) && (in_array ("skip " , $ this ->annotations ['group ' ]))) {
99+ return true ;
100+ }
101+ return false ;
102+ }
103+
91104 /**
92105 * Getter for Codeception format name
93106 *
Original file line number Diff line number Diff line change @@ -1507,10 +1507,15 @@ private function generateTestPhp($test)
15071507 $ testName = str_replace (' ' , '' , $ testName );
15081508 $ testAnnotations = $ this ->generateAnnotationsPhp ($ test ->getAnnotations (), true );
15091509 $ dependencies = 'AcceptanceTester $I ' ;
1510- try {
1511- $ steps = $ this ->generateStepsPhp ($ test ->getOrderedActions ());
1512- } catch (TestReferenceException $ e ) {
1513- throw new TestReferenceException ($ e ->getMessage () . " in Test \"" . $ test ->getName () . "\"" );
1510+ if ($ test ->isSkipped ()) {
1511+ $ steps = "\t\t" . '$scenario->skip("This test is skipped"); ' . "\n" ;
1512+ $ dependencies .= ', \Codeception\Scenario $scenario ' ;
1513+ } else {
1514+ try {
1515+ $ steps = $ this ->generateStepsPhp ($ test ->getOrderedActions ());
1516+ } catch (TestReferenceException $ e ) {
1517+ throw new TestReferenceException ($ e ->getMessage () . " in Test \"" . $ test ->getName () . "\"" );
1518+ }
15141519 }
15151520
15161521 $ testPhp .= $ testAnnotations ;
You can’t perform that action at this time.
0 commit comments