aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/tests/js
diff options
context:
space:
mode:
authorMichael Jobst <mjobst+github@tecratech.de>2016-11-21 14:40:34 +0100
committerLukas Reschke <lukas@statuscode.ch>2016-12-19 17:34:09 +0100
commita7526b9837336f2c643bb0c1d347c7afdd51f0cb (patch)
tree572f63458f1c85679502f5eda21537042cbee845 /apps/files/tests/js
parent1afdce9ef84bebfc4b4a902c1f0311e5e6562387 (diff)
downloadnextcloud-server-a7526b9837336f2c643bb0c1d347c7afdd51f0cb.tar.gz
nextcloud-server-a7526b9837336f2c643bb0c1d347c7afdd51f0cb.zip
Style modifications of favorite star on main detail view (#26658)
* Style modifications of favorite star on main detail view * Removed unused opacity change on mouse over * favorite star title fixed * favorite star opacity should always be .7 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps/files/tests/js')
-rw-r--r--apps/files/tests/js/mainfileinfodetailviewSpec.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/files/tests/js/mainfileinfodetailviewSpec.js b/apps/files/tests/js/mainfileinfodetailviewSpec.js
index e81adbcf7ac..faf0faa8d8f 100644
--- a/apps/files/tests/js/mainfileinfodetailviewSpec.js
+++ b/apps/files/tests/js/mainfileinfodetailviewSpec.js
@@ -70,13 +70,13 @@ describe('OCA.Files.MainFileInfoDetailView tests', function() {
it('displays favorite icon', function() {
testFileInfo.set('tags', [OC.TAG_FAVORITE]);
view.setFileInfo(testFileInfo);
- expect(view.$el.find('.favorite img').attr('src'))
- .toEqual(OC.imagePath('core', 'actions/starred'));
+ expect(view.$el.find('.action-favorite > span').hasClass('icon-starred')).toEqual(true);
+ expect(view.$el.find('.action-favorite > span').hasClass('icon-star')).toEqual(false);
testFileInfo.set('tags', []);
view.setFileInfo(testFileInfo);
- expect(view.$el.find('.favorite img').attr('src'))
- .toEqual(OC.imagePath('core', 'actions/star'));
+ expect(view.$el.find('.action-favorite > span').hasClass('icon-starred')).toEqual(false);
+ expect(view.$el.find('.action-favorite > span').hasClass('icon-star')).toEqual(true);
});
it('displays mime icon', function() {
// File
@@ -187,13 +187,13 @@ describe('OCA.Files.MainFileInfoDetailView tests', function() {
testFileInfo.set('tags', [OC.TAG_FAVORITE]);
- expect(view.$el.find('.favorite img').attr('src'))
- .toEqual(OC.imagePath('core', 'actions/starred'));
+ expect(view.$el.find('.action-favorite > span').hasClass('icon-starred')).toEqual(true);
+ expect(view.$el.find('.action-favorite > span').hasClass('icon-star')).toEqual(false);
testFileInfo.set('tags', []);
- expect(view.$el.find('.favorite img').attr('src'))
- .toEqual(OC.imagePath('core', 'actions/star'));
+ expect(view.$el.find('.action-favorite > span').hasClass('icon-starred')).toEqual(false);
+ expect(view.$el.find('.action-favorite > span').hasClass('icon-star')).toEqual(true);
});
it('unbinds change listener from model', function() {
view.setFileInfo(testFileInfo);
@@ -207,8 +207,8 @@ describe('OCA.Files.MainFileInfoDetailView tests', function() {
testFileInfo.set('tags', [OC.TAG_FAVORITE]);
// no change
- expect(view.$el.find('.favorite img').attr('src'))
- .toEqual(OC.imagePath('core', 'actions/star'));
+ expect(view.$el.find('.action-favorite > span').hasClass('icon-starred')).toEqual(false);
+ expect(view.$el.find('.action-favorite > span').hasClass('icon-star')).toEqual(true);
});
});
describe('events', function() {