Skip to content

Commit

Permalink
fix(modal): event name in test
Browse files Browse the repository at this point in the history
  • Loading branch information
aesteves60 authored and dpellier committed Jul 29, 2024
1 parent c13fec8 commit 9ea848d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/ods/src/components/modal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint:scss": "stylelint 'src/components/**/*.scss'",
"lint:ts": "eslint '{src,tests}/**/*.{js,ts,tsx}'",
"start": "stencil build --dev --watch --serve",
"test:e2e": "stencil test --e2e --config stencil.config.ts",
"test:e2e": "stencil test --e2e --runInBand --config stencil.config.ts",
"test:e2e:ci": "tsc --noEmit && stencil test --e2e --ci --runInBand --config stencil.config.ts",
"test:spec": "stencil test --spec --config stencil.config.ts --coverage",
"test:spec:ci": "tsc --noEmit && stencil test --config stencil.config.ts --spec --ci"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('ods-modal behaviour', () => {

it('should trigger open event when opening', async() => {
await setup('<ods-modal><ods-text>Hello, world!</ods-text></ods-modal>');
const openSpy = await page.spyOnEvent('odsModalOpen');
const openSpy = await page.spyOnEvent('odsOpen');

const modal = await page.find('ods-modal');
await modal.callMethod('open');
Expand All @@ -33,7 +33,7 @@ describe('ods-modal behaviour', () => {

it('should trigger close event when closing', async() => {
await setup('<ods-modal is-open><ods-text>Hello, world!</ods-text></ods-modal>');
const closeSpy = await page.spyOnEvent('odsModalClose');
const closeSpy = await page.spyOnEvent('odsClose');

const modal = await page.find('ods-modal');
await modal.callMethod('close');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('ods-modal navigation', () => {
<ods-text>Hello, world!</ods-text>
</ods-modal>
`);
const closeSpy = await page.spyOnEvent('odsModalClose');
const closeSpy = await page.spyOnEvent('odsClose');

const dismissButton = await page.find('ods-modal >>> .ods-modal__dialog__header__close');
await dismissButton.click();
Expand All @@ -81,7 +81,7 @@ describe('ods-modal navigation', () => {

it('should close the modal on dismissible button "Enter" press', async() => {
await setup('<ods-modal is-open is-dismissible="true"><ods-text>Hello, world!</ods-text></ods-modal>');
const closeSpy = await page.spyOnEvent('odsModalClose');
const closeSpy = await page.spyOnEvent('odsClose');

const dismissButton = await page.find('ods-modal >>> .ods-modal__dialog__header__close');
await dismissButton.press('Enter');
Expand All @@ -93,7 +93,7 @@ describe('ods-modal navigation', () => {

it('should close the modal on dismissible button "Space" press', async() => {
await setup('<ods-modal is-open is-dismissible="true"><ods-text>Hello, world!</ods-text></ods-modal>');
const closeSpy = await page.spyOnEvent('odsModalClose');
const closeSpy = await page.spyOnEvent('odsClose');

const dismissButton = await page.find('ods-modal >>> .ods-modal__dialog__header__close');
await dismissButton.press('Space');
Expand Down

0 comments on commit 9ea848d

Please sign in to comment.