File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ class Hook {
1717 return this . toString ( ) + '()' ;
1818 }
1919
20+ get title ( ) {
21+ return this . ctx ?. test ?. title || this . name ;
22+ }
23+
2024 get name ( ) {
2125 return this . constructor . name ;
2226 }
Original file line number Diff line number Diff line change @@ -87,6 +87,18 @@ class ScenarioConfig {
8787 this . test . tags . push ( tagName ) ;
8888 return this ;
8989 }
90+
91+ /**
92+ * Dynamically injects dependencies, see https://codecept.io/pageobjects/#dynamic-injection
93+ * @param {Object<string, *> } dependencies
94+ * @returns {this }
95+ */
96+ injectDependencies ( dependencies ) {
97+ Object . keys ( dependencies ) . forEach ( key => {
98+ this . test . inject [ key ] = dependencies [ key ] ;
99+ } ) ;
100+ return this ;
101+ }
90102}
91103
92104module . exports = ScenarioConfig ;
You can’t perform that action at this time.
0 commit comments