@@ -69,6 +69,74 @@ void fullMatch() {
6969 assertThat (slotMatcher .matches (stereotype , capabilities )).isTrue ();
7070 }
7171
72+ @ Test
73+ void fullMatchWithTestMetadata () {
74+ Capabilities stereotype =
75+ new ImmutableCapabilities (
76+ CapabilityType .BROWSER_NAME , "chrome" , CapabilityType .PLATFORM_NAME , Platform .LINUX );
77+ Capabilities capabilities =
78+ new ImmutableCapabilities (
79+ CapabilityType .BROWSER_NAME ,
80+ "chrome" ,
81+ CapabilityType .PLATFORM_NAME ,
82+ Platform .LINUX ,
83+ "se:name" ,
84+ "testName" );
85+ assertThat (slotMatcher .matches (stereotype , capabilities )).isTrue ();
86+ }
87+
88+ @ Test
89+ void fullMatchWithVideoRecording () {
90+ Capabilities stereotype =
91+ new ImmutableCapabilities (
92+ CapabilityType .BROWSER_NAME ,
93+ "chrome" ,
94+ CapabilityType .PLATFORM_NAME ,
95+ Platform .LINUX ,
96+ "se:noVncPort" ,
97+ 7900 ,
98+ "se:vncEnabled" ,
99+ true ,
100+ "se:containerName" ,
101+ "my-container" );
102+ Capabilities capabilities =
103+ new ImmutableCapabilities (
104+ CapabilityType .BROWSER_NAME ,
105+ "chrome" ,
106+ CapabilityType .PLATFORM_NAME ,
107+ Platform .LINUX ,
108+ "se:recordVideo" ,
109+ true ,
110+ "se:screenResolution" ,
111+ "1920x1080" );
112+ assertThat (slotMatcher .matches (stereotype , capabilities )).isTrue ();
113+ }
114+
115+ @ Test
116+ void notMatchWithTestMetadata () {
117+ Capabilities stereotype =
118+ new ImmutableCapabilities (
119+ CapabilityType .BROWSER_NAME ,
120+ "chrome" ,
121+ CapabilityType .PLATFORM_NAME ,
122+ Platform .LINUX ,
123+ "myApp:version" ,
124+ "beta" );
125+ Capabilities capabilities =
126+ new ImmutableCapabilities (
127+ CapabilityType .BROWSER_NAME ,
128+ "chrome" ,
129+ CapabilityType .PLATFORM_NAME ,
130+ Platform .LINUX ,
131+ "se:recordVideo" ,
132+ true ,
133+ "se:name" ,
134+ "testName" ,
135+ "myApp:version" ,
136+ "stable" );
137+ assertThat (slotMatcher .matches (stereotype , capabilities )).isFalse ();
138+ }
139+
72140 @ Test
73141 void matchesBrowserAndVersion () {
74142 Capabilities stereotype =
0 commit comments