test(Dialog): update test cases

This commit is contained in:
chenjiahan
2021-01-02 21:42:26 +08:00
parent 101b416fa2
commit 711ffd9d30
5 changed files with 218 additions and 199 deletions
@@ -1,41 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`allow-html prop 1`] = `<div class="van-dialog__message">&lt;span&gt;text&lt;/span&gt;</div>`;
exports[`button color 1`] = `
<div role="dialog" class="van-dialog" name="van-dialog-bounce">
<div class="van-hairline--top van-dialog__footer"><button class="van-button van-button--default van-button--large van-dialog__cancel" style="color: white;">
<div class="van-button__content"><span class="van-button__text">取消</span></div>
</button><button class="van-button van-button--default van-button--large van-dialog__confirm van-hairline--left" style="color: red;">
<div class="van-button__content"><span class="van-button__text">确认</span></div>
</button></div>
</div>
`;
exports[`button text 1`] = `
<div role="dialog" class="van-dialog" name="van-dialog-bounce">
<div class="van-hairline--top van-dialog__footer"><button class="van-button van-button--default van-button--large van-dialog__cancel">
<div class="van-button__content"><span class="van-button__text">Custom cancel</span></div>
</button><button class="van-button van-button--default van-button--large van-dialog__confirm van-hairline--left">
<div class="van-button__content"><span class="van-button__text">Custom confirm</span></div>
</button></div>
</div>
`;
exports[`default slot 1`] = `
<div role="dialog" class="van-dialog" name="van-dialog-bounce">
<div class="van-dialog__content">Custom Message</div>
<div class="van-hairline--top van-dialog__footer"><button class="van-button van-button--default van-button--large van-dialog__confirm">
<div class="van-button__content"><span class="van-button__text">确认</span></div>
</button></div>
</div>
`;
exports[`title slot 1`] = `
<div role="dialog" class="van-dialog" name="van-dialog-bounce">
<div class="van-dialog__header van-dialog__header--isolated">Custom Title</div>
<div class="van-hairline--top van-dialog__footer"><button class="van-button van-button--default van-button--large van-dialog__confirm">
<div class="van-button__content"><span class="van-button__text">确认</span></div>
</button></div>
</div>
`;
@@ -0,0 +1,36 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render button text correctly 1`] = `
<div class="van-hairline--top van-dialog__footer">
<button type="button"
class="van-button van-button--default van-button--large van-dialog__cancel"
>
<div class="van-button__content">
<span class="van-button__text">
Custom Cancel
</span>
</div>
</button>
<button type="button"
class="van-button van-button--default van-button--large van-dialog__confirm van-hairline--left"
>
<div class="van-button__content">
<span class="van-button__text">
Custom Confirm
</span>
</div>
</button>
</div>
`;
exports[`should render default slot correctly 1`] = `
<div class="van-dialog__content">
Custom Message
</div>
`;
exports[`should render title slot correctly 1`] = `
<div class="van-dialog__header van-dialog__header--isolated">
Custom Title
</div>
`;