Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/modules/overlay/module.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ describe('Overlay spec', () => {
await actions.openOverlay({ commit, state }, { id: 'foo', props: { title: 'bar' } });

const [mountOverlayEventArgs, openOverlayEventArgs] = commit.args;
const [openOverlayEventMutationType, openOverlayEventOverlayData] = openOverlayEventArgs;
const [openOverlayEventMutationType, openOverlayEventData] = openOverlayEventArgs;

expect(mountOverlayEventArgs).to.be.deep.equal([MOUNT_OVERLAY, { id: 'foo' }]);
expect(openOverlayEventMutationType).to.be.equal(OPEN_OVERLAY);

expect(openOverlayEventOverlayData.props.title).to.to.not.be.undefined;
expect(openOverlayEventOverlayData.props.title).to.be.equal('bar', 'The payload was properly forwarded');
expect(openOverlayEventData.props.title).to.to.not.be.undefined;
expect(openOverlayEventData.props.title).to.be.equal('bar', 'The payload was properly forwarded');
});

it('Opening the same overlay twice will not dispatch the mounting mutation again', async function() {
Expand All @@ -131,12 +131,12 @@ describe('Overlay spec', () => {

await actions.openOverlay({ commit, state }, { id: 'foo', props: { title: 'baz' } });

const [openOverlayEventMutationType, openOverlayEventOverlayData] = commit.args[0];
const [openOverlayEventMutationType, openOverlayEventData] = commit.args[0];

expect(commit.args).to.have.length(1);
expect(openOverlayEventMutationType).to.be.equal(OPEN_OVERLAY);
expect(openOverlayEventOverlayData.props.title).to.to.not.be.undefined;
expect(openOverlayEventOverlayData.props.title).to.be.equal('baz', 'The payload was properly forwarded');
expect(openOverlayEventData.props.title).to.to.not.be.undefined;
expect(openOverlayEventData.props.title).to.be.equal('baz', 'The payload was properly forwarded');
});
});

Expand Down