-
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
It can be useful to view all the tags of each repo that appears on the ramp chart. Though this information is visible if the repo is merged and the user click to see the breakdown of each commit, it can still be useful to see this information upfront (for searching Ctrl+F perhaps). This feature would be toggleable with a checkbox to reduce clutter. Let's add this functionality to add convenience when searching through RepoSense reports with tags.
- Loading branch information
Showing
9 changed files
with
188 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
describe('show tags', () => { | ||
it('unchecked should not display any tags for a group', () => { | ||
cy.get('#summary label.show-tags > input:visible') | ||
.should('be.visible') | ||
.uncheck() | ||
.should('not.be.checked'); | ||
|
||
cy.get('.summary-charts__title--tags') | ||
.should('not.exist'); | ||
}); | ||
|
||
it('checked should display all tags for a group', () => { | ||
cy.get('#summary label.show-tags > input:visible') | ||
.should('be.visible') | ||
.check() | ||
.should('be.checked'); | ||
|
||
cy.get('#summary label.merge-group > input:visible') | ||
.should('be.visible') | ||
.check() | ||
.should('be.checked'); | ||
|
||
cy.get('.icon-button.fa-list-ul') | ||
.should('exist') | ||
.first() | ||
.click(); | ||
|
||
const correctTags = []; | ||
|
||
cy.get('.zoom__title--tags') | ||
.find('.tag') | ||
.each(($tag) => correctTags.push($tag.text().trim())) | ||
.then(() => { | ||
cy.get('.summary-charts') | ||
.first() | ||
.find('.summary-charts__title--tags') | ||
.find('.tag') | ||
.each(($tag) => { | ||
expect(correctTags).to.include($tag.text().trim()); | ||
}); | ||
|
||
cy.get('.summary-charts') | ||
.first() | ||
.find('.summary-charts__title--tags') | ||
.find('.tag') | ||
.should('have.length', correctTags.length); | ||
}); | ||
}); | ||
|
||
it('clicked should redirect to the correct tag page', () => { | ||
cy.get('#summary label.show-tags > input:visible') | ||
.should('be.visible') | ||
.check() | ||
.should('be.checked'); | ||
|
||
cy.get('.summary-charts__title--tags') | ||
.find('.tag') | ||
.first() | ||
.invoke('removeAttr', 'target') // to open in the same window | ||
.click(); | ||
|
||
cy.origin('https://github.com', () => { | ||
cy.url() | ||
.should('equal', 'https://github.com/reposense/RepoSense/releases/tag/v1.0'); | ||
}); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@import 'colors'; | ||
|
||
/* Tags in commits */ | ||
.tag { | ||
@include mini-font; | ||
background: mui-color('grey', '600'); | ||
border-radius: 5px; | ||
color: mui-color('white'); | ||
display: inline-block; | ||
margin: .2rem .2rem .2rem 0; | ||
padding: 0 3px 0 3px; | ||
|
||
.fa-tags { | ||
width: .65rem; | ||
} | ||
} |
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