diff --git a/dialog/dialog_test.ts b/dialog/dialog_test.ts index c8f8dc2085..8b2575afe8 100644 --- a/dialog/dialog_test.ts +++ b/dialog/dialog_test.ts @@ -77,18 +77,13 @@ describe('', () => { expect(await harness.isDialogVisible()).toBeFalse(); }); - it('renders open state by calling show()/close()/toggleShow()', - async () => { - const {harness} = await setupTest(); - harness.element.show(); - expect(await harness.isDialogVisible()).toBeTrue(); - harness.element.close(); - expect(await harness.isDialogVisible()).toBeFalse(); - harness.element.toggleShow(); - expect(await harness.isDialogVisible()).toBeTrue(); - harness.element.toggleShow(); - expect(await harness.isDialogVisible()).toBeFalse(); - }); + it('renders open state by calling show()/close()', async () => { + const {harness} = await setupTest(); + harness.element.show(); + expect(await harness.isDialogVisible()).toBeTrue(); + harness.element.close(); + expect(await harness.isDialogVisible()).toBeFalse(); + }); it('renders scrim', async () => { const {harness} = await setupTest(); diff --git a/dialog/internal/dialog.ts b/dialog/internal/dialog.ts index 054d3db5b0..f19949f3d1 100644 --- a/dialog/internal/dialog.ts +++ b/dialog/internal/dialog.ts @@ -159,17 +159,6 @@ export class Dialog extends LitElement { this.open = false; } - /** - * Opens and shows the dialog if it is closed; otherwise closes it. - */ - toggleShow() { - if (this.open) { - this.close(this.currentAction); - } else { - this.show(); - } - } - private getContentScrollInfo() { if (!this.hasUpdated || !this.contentElement) { return {isScrollable: false, isAtScrollTop: true, isAtScrollBottom: true};