From f662b583314d49e6ac1ada9328a8de22ae192cb1 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 4 Sep 2020 19:39:48 -0400 Subject: [PATCH] Update tests after sortIndex length change --- test/content/support.js | 6 +++--- test/tests/itemTest.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/content/support.js b/test/content/support.js index b24cf1d687..173cc93898 100644 --- a/test/content/support.js +++ b/test/content/support.js @@ -932,9 +932,9 @@ async function createAnnotation(type, parentItem) { annotation.annotationText = Zotero.Utilities.randomString(); } annotation.annotationComment = Zotero.Utilities.randomString(); - var page = Zotero.Utilities.rand(1, 100).toString().padStart(6, '0'); - var pos = Zotero.Utilities.rand(1, 10000).toString().padStart(7, '0'); - annotation.annotationSortIndex = `${page}|${pos}|000000.000`; + var page = Zotero.Utilities.rand(1, 100).toString().padStart(5, '0'); + var pos = Zotero.Utilities.rand(1, 10000).toString().padStart(6, '0'); + annotation.annotationSortIndex = `${page}|${pos}|00000.000`; annotation.annotationPosition = { pageIndex: 123, rects: [ diff --git a/test/tests/itemTest.js b/test/tests/itemTest.js index 0285479dee..5f0b1083af 100644 --- a/test/tests/itemTest.js +++ b/test/tests/itemTest.js @@ -1223,7 +1223,7 @@ describe("Zotero.Item", function () { annotation.parentID = attachment.id; annotation.annotationType = 'highlight'; annotation.annotationText = "This is highlighted text."; - annotation.annotationSortIndex = '000015|0002431|000000.000'; + annotation.annotationSortIndex = '00015|002431|00000.000'; annotation.annotationPosition = { pageIndex: 123, rects: [ @@ -1238,7 +1238,7 @@ describe("Zotero.Item", function () { annotation.parentID = attachment.id; annotation.annotationType = 'note'; annotation.annotationComment = "This is a comment."; - annotation.annotationSortIndex = '000015|0002431|000000.000'; + annotation.annotationSortIndex = '00015|002431|00000.000'; annotation.annotationPosition = { pageIndex: 123, rects: [ @@ -1260,7 +1260,7 @@ describe("Zotero.Item", function () { var annotation = new Zotero.Item('annotation'); annotation.parentID = attachment.id; annotation.annotationType = 'image'; - annotation.annotationSortIndex = '000015|0002431|000000.000'; + annotation.annotationSortIndex = '00015|002431|00000.000'; annotation.annotationPosition = { pageIndex: 123, rects: [