-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core/toast): enable shadow dom (#581)
- Loading branch information
1 parent
898ae23
commit 8ac2a47
Showing
11 changed files
with
82 additions
and
76 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
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
This file was deleted.
Oops, something went wrong.
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,48 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Siemens AG | ||
* | ||
* SPDX-License-Identifier: MIT | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import { newSpecPage } from '@stencil/core/testing'; | ||
import '@testing-library/jest-dom'; | ||
import { Toast } from '../toast'; | ||
|
||
describe('toast', () => { | ||
it('renders', async () => { | ||
const page = await newSpecPage({ | ||
components: [Toast], | ||
html: '<ix-toast toast-title="Test title">Test message</ix-toast>', | ||
}); | ||
|
||
await page.waitForChanges(); | ||
|
||
expect(page.root).toEqualHtml(` | ||
<ix-toast class=\"animate__animated animate__fadeIn\" toast-title=\"Test title\"> | ||
<mock:shadow-root> | ||
<div class=\"toast-body\"> | ||
<div class="toast-icon"> | ||
<ix-icon color="color-std-text" name="info" size="24"></ix-icon> | ||
</div> | ||
<div class=\"toast-content\"> | ||
<div class=\"toast-title\"> | ||
Test title | ||
</div> | ||
<div class=\"toast-message\"> | ||
<slot></slot> | ||
</div> | ||
</div> | ||
<div class=\"toast-close\"> | ||
<ix-icon-button icon=\"close\" ghost=\"\" size=\"24\"></ix-icon-button> | ||
</div> | ||
</div> | ||
<div class=\"toast-progress-bar toast-progress-bar--animated\" style=\"animation-duration: 5000ms; animation-play-state: running;\"></div> | ||
</mock:shadow-root> | ||
Test message | ||
</ix-toast> | ||
`); | ||
}); | ||
}); |
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