diff --git a/.all-contributorsrc b/.all-contributorsrc
index 28438d8dd..e452a13fa 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -655,6 +655,16 @@
"contributions": [
"doc"
]
+ },
+ {
+ "login": "ZahraTee",
+ "name": "Zahra Traboulsi",
+ "avatar_url": "https://avatars0.githubusercontent.com/u/5565340?v=4",
+ "profile": "http://www.zahra.tech",
+ "contributions": [
+ "code",
+ "test"
+ ]
}
]
}
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index e9e1b75d1..c0d425377 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -15,5 +15,5 @@ Thank you to all the people who have already contributed to GitPoint!
| [
Peter Blazejewicz](http://www.linkedin.com/in/peterblazejewicz)
[π](#translation-peterblazejewicz "Translation") | [
Eric Adamski](https://github.com/ericadamski)
[π](https://github.com/gitpoint/git-point/issues?q=author%3Aericadamski "Bug reports") | [
Jouderian Nobre Junior](https://github.com/jouderianjr)
[π»](https://github.com/gitpoint/git-point/commits?author=jouderianjr "Code") | [
Phi Dong](http://www.phidong.com)
[π»](https://github.com/gitpoint/git-point/commits?author=pdong "Code") | [
John Patrick Salcedo](https://github.com/jpls93)
[π»](https://github.com/gitpoint/git-point/commits?author=jpls93 "Code") | [
Γscar Carretero](https://github.com/ocarreterom)
[π»](https://github.com/gitpoint/git-point/commits?author=ocarreterom "Code") |
| [
Dyesse YUMBA](https://github.com/dyesseyumba)
[π§](#tool-dyesseyumba "Tools") | [
Bink](https://binkpitch.me/)
[π»](https://github.com/gitpoint/git-point/commits?author=binkpitch "Code") | [
khvilaboa](https://github.com/khvilaboa)
[π](#translation-khvilaboa "Translation") | [
James Glover](http://jamesmglover.com)
[π»](https://github.com/gitpoint/git-point/commits?author=jglover "Code") [β οΈ](https://github.com/gitpoint/git-point/commits?author=jglover "Tests") | [
Jose Luis Naranjo](https://co.linkedin.com/in/josenaranjo/en)
[π»](https://github.com/gitpoint/git-point/commits?author=josenaranjo "Code") | [
Tobias Lohse](http://MrLoh.se)
[π»](https://github.com/gitpoint/git-point/commits?author=MrLoh "Code") |
| [
Serhii Baraniuk](https://www.facebook.com/serhii.baraniuk)
[β οΈ](https://github.com/gitpoint/git-point/commits?author=kenitive "Tests") | [
Ben Snider](http://www.bensnider.com/)
[β οΈ](https://github.com/gitpoint/git-point/commits?author=stupergenius "Tests") | [
Simon Hoyos](https://www.linkedin.com/in/simonhoyos/)
[π»](https://github.com/gitpoint/git-point/commits?author=shmesa22 "Code") [π¨](#design-shmesa22 "Design") | [
Damien Leroy](https://github.com/ShiiFu)
[π](#translation-ShiiFu "Translation") | [
botbotbot](http://dev.im-bot.com)
[β οΈ](https://github.com/gitpoint/git-point/commits?author=ibotdotout "Tests") | [
Dmytro Kytsmen](https://github.com/Kietzmann)
[π](#translation-Kietzmann "Translation") |
-| [
TheCodeTalker](https://thecodetalker.github.io/)
[π»](https://github.com/gitpoint/git-point/commits?author=TheCodeTalker "Code") | [
Leonardo](https://github.com/LeoCp)
[π»](https://github.com/gitpoint/git-point/commits?author=LeoCp "Code") | [
Stephen](https://github.com/coderste)
[π](https://github.com/gitpoint/git-point/commits?author=coderste "Documentation") |
+| [
TheCodeTalker](https://thecodetalker.github.io/)
[π»](https://github.com/gitpoint/git-point/commits?author=TheCodeTalker "Code") | [
Leonardo](https://github.com/LeoCp)
[π»](https://github.com/gitpoint/git-point/commits?author=LeoCp "Code") | [
Stephen](https://github.com/coderste)
[π](https://github.com/gitpoint/git-point/commits?author=coderste "Documentation") | [
Zahra Traboulsi](http://www.zahra.tech)
[π»](https://github.com/gitpoint/git-point/commits?author=ZahraTee "Code") [β οΈ](https://github.com/gitpoint/git-point/commits?author=ZahraTee "Tests") |
diff --git a/README.md b/README.md
index b7de402d1..ae46bd66c 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@
[](https://travis-ci.org/gitpoint/git-point)
[](https://coveralls.io/github/gitpoint/git-point)
-[](#contributors)
+[](#contributors)
[](http://makeapullrequest.com)
[](http://commitizen.github.io/cz-cli/)
[](https://gitter.im/git-point)
diff --git a/__tests__/tests/components/NotificationIcon.js b/__tests__/tests/components/NotificationIcon.js
new file mode 100644
index 000000000..0552be086
--- /dev/null
+++ b/__tests__/tests/components/NotificationIcon.js
@@ -0,0 +1,47 @@
+import React from 'react';
+import { shallow, render } from 'enzyme';
+import { Badge, NotificationIconComponent } from 'components';
+
+const defaultProps = {
+ iconColor: 'red',
+ notificationsCount: 10,
+};
+
+describe('', () => {
+ it('should display a Badge component when notificationsCount is greater than 0', () => {
+ const wrapper = shallow();
+
+ const badges = wrapper.find(Badge);
+ expect(badges.length).toBe(1);
+ });
+
+ it('should not display a Badge component when notificationsCount is 0', () => {
+ const wrapper = shallow(
+
+ );
+
+ const badges = wrapper.find(Badge);
+ expect(badges.length).toBe(0);
+ });
+
+ it("should display a Badge component displaying '99+' in normal text when notificationsCount is greater than 99", () => {
+ const wrapper = shallow(
+
+ );
+
+ const badge = wrapper.find(Badge);
+ expect(badge.prop('text')).toBe('99+');
+ expect(badge.prop('largeText')).toBe(false);
+ });
+
+ it('should display a Badge component displaying notificationsCount in largeText if notificationsCount is less than or equal to 99', () => {
+ const wrapper = shallow(
+
+ );
+
+ const badge = wrapper.find(Badge);
+
+ expect(badge.prop('text')).toBe(99);
+ expect(badge.prop('largeText')).toBe(true);
+ });
+});
diff --git a/__tests__/tests/components/RepositorySectionTitle.js b/__tests__/tests/components/RepositorySectionTitle.js
new file mode 100644
index 000000000..09385ebdf
--- /dev/null
+++ b/__tests__/tests/components/RepositorySectionTitle.js
@@ -0,0 +1,28 @@
+import React from 'react';
+import { shallow, render } from 'enzyme';
+import { RepositorySectionTitle, StateBadge } from 'components';
+
+const defaultProps = {
+ text: 'test title',
+ openCount: 10,
+ closedCount: 10,
+ loading: false,
+};
+
+describe('', () => {
+ it('should display no StateBadge components if loading is true', () => {
+ const wrapper = shallow(
+
+ );
+ const badges = wrapper.find(StateBadge);
+
+ expect(badges.length).toBe(0);
+ });
+
+ it('should display two StateBadge components if loading is false', () => {
+ const wrapper = shallow();
+ const badges = wrapper.find(StateBadge);
+
+ expect(badges.length).toBe(2);
+ });
+});
diff --git a/src/components/notification-icon.component.js b/src/components/notification-icon.component.js
index 4f8a48639..13c2ba4e0 100644
--- a/src/components/notification-icon.component.js
+++ b/src/components/notification-icon.component.js
@@ -20,7 +20,7 @@ const mapStateToProps = state => ({
notificationsCount: state.notifications.notificationsCount,
});
-class NotificationIconComponent extends Component {
+export class NotificationIconComponent extends Component {
props: {
iconColor: string,
notificationsCount: number,