summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTucker Chapman <tucker.r.chapman@gmail.com>2019-04-23 13:13:40 +0000
committerFatih Acet <acetfatih@gmail.com>2019-04-23 13:13:40 +0000
commit314fbd4091ac2e305d6bab1259c7a53271b3a247 (patch)
treee9d82f6e54bfd3b43fe5a9006f24cc59c032d3fc
parent6c913f2c65ec4ddffaf4a79fc15ea933325e51f4 (diff)
downloadgitlab-ce-314fbd4091ac2e305d6bab1259c7a53271b3a247.tar.gz
Fix issue with list label text color
-rw-r--r--app/assets/javascripts/boards/models/list.js1
-rw-r--r--changelogs/unreleased/47584-label-text-color.yml5
-rw-r--r--spec/javascripts/boards/list_spec.js3
-rw-r--r--spec/javascripts/boards/mock_data.js1
4 files changed, 10 insertions, 0 deletions
diff --git a/app/assets/javascripts/boards/models/list.js b/app/assets/javascripts/boards/models/list.js
index 6cf77705847..7e5d0e0f888 100644
--- a/app/assets/javascripts/boards/models/list.js
+++ b/app/assets/javascripts/boards/models/list.js
@@ -90,6 +90,7 @@ class List {
this.id = data.id;
this.type = data.list_type;
this.position = data.position;
+ this.label = data.label;
return this.getIssues();
});
diff --git a/changelogs/unreleased/47584-label-text-color.yml b/changelogs/unreleased/47584-label-text-color.yml
new file mode 100644
index 00000000000..7d5eaa62793
--- /dev/null
+++ b/changelogs/unreleased/47584-label-text-color.yml
@@ -0,0 +1,5 @@
+---
+title: Resolve issue where list labels did not have the correct text color on creation
+merge_request: 26794
+author: Tucker Chapman
+type: fixed
diff --git a/spec/javascripts/boards/list_spec.js b/spec/javascripts/boards/list_spec.js
index 0d462a6f872..bb6fc6c693d 100644
--- a/spec/javascripts/boards/list_spec.js
+++ b/spec/javascripts/boards/list_spec.js
@@ -45,6 +45,7 @@ describe('List model', () => {
id: _.random(10000),
title: 'test',
color: 'red',
+ text_color: 'white',
},
});
list.save();
@@ -53,6 +54,8 @@ describe('List model', () => {
expect(list.id).toBe(listObj.id);
expect(list.type).toBe('label');
expect(list.position).toBe(0);
+ expect(list.label.color).toBe('red');
+ expect(list.label.textColor).toBe('white');
done();
}, 0);
});
diff --git a/spec/javascripts/boards/mock_data.js b/spec/javascripts/boards/mock_data.js
index 14fff9223f4..93a0f29af0a 100644
--- a/spec/javascripts/boards/mock_data.js
+++ b/spec/javascripts/boards/mock_data.js
@@ -16,6 +16,7 @@ export const listObj = {
title: 'Testing',
color: 'red',
description: 'testing;',
+ textColor: 'white',
},
};