Changeset 243358 in webkit
- Timestamp:
- Mar 21, 2019, 8:34:28 PM (7 years ago)
- Location:
- trunk/Websites/perf.webkit.org
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
browser-tests/custom-analysis-task-configurator-tests.js (modified) (1 diff)
-
public/v3/components/custom-analysis-task-configurator.js (modified) (2 diffs)
-
public/v3/components/custom-configuration-test-group-form.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Websites/perf.webkit.org/ChangeLog
r243123 r243358 1 2019-03-21 Dewei Zhu <dewei_zhu@apple.com> 2 3 'custom-configuration-test-group-form' should update test name when selected test or platform changes. 4 https://bugs.webkit.org/show_bug.cgi?id=196114 5 6 Reviewed by Ryosuke Niwa. 7 8 r240104 fixes commit sets unnecessarily get updated even there is no change. 9 However, this made changing test or platform no longer triggers 'commitSetChange' action. 10 Test name should change not only when 'commitSet' gets change, but also platform or test changes. 11 Renaming the action name from 'commitSetChange' to a more accurate description 'testConfigChange'. 12 Dispatch 'testConfigChange' when platform or test changes. 13 14 * browser-tests/custom-analysis-task-configurator-tests.js: Changed action name to 'commitSetChange'. 15 * public/v3/components/custom-analysis-task-configurator.js: 16 (CustomAnalysisTaskConfigurator.prototype._didUpdateSelectedPlatforms): Should dispatch 'commitSetChange' action. 17 (CustomAnalysisTaskConfigurator.prototype._updateCommitSetMap): Changed action name to 'commitSetChange'. 18 * public/v3/components/custom-configuration-test-group-form.js: Added a unit test for this change. 19 (CustomConfigurationTestGroupForm.prototype.didConstructShadowTree): 20 1 21 2019-03-18 Dewei Zhu <dewei_zhu@apple.com> 2 22 -
trunk/Websites/perf.webkit.org/browser-tests/custom-analysis-task-configurator-tests.js
r240104 r243358 232 232 expect(customAnalysisTaskConfigurator.content('baseline-revision-table').querySelector('input').value).to.be(''); 233 233 }); 234 235 it('Should dispatch "testConfigChange" action when selected platform changed', async () => { 236 const context = new BrowsingContext(); 237 const customAnalysisTaskConfigurator = await createCustomAnalysisTaskConfiguratorWithContext(context); 238 let testConfigChangeActionCount = 0; 239 context.symbols.CustomAnalysisTaskConfigurator.commitFetchInterval = 1; 240 241 customAnalysisTaskConfigurator.listenToAction("testConfigChange", () => testConfigChangeActionCount += 1); 242 243 const test = new context.symbols.Test(1, {name: 'Speedometer'}); 244 const mojave = new context.symbols.Platform(1, { 245 name: 'Mojave', 246 metrics: [ 247 new context.symbols.Metric(1, { 248 name: 'Allocation', 249 aggregator: 'Arithmetic', 250 test 251 }) 252 ], 253 lastModifiedByMetric: Date.now(), 254 }); 255 const highSierra = new context.symbols.Platform(2, { 256 name: 'High Sierra', 257 metrics: [ 258 new context.symbols.Metric(1, { 259 name: 'Allocation', 260 aggregator: 'Arithmetic', 261 test 262 }) 263 ], 264 lastModifiedByMetric: Date.now(), 265 }); 266 const repository = context.symbols.Repository.ensureSingleton(1, {name: 'WebKit'}); 267 const triggerableRepositoryGroup = new context.symbols.TriggerableRepositoryGroup(1, {repositories: [{repository}]}); 268 new context.symbols.Triggerable(1, { 269 name: 'test-triggerable', 270 isDisabled: false, 271 repositoryGroups: [triggerableRepositoryGroup], 272 configurations: [{test, platform: mojave}, {test, platform: highSierra}], 273 }); 274 customAnalysisTaskConfigurator.selectTests([test]); 275 customAnalysisTaskConfigurator.selectPlatform(mojave); 276 277 await waitForComponentsToRender(context); 278 expect(testConfigChangeActionCount).to.be(2); 279 280 const requests = context.symbols.MockRemoteAPI.requests; 281 expect(requests.length).to.be(1); 282 expect(requests[0].url).to.be('/api/commits/1/latest?platform=1'); 283 requests[0].reject(); 284 285 customAnalysisTaskConfigurator.content('baseline-revision-table').querySelector('input').value = '123'; 286 customAnalysisTaskConfigurator.content('baseline-revision-table').querySelector('input').dispatchEvent(new Event('input')); 287 await sleep(context.symbols.CustomAnalysisTaskConfigurator.commitFetchInterval); 288 expect(requests.length).to.be(2); 289 expect(requests[1].url).to.be('/api/commits/1/123'); 290 291 customAnalysisTaskConfigurator._configureComparison(); 292 await waitForComponentsToRender(context); 293 expect(testConfigChangeActionCount).to.be(3); 294 295 customAnalysisTaskConfigurator.selectPlatform(highSierra); 296 await waitForComponentsToRender(context); 297 expect(testConfigChangeActionCount).to.be(4); 298 }); 234 299 }); -
trunk/Websites/perf.webkit.org/public/v3/components/custom-analysis-task-configurator.js
r240104 r243358 61 61 } 62 62 this._updateCommitSetMap(); 63 this.dispatchAction('testConfigChange'); 63 64 this.enqueueToRender(); 64 65 } … … 337 338 this._commitSetMap = {'Baseline': newBaseline, 'Comparison': newComparison}; 338 339 339 this.dispatchAction(' commitSetChange');340 this.dispatchAction('testConfigChange'); 340 341 this.enqueueToRender(); 341 342 } -
trunk/Websites/perf.webkit.org/public/v3/components/custom-configuration-test-group-form.js
r233884 r243358 50 50 super.didConstructShadowTree(); 51 51 52 this.part('configurator').listenToAction(' commitSetChange', () => this.enqueueToRender());52 this.part('configurator').listenToAction('testConfigChange', () => this.enqueueToRender()); 53 53 54 54 this.content('task-name').oninput = () => this.enqueueToRender();
Note:
See TracChangeset
for help on using the changeset viewer.