Skip to content

Commit 6c9270a

Browse files
committed
test: - use QueryLayout to get hidden classes
1 parent 2edb685 commit 6c9270a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/Layout/TaskLayout.test.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
import { TaskLayoutOptions } from '../../src/Layout/TaskLayoutOptions';
66
import { QueryLayoutOptions } from '../../src/Layout/QueryLayoutOptions';
7-
import { TaskLayout } from '../../src/Layout/TaskLayout';
7+
import { QueryLayout, TaskLayout } from '../../src/Layout/TaskLayout';
88

99
describe('TaskLayout tests', () => {
1010
it('should generate expected CSS classes for default layout', () => {
1111
const taskLayout = new TaskLayout();
12-
expect(
13-
[...taskLayout.applyTaskLayoutOptions(), ...taskLayout.applyQueryLayoutOptions()].join('\n'),
14-
).toMatchInlineSnapshot('"tasks-layout-hide-urgency"');
12+
const queryLayout = new QueryLayout();
13+
14+
const hiddenClasses = [...taskLayout.applyTaskLayoutOptions(), ...queryLayout.applyQueryLayoutOptions()];
15+
expect(hiddenClasses.join('\n')).toMatchInlineSnapshot('"tasks-layout-hide-urgency"');
1516
});
1617

1718
it('should generate expected CSS classes with all default options reversed', () => {
@@ -26,9 +27,10 @@ describe('TaskLayout tests', () => {
2627
});
2728

2829
const taskLayout = new TaskLayout(taskLayoutOptions, queryLayoutOptions);
30+
const queryLayout = new QueryLayout(queryLayoutOptions);
2931

30-
expect([...taskLayout.applyTaskLayoutOptions(), ...taskLayout.applyQueryLayoutOptions()].join('\n'))
31-
.toMatchInlineSnapshot(`
32+
const hiddenClasses = [...taskLayout.applyTaskLayoutOptions(), ...queryLayout.applyQueryLayoutOptions()];
33+
expect(hiddenClasses.join('\n')).toMatchInlineSnapshot(`
3234
"tasks-layout-hide-id
3335
tasks-layout-hide-blockedBy
3436
tasks-layout-hide-priority

0 commit comments

Comments
 (0)