row = _.findWhere(this.model.get('source'), { line: line }),
url = baseUrl + '/api/tests/list',
options = {
- sourceFileUuid: this.model.id,
+ sourceFileId: this.model.id,
sourceFileLineNumber: line,
ps: 1000
};
requestTests: function () {
var that = this,
url = baseUrl + '/api/tests/list',
- options = { testFileUuid: this.model.id };
+ options = { testFileId: this.model.id };
return $.get(url, options).done(function (data) {
that.model.set({ tests: data.tests });
that.testSorting = 'status';
showTest: function (e) {
var that = this,
- testUuid = $(e.currentTarget).data('id'),
+ testId = $(e.currentTarget).data('id'),
url = baseUrl + '/api/tests/covered_files',
- options = { testUuid: testUuid };
+ options = { testId: testId };
this.testsScroll = $(e.currentTarget).scrollParent().scrollTop();
return $.get(url, options).done(function (data) {
that.coveredFiles = data.files;
- that.selectedTest = _.findWhere(that.model.get('tests'), { testUuid: testUuid });
+ that.selectedTest = _.findWhere(that.model.get('tests'), { id: testId });
that.render();
});
},
template: Templates['source-viewer-coverage-popup'],
events: {
- 'click a[data-uuid]': 'goToFile'
+ 'click a[data-id]': 'goToFile'
},
onRender: function () {
goToFile: function (e) {
e.stopPropagation();
- var uuid = $(e.currentTarget).data('uuid');
+ var id = $(e.currentTarget).data('id');
var RealWorkspace = Workspace.openComponent ? Workspace : require('components/workspace/main');
- RealWorkspace.openComponent({ uuid: uuid });
+ RealWorkspace.openComponent({ uuid: id });
},
serializeData: function () {
var row = this.options.row || {},
- tests = _.groupBy(this.collection.toJSON(), 'fileUuid'),
+ tests = _.groupBy(this.collection.toJSON(), 'fileId'),
testFiles = _.map(tests, function (testSet) {
var test = testSet[0];
return {
file: {
- uuid: test.fileUuid,
+ id: test.fileId,
longName: test.fileLongName
},
tests: testSet
{{#ifTestData this}}
<td class="source-viewer-test-status note">{{testStatusIcon status}}</td>
<td class="source-viewer-test-duration note">{{durationInMs}}ms</td>
- <td class="source-viewer-test-name"><a class="js-show-test" data-id="{{testUuid}}">{{name}}</a></td>
+ <td class="source-viewer-test-name"><a class="js-show-test" data-id="{{id}}">{{name}}</a></td>
<td class="source-viewer-test-covered-lines note">{{coveredLines}}</td>
{{else}}
<td class="source-viewer-test-status note">{{testStatusIcon status}}</td>
</div>
{{#each testFiles}}
- {{log this}}
<div class="bubble-popup-section">
- <a class="component-viewer-popup-test-file link-action" data-uuid="{{file.uuid}}" title="{{file.longName}}">
+ <a class="component-viewer-popup-test-file link-action" data-id="{{file.id}}" title="{{file.longName}}">
<span>{{collapsedDirFromPath file.longName}}</span><span class="component-name-file">{{fileFromPath file.longName}}</span>
</a>
<ul class="bubble-popup-list">
<i class="component-viewer-popup-test-status {{testStatusIconClass status}}"></i>
<span class="component-viewer-popup-test-name">
<a class="component-viewer-popup-test-file link-action" title="{{name}}"
- data-uuid="{{../file.uuid}}" data-method="{{name}}">
+ data-id="{{../file.id}}" data-method="{{name}}">
{{name}}
</a>
</span>