-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
A line is credited to the author who last modified it. Another author might have written the line initially and the current author only modified it slightly. In such a case, the current author gets credited for work that is not entirely done by him/her. Let's analyze how similar a line is as compared to its ancestor lines (previous versions of the line) and give full or partial credit to the last author based on the analysis.
- Loading branch information
1 parent
bf78bf2
commit 29b9f5f
Showing
66 changed files
with
1,355 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
frontend/cypress/tests/codeView/codeView_creditBackgroundColour.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
describe('credit background colour', () => { | ||
it('check if background colour match the credit information for Eugene', () => { | ||
// open the code panel | ||
cy.get('.icon-button.fa-code') | ||
.should('exist') | ||
.first() | ||
.click(); | ||
|
||
// src/main/java/reposense/model/Author.java | ||
// line 9: full credit - #BFF6CF | ||
cy.get(':nth-child(1) > .file-content > .segment-collection > :nth-child(2) > .java > .code') | ||
.should('have.css', 'background-color') | ||
.and('eq', 'rgb(191, 246, 207)'); | ||
|
||
// src/main/java/reposense/model/Author.java | ||
// line 15: partial credit - #E6FFED | ||
cy.get(':nth-child(1) > .file-content > .segment-collection > :nth-child(4) > .java > .code') | ||
.should('have.css', 'background-color') | ||
.and('eq', 'rgb(230, 255, 237)'); | ||
}); | ||
|
||
it('check if background colour match the credit information when group is merged', () => { | ||
// check merge group checkbox | ||
cy.get('#summary label.merge-group > input') | ||
.should('be.visible') | ||
.check() | ||
.should('be.checked'); | ||
|
||
// open the code panel | ||
cy.get('.icon-button.fa-code') | ||
.should('exist') | ||
.first() | ||
.click(); | ||
|
||
// frontend/src/styles/_colors.scss | ||
// line 35: full credit - #F0808050 | ||
cy.get(':nth-child(7) > .scss > :nth-child(1)') | ||
.should('have.css', 'background-color') | ||
.and('eq', 'rgba(240, 128, 128, 0.314)'); | ||
|
||
// FileInfoExtractor.java is too far away to be loaded, use filter to go to it directly | ||
cy.get('#search') | ||
.click() | ||
.type('FileInfoExtractor.java'); | ||
|
||
cy.get('#submit-button') | ||
.click(); | ||
|
||
// src/main/java/reposense/authorship/FileInfoExtractor.java | ||
// line 23: partial credit - #1E90FF20 | ||
cy.get(':nth-child(10) > .java > :nth-child(1)') | ||
.should('have.css', 'background-color') | ||
.and('eq', 'rgba(30, 144, 255, 0.125)'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
|
||
.hljs-section, | ||
.hljs-name { | ||
color: #63a35c; | ||
color: #468C5A; | ||
} | ||
|
||
.hljs-tag { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.