Просмотр исходного кода

Modified the position of the parameter in the test file.

Shunm634-source 3 лет назад
Родитель
Сommit
69eeed02fb
1 измененных файлов с 7 добавлено и 7 удалено
  1. 7 7
      packages/app/test/integration/service/page.test.js

+ 7 - 7
packages/app/test/integration/service/page.test.js

@@ -350,7 +350,7 @@ describe('PageService', () => {
 
         expect(xssSpy).toHaveBeenCalled();
 
-        expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename1, null, testUser2);
+        expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename1, testUser2, null);
 
         expect(resultPage.path).toBe('/renamed1');
         expect(resultPage.updatedAt).toEqual(parentForRename1.updatedAt);
@@ -363,7 +363,7 @@ describe('PageService', () => {
 
         expect(xssSpy).toHaveBeenCalled();
 
-        expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename2, null, testUser2);
+        expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename2, testUser2, null);
 
         expect(resultPage.path).toBe('/renamed2');
         expect(resultPage.updatedAt).toEqual(dateToUse);
@@ -375,7 +375,7 @@ describe('PageService', () => {
         const resultPage = await crowi.pageService.renamePage(parentForRename3, '/renamed3', testUser2, { createRedirectPage: true });
 
         expect(xssSpy).toHaveBeenCalled();
-        expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename3, null, testUser2);
+        expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename3, testUser2, null);
 
         expect(resultPage.path).toBe('/renamed3');
         expect(resultPage.updatedAt).toEqual(parentForRename3.updatedAt);
@@ -388,7 +388,7 @@ describe('PageService', () => {
 
         expect(xssSpy).toHaveBeenCalled();
         expect(renameDescendantsWithStreamSpy).toHaveBeenCalled();
-        expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename4, null, testUser2);
+        expect(pageEventSpy).toHaveBeenCalledWith('rename', parentForRename4, testUser2, null);
 
         expect(resultPage.path).toBe('/renamed4');
         expect(resultPage.updatedAt).toEqual(parentForRename4.updatedAt);
@@ -538,7 +538,7 @@ describe('PageService', () => {
     });
   });
 
-  describe('delete page', () => {
+  describe.only('delete page', () => {
     let getDeletedPageNameSpy;
     let pageEventSpy;
     let deleteDescendantsWithStreamSpy;
@@ -564,7 +564,7 @@ describe('PageService', () => {
       expect(resultPage.updatedAt).toEqual(parentForDelete1.updatedAt);
       expect(resultPage.lastUpdateUser).toEqual(testUser1._id);
 
-      expect(pageEventSpy).toHaveBeenCalledWith('delete', parentForDelete1, null, testUser2);
+      expect(pageEventSpy).toHaveBeenCalledWith('delete', parentForDelete1, testUser2, null);
       expect(pageEventSpy).toHaveBeenCalledWith('create', resultPage, testUser2);
     });
 
@@ -581,7 +581,7 @@ describe('PageService', () => {
       expect(resultPage.updatedAt).toEqual(parentForDelete2.updatedAt);
       expect(resultPage.lastUpdateUser).toEqual(testUser1._id);
 
-      expect(pageEventSpy).toHaveBeenCalledWith('delete', parentForDelete2, null, testUser2);
+      expect(pageEventSpy).toHaveBeenCalledWith('delete', parentForDelete2, testUser2, null);
       expect(pageEventSpy).toHaveBeenCalledWith('create', resultPage, testUser2);
     });