mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 15:51:16 +08:00
Merge remote-tracking branch 'origin/main' into sp/sync-feature-8-with-main-2
This commit is contained in:
@ -93,6 +93,19 @@ describe('toast: a11y smoke test', () => {
|
||||
});
|
||||
|
||||
describe('toast: duration config', () => {
|
||||
afterEach(() => {
|
||||
/**
|
||||
* Important: Reset the config
|
||||
* after each test as it is not
|
||||
* automatically reset.
|
||||
* Otherwise, toasts in other tests
|
||||
* will take on any toastDuration value
|
||||
* set and timeouts will potentially run
|
||||
* after tests are finished.
|
||||
*/
|
||||
config.reset({});
|
||||
});
|
||||
|
||||
it('should have duration set to 0', async () => {
|
||||
const page = await newSpecPage({
|
||||
components: [Toast],
|
||||
|
||||
@ -401,6 +401,10 @@ export class Toast implements ComponentInterface, OverlayInterface {
|
||||
* This can be useful in a button handler for determining which button was
|
||||
* clicked to dismiss the toast.
|
||||
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
||||
*
|
||||
* This is a no-op if the overlay has not been presented yet. If you want
|
||||
* to remove an overlay from the DOM that was never presented, use the
|
||||
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
||||
*/
|
||||
@Method()
|
||||
async dismiss(data?: any, role?: string): Promise<boolean> {
|
||||
|
||||
Reference in New Issue
Block a user