@@ -77,12 +77,9 @@ public function testTimeline()
7777 $ this ->toggle_expected ($ client , $ build , 1 );
7878
7979 // Now that we have an expected build, validate timeline data on relevant pages.
80- $ pages_to_check = ['index.php ' , ' testOverview.php ' , 'viewBuildGroup.php ' ];
80+ $ pages_to_check = ['testOverview.php ' , 'viewBuildGroup.php ' ];
8181
8282 $ answer_key = [
83- 'index.php ' => [
84- 'Test Failures ' => 1
85- ],
8683 'testOverview.php ' => [
8784 'Failing Tests ' => 1 ,
8885 'Not Run Tests ' => 1 ,
@@ -107,85 +104,6 @@ public function testTimeline()
107104 $ this ->toggle_expected ($ client , $ build , 0 );
108105 }
109106
110- public function testTimelineWithFilters ()
111- {
112- // Find the three builds we will use for this test case.
113- $ builds = [];
114- $ this ->get ($ this ->url . '/api/v1/index.php?project=InsightExample&date=2010-07-07 ' );
115- $ content = $ this ->getBrowser ()->getContent ();
116- $ jsonobj = json_decode ($ content , true );
117- foreach ($ jsonobj ['buildgroups ' ] as $ buildgroup_response ) {
118- foreach ($ buildgroup_response ['builds ' ] as $ build_response ) {
119- $ build = new Build ();
120- $ build ->Id = $ build_response ['id ' ];
121- $ build ->FillFromId ($ build ->Id );
122- $ builds [] = $ build ;
123- }
124- }
125- $ num_builds = count ($ builds );
126- if ($ num_builds != 3 ) {
127- $ this ->fail ("Expected 3 builds, found $ num_builds " );
128- }
129-
130- // Login as admin.
131- $ client = $ this ->getGuzzleClient ();
132-
133- // Mark these builds as expected.
134- foreach ($ builds as $ build ) {
135- $ this ->toggle_expected ($ client , $ build , 1 );
136- }
137-
138- // Validate timeline with filters.
139- $ filterdata_arr = [
140- 'hasdateclause ' => 0 ,
141- 'filtercombine ' => 'and ' ,
142- 'filtercount ' => 1 ,
143- 'limit ' => 0 ,
144- 'filters ' => [
145- [
146- 'field ' => 'buildname ' ,
147- 'compare ' => 63 ,
148- 'value ' => 'vs '
149- ]
150- ],
151- ];
152-
153- $ pages_to_check = ['index.php ' , 'testOverview.php ' , 'viewBuildGroup.php ' ];
154-
155- $ answer_key = [
156- 'index.php ' => [
157- 'Errors ' => 1 ,
158- 'Test Failures ' => 2
159- ],
160- 'testOverview.php ' => [
161- 'Failing Tests ' => 2 ,
162- 'Not Run Tests ' => 2 ,
163- 'Passing Tests ' => 2
164- ],
165- 'viewBuildGroup.php ' => [
166- 'Errors ' => 1 ,
167- 'Test Failures ' => 2
168- ],
169- ];
170-
171- foreach ($ pages_to_check as $ page ) {
172- $ filterdata_arr ['pageId ' ] = $ page ;
173- $ filterdata = json_encode ($ filterdata_arr );
174- $ extra_param = $ page == 'viewBuildGroup.php ' ? '&buildgroup=Nightly ' : '' ;
175- $ this ->get ($ this ->url . "/api/v1/timeline.php?date=2010-07-07&filterdata= $ filterdata&project=InsightExample $ extra_param " );
176- $ content = $ this ->getBrowser ()->getContent ();
177- $ jsonobj = json_decode ($ content , true );
178-
179- $ this ->validateExtent (1278464400000 , 1278550800000 , $ jsonobj );
180- $ this ->validatePage ($ answer_key , $ page , 1278464400000 , $ jsonobj );
181- }
182-
183- // Revert back to unexpected.
184- foreach ($ builds as $ build ) {
185- $ this ->toggle_expected ($ client , $ build , 0 );
186- }
187- }
188-
189107 private function validateExtent ($ start , $ end , $ jsonobj )
190108 {
191109 if ($ jsonobj ['extentstart ' ] != $ start ) {
0 commit comments