-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/section: add test codes, change scss variable (#76)
- Loading branch information
Showing
8 changed files
with
48 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export interface VsPageStyleSet { | ||
fontColor?: string; | ||
color?: string; | ||
headerMargin?: string; | ||
padding?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
packages/vlossom/src/components/vs-section/__test__/vs-section.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { describe, it, expect } from 'vitest'; | ||
import { mount } from '@vue/test-utils'; | ||
import { VsSection } from '@/components'; | ||
|
||
describe('vs-section', () => { | ||
it('title slot을 설정하지 않으면 section-title 영역이 없다', () => { | ||
// given | ||
const wrapper = mount(VsSection); | ||
|
||
//then | ||
expect(wrapper.find('.section-title').exists()).toBe(false); | ||
}); | ||
|
||
it('slot으로 title을 설정할 수 있다', () => { | ||
// given | ||
const wrapper = mount(VsSection, { | ||
slots: { | ||
title: '<div>Title</div>', | ||
}, | ||
}); | ||
|
||
// then | ||
expect(wrapper.find('.section-title').exists()).toBe(true); | ||
expect(wrapper.html()).toContain('<div>Title</div>'); | ||
}); | ||
|
||
it('default slot에 삽입된 내용을 보여준다', () => { | ||
// given | ||
const wrapper = mount(VsSection, { | ||
slots: { | ||
default: 'This is section content', | ||
}, | ||
}); | ||
|
||
// then | ||
expect(wrapper.html()).toContain('This is section content'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters