|
@@ -280,6 +280,7 @@ describe('Test page service methods', () => {
|
|
|
mockedRenameSubOperation.mockRestore();
|
|
mockedRenameSubOperation.mockRestore();
|
|
|
await crowi.pageService.renameSubOperation(...argsForRenameSubOperation);
|
|
await crowi.pageService.renameSubOperation(...argsForRenameSubOperation);
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
test('it should successfully restart rename operation', async() => {
|
|
test('it should successfully restart rename operation', async() => {
|
|
|
// path
|
|
// path
|
|
|
const _path0 = '/POP0';
|
|
const _path0 = '/POP0';
|
|
@@ -327,6 +328,7 @@ describe('Test page service methods', () => {
|
|
|
expect(page2.descendantCount).toBe(1);
|
|
expect(page2.descendantCount).toBe(1);
|
|
|
expect(page3.descendantCount).toBe(0);
|
|
expect(page3.descendantCount).toBe(0);
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
test('it should fail and throw error if PageOperation is not found', async() => {
|
|
test('it should fail and throw error if PageOperation is not found', async() => {
|
|
|
await expect(resumeRenameSubOperation({}))
|
|
await expect(resumeRenameSubOperation({}))
|
|
|
.rejects.toThrow(new Error('There is nothing to be processed right now'));
|
|
.rejects.toThrow(new Error('There is nothing to be processed right now'));
|