ソースを参照

Added conditions

Taichi Masuyama 4 年 前
コミット
1d11d0bb3a
1 ファイル変更2 行追加2 行削除
  1. 2 2
      packages/app/test/integration/models/v5.page.test.js

+ 2 - 2
packages/app/test/integration/models/v5.page.test.js

@@ -884,8 +884,8 @@ describe('Page', () => {
     });
     });
     test('should find parent while NOT creating unnecessary empty pages with all v4 public pages', async() => {
     test('should find parent while NOT creating unnecessary empty pages with all v4 public pages', async() => {
       // All pages does not have parent (v4 schema)
       // All pages does not have parent (v4 schema)
-      const _pageA = await Page.findOne({ path: '/get_parent_A', grant: Page.GRANT_PUBLIC, isEmpty: false });
-      const _pageAB = await Page.findOne({ path: '/get_parent_A/get_parent_B', grant: Page.GRANT_PUBLIC, isEmpty: false });
+      const _pageA = await Page.findOne({ path: '/get_parent_A', grant: Page.GRANT_PUBLIC, isEmpty: false, parent: null });
+      const _pageAB = await Page.findOne({ path: '/get_parent_A/get_parent_B', grant: Page.GRANT_PUBLIC, isEmpty: false, parent: null });
       const _emptyA = await Page.findOne({ path: '/get_parent_A', grant: Page.GRANT_PUBLIC, isEmpty: true });
       const _emptyA = await Page.findOne({ path: '/get_parent_A', grant: Page.GRANT_PUBLIC, isEmpty: true });
       const _emptyAB = await Page.findOne({ path: '/get_parent_A/get_parent_B', grant: Page.GRANT_PUBLIC, isEmpty: true });
       const _emptyAB = await Page.findOne({ path: '/get_parent_A/get_parent_B', grant: Page.GRANT_PUBLIC, isEmpty: true });