-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add-another-repo-to-cypress
- Loading branch information
Showing
18 changed files
with
1,128 additions
and
885 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ node_modules | |
|
||
reposense-report/ | ||
docs/_site/ | ||
bin/ |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# RepoSense | ||
|
||
RepoSense is a powerful tool for analyzing repositories. It provides valuable insights into your codebase, helping you understand the development patterns, identify areas for improvement, and track the contributions of individual team members. | ||
|
||
## Features | ||
|
||
- Repository analysis: Gain a comprehensive overview of your codebase, including commit statistics, file changes, and code ownership. | ||
- Contribution tracking: Easily track the contributions made by each team member, including the number of commits, lines of code added/removed, and more. | ||
- Visualization: Visualize your repository's history and changes over time through interactive graphs and charts. |
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 |
---|---|---|
@@ -1,43 +1,60 @@ | ||
{ | ||
"plugins": [ | ||
"@stylistic/stylelint-plugin", | ||
"stylelint-order" | ||
], | ||
"extends": [ | ||
"stylelint-config-recommended-scss", | ||
"stylelint-config-standard", | ||
"stylelint-config-standard-scss", | ||
"stylelint-config-recommended-vue" | ||
], | ||
"rules": { | ||
"declaration-no-important": true, | ||
"declaration-block-single-line-max-declarations": 1, | ||
"no-invalid-double-slash-comments": true, | ||
"function-no-unknown": null, | ||
"no-descending-specificity": null, | ||
"selector-type-no-unknown": null, | ||
"at-rule-no-unknown": null, | ||
"no-duplicate-selectors": null, | ||
"length-zero-no-unit": true, | ||
"value-keyword-case": "lower", | ||
"selector-type-case": "lower", | ||
"color-no-invalid-hex": true, | ||
"string-no-newline": true, | ||
"unit-no-unknown": true, | ||
"property-no-unknown": true, | ||
"block-no-empty": true, | ||
"comment-no-empty": true, | ||
"no-extra-semicolons": true, | ||
"no-invalid-double-slash-comments": true, | ||
"declaration-no-important": true, | ||
"declaration-block-single-line-max-declarations": 1, | ||
"number-leading-zero": "never", | ||
"number-no-trailing-zeros": null, | ||
"string-quotes": "single", | ||
"length-zero-no-unit": true, | ||
"value-keyword-case": "lower", | ||
"property-case": "lower", | ||
"declaration-colon-space-after": "always", | ||
"selector-type-case": "lower", | ||
"selector-list-comma-newline-after": "always", | ||
"no-eol-whitespace": true, | ||
"shorthand-property-no-redundant-values": null, | ||
"declaration-empty-line-before": null, | ||
"selector-class-pattern": null, | ||
"color-function-notation": null, | ||
"alpha-value-notation": null, | ||
"comment-empty-line-before": null, | ||
"property-no-vendor-prefix": null, | ||
"selector-pseudo-element-colon-notation": null, | ||
"at-rule-empty-line-before": null, | ||
"font-family-name-quotes": null, | ||
"color-hex-length": null, | ||
"@stylistic/no-extra-semicolons": true, | ||
"@stylistic/number-leading-zero": "never", | ||
"@stylistic/number-no-trailing-zeros": null, | ||
"@stylistic/property-case": "lower", | ||
"@stylistic/string-quotes": "single", | ||
"@stylistic/declaration-colon-space-after": "always", | ||
"@stylistic/selector-list-comma-newline-after": "always", | ||
"@stylistic/no-eol-whitespace": true, | ||
"@stylistic/indentation": 2, | ||
"@stylistic/block-opening-brace-space-before": "always", | ||
"@stylistic/declaration-colon-space-before": "never", | ||
"order/properties-alphabetical-order": true, | ||
"indentation": 2, | ||
"scss/at-import-partial-extension": null, | ||
"function-no-unknown": null, | ||
"scss/at-import-no-partial-leading-underscore": null, | ||
"no-descending-specificity": null, | ||
"scss/no-global-function-names": null, | ||
"selector-type-no-unknown": null, | ||
"at-rule-no-unknown": null, | ||
"no-duplicate-selectors": null, | ||
"block-opening-brace-space-before": "always", | ||
"declaration-colon-space-before": "never" | ||
"scss/at-import-no-partial-leading-underscore": null, | ||
"scss/at-import-partial-extension": null, | ||
"scss/load-no-partial-leading-underscore": null, | ||
"scss/double-slash-comment-empty-line-before": null, | ||
"scss/double-slash-comment-whitespace-inside": null, | ||
"scss/dollar-variable-pattern": null | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
frontend/cypress/tests/chartView/chartView_scrollToActiveRepo.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,62 @@ | ||
describe('scroll to active repo', () => { | ||
// need to set scrollBehavior to false because the default behavior is to scroll the element into view | ||
it('selecting a visible repo should not scroll', { scrollBehavior: false }, () => { | ||
// close the error message box | ||
cy.get('.error-message-box') | ||
.should('be.visible'); | ||
|
||
cy.get('#summary-wrapper > #summary > .error-message-box > .error-message-box__close-button') | ||
.click(); | ||
|
||
cy.get('.error-message-box') | ||
.should('not.be.visible'); | ||
|
||
cy.get('.icon-button.fa-code') | ||
.should('exist') | ||
.first(); | ||
|
||
let scrollTopOriginal = 0; | ||
cy.get('#summary-wrapper') | ||
.first() | ||
.then(($el) => { | ||
scrollTopOriginal = $el.prop('scrollTop'); | ||
}); | ||
|
||
cy.get('.icon-button.fa-code') | ||
.should('exist') | ||
.first() | ||
.click(); | ||
|
||
cy.get('#summary-wrapper') | ||
.first() | ||
.then(($el) => { | ||
const scrollTop = $el.prop('scrollTop'); | ||
expect(scrollTop).to.equal(scrollTopOriginal); | ||
}); | ||
}); | ||
|
||
it('selecting a non-visible repo should scroll', () => { | ||
cy.get('.icon-button.fa-code') | ||
.should('exist') | ||
.last() | ||
.click(); | ||
|
||
cy.get('#summary-wrapper') | ||
.first() | ||
.then(($el) => { | ||
const scrollTop = $el.prop('scrollTop'); | ||
expect(scrollTop).to.not.equal(0); | ||
}); | ||
|
||
cy.url() | ||
.should('contain', 'tabAuthor=yong24s') | ||
.should('contain', 'tabRepo=reposense%2FRepoSense%5Bcypress%5D'); | ||
|
||
cy.reload(); | ||
|
||
cy.get('.icon-button.fa-code') | ||
.should('exist') | ||
.last() | ||
.should('be.visible'); | ||
}); | ||
}); |
67 changes: 67 additions & 0 deletions
67
frontend/cypress/tests/codeView/codeView_codeHighlighting.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,67 @@ | ||
// Assumes: RepoSense repo from 03/05/2018 to current date | ||
describe('code highlighting works properly', () => { | ||
it('should highlight code when there is a single author', () => { | ||
// open the code panel | ||
cy.get('.icon-button.fa-code') | ||
.should('exist') | ||
.first() | ||
.click(); | ||
|
||
cy.get('#tab-authorship .files', { timeout: 90000 }) | ||
.should('be.visible'); | ||
|
||
cy.get('.hljs-comment').contains('* Represents a Git Author.') | ||
.parent() // .line-content | ||
.parent() // .code | ||
.should('have.css', 'background-color', 'rgb(230, 255, 237)'); // #e6ffed | ||
}); | ||
|
||
it('should highlight code when multiple authors are merged in a repo group', () => { | ||
cy.get('div.mui-select.grouping > select:visible') | ||
.select('groupByRepos'); | ||
|
||
cy.get('#summary label.merge-group > input:visible') | ||
.should('be.visible') | ||
.check() | ||
.should('be.checked'); | ||
|
||
// open the code panel | ||
cy.get('.icon-button.fa-code') | ||
.should('exist') | ||
.first() | ||
.click(); | ||
|
||
cy.get('#tab-authorship .files', { timeout: 90000 }) | ||
.should('be.visible'); | ||
|
||
cy.get('.hljs-comment').contains('* MUI Colors module') // eugenepeh | ||
.parent() // .line-content | ||
.parent() // .code | ||
.should('have.css', 'background-color', 'rgba(30, 144, 255, 0.19)') // #1e90ff, transparencyValue 30 | ||
.then((firstAuthorColor) => { | ||
// eslint-disable-next-line quotes | ||
cy.get('.line-content').contains("'red': (") // jamessspanggg | ||
.parent() // .code | ||
// #f08080, transparencyValue 30 | ||
.should('have.css', 'background-color', 'rgba(240, 128, 128, 0.19)') | ||
.and('not.eq', firstAuthorColor); | ||
}); | ||
}); | ||
|
||
it('should not highlight non-attributed lines', () => { | ||
// open the code panel | ||
cy.get('.icon-button.fa-code') | ||
.should('exist') | ||
.first() | ||
.click(); | ||
|
||
cy.get('#tab-authorship .files', { timeout: 90000 }) | ||
.should('be.visible'); | ||
|
||
cy.get('.hljs-title').contains('Author') | ||
.parent() // .hljs-class | ||
.parent() // .line-content | ||
.parent() // .code | ||
.should('have.css', 'background-color', 'rgb(255, 255, 255)'); // #ffffff | ||
}); | ||
}); |
Oops, something went wrong.