File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/Dataverse/templates/pp-test-ui/scripts Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ using System.Reflection;
88using System . Text . Json ;
99using System . Collections . Generic ;
1010using System . Text ;
11+ using System . Text . RegularExpressions ;
1112
1213// CONFIG
1314var dllPath = Args . Count > 0 ? Args [ 0 ] : throw new Exception ( " DLL path not provided" ) ;
@@ -51,7 +52,13 @@ foreach (var type in assembly.GetTypes())
5152 }
5253}
5354
54- // GENERATE FAKE .cs FILE
55+ // GENERATE FAKE .cs FILE
56+
57+ public string ReplaceRegexGroups ( string input )
58+ {
59+ return Regex . Replace ( input , @"\(\.\*\)" , "{string}" ) ;
60+
61+ }
5562var sb = new StringBuilder ( ) ;
5663sb . AppendLine ( "using Reqnroll;" ) ;
5764sb . AppendLine ( "namespace FakeBindingsForEditor" ) ;
@@ -61,7 +68,8 @@ sb.AppendLine(" {");
6168
6269foreach ( var step in steps )
6370{
64- sb . AppendLine ( $ " [{ step . StepType } (\" { step . Text . Replace ( "\" " , "\\ \" " ) } \" )]") ;
71+ var simplifiedText = ReplaceRegexGroups ( step . Text ) . Replace ( "\" " , "\\ \" " ) ;
72+ sb . AppendLine ( $ " [{ step . StepType } (\" { simplifiedText } \" )] ") ;
6573 sb . AppendLine ( $ " public void { step . Method } () {{ }}") ;
6674 sb . AppendLine ( ) ;
6775}
You can’t perform that action at this time.
0 commit comments