diff --git a/resources/cider-ui-tests/index.js b/resources/cider-ui-tests/index.js index e2800ca8..cce7a8d2 100644 --- a/resources/cider-ui-tests/index.js +++ b/resources/cider-ui-tests/index.js @@ -128,7 +128,7 @@ const app = new Vue({ }, page: "artist-page", pageHistory: [], - songstest: true + songstest: false }, methods: { async init() { @@ -359,6 +359,10 @@ const app = new Vue({ // sort this.library.songs.displayListing by song.attributes[self.library.songs.sorting] in ascending order based on alphabetical order and numeric order // check if song.attributes[self.library.songs.sorting] is a number and if so, sort by number if not, sort by alphabetical order ignoring case self.library.songs.displayListing.sort((a, b) => { + if(self.library.songs.sorting == "genre") { + aa = a.attributes.genreNames[0] + bb = b.attributes.genreNames[0] + } let aa = a.attributes[self.library.songs.sorting] let bb = b.attributes[self.library.songs.sorting] if (aa == null) { @@ -378,6 +382,10 @@ const app = new Vue({ // sort this.library.songs.displayListing by song.attributes[self.library.songs.sorting] in descending order based on alphabetical order and numeric order // check if song.attributes[self.library.songs.sorting] is a number and if so, sort by number if not, sort by alphabetical order ignoring case self.library.songs.displayListing.sort((a, b) => { + if(self.library.songs.sorting == "genre") { + aa = a.attributes.genreNames[0] + bb = b.attributes.genreNames[0] + } let aa = a.attributes[self.library.songs.sorting] let bb = b.attributes[self.library.songs.sorting] if (aa == null) { diff --git a/resources/cider-ui-tests/views/pages/library-songs.ejs b/resources/cider-ui-tests/views/pages/library-songs.ejs index fa5f5d8c..290e29a9 100644 --- a/resources/cider-ui-tests/views/pages/library-songs.ejs +++ b/resources/cider-ui-tests/views/pages/library-songs.ejs @@ -1,14 +1,31 @@