Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Commit

Permalink
test: using test instead of it in the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
johnvente committed Feb 12, 2024
1 parent f471c5c commit 6f38272
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ describe('TinyMCE Embed IFrame Plugin', () => {
jest.clearAllMocks();
});

it('opens insert iframe modal on button action', () => {
test('opens insert iframe modal on button action', () => {
// Invoke the plugin
tinyMCEEmbedIframePlugin(editorMock);

editorMock.ui.registry.addButton.mock.calls[0][1].onAction();
expect(editorMock.windowManager.open).toHaveBeenCalled();
});

it('opens insert iframe modal on button action validate onSubmit and OnChange function', () => {
test('opens insert iframe modal on button action validate onSubmit and OnChange function', () => {
tinyMCEEmbedIframePlugin(editorMock);

editorMock.ui.registry.addButton.mock.calls[0][1].onAction();
Expand All @@ -124,7 +124,7 @@ describe('TinyMCE Embed IFrame Plugin', () => {
);
});

it('opens insert iframe modal on button action validate title', () => {
test('opens insert iframe modal on button action validate title', () => {
tinyMCEEmbedIframePlugin(editorMock);

editorMock.ui.registry.addButton.mock.calls[0][1].onAction();
Expand All @@ -136,7 +136,7 @@ describe('TinyMCE Embed IFrame Plugin', () => {
);
});

it('opens insert iframe modal on button action validate buttons', () => {
test('opens insert iframe modal on button action validate buttons', () => {
tinyMCEEmbedIframePlugin(editorMock);

editorMock.ui.registry.addButton.mock.calls[0][1].onAction();
Expand All @@ -148,7 +148,7 @@ describe('TinyMCE Embed IFrame Plugin', () => {
);
});

it('opens insert iframe modal on button action validate tabs', () => {
test('opens insert iframe modal on button action validate tabs', () => {
tinyMCEEmbedIframePlugin(editorMock);

editorMock.ui.registry.addButton.mock.calls[0][1].onAction();
Expand All @@ -161,7 +161,7 @@ describe('TinyMCE Embed IFrame Plugin', () => {
}),
);
});
it('tests onChange function in plugin', () => {
test('tests onChange function in plugin', () => {
tinyMCEEmbedIframePlugin(editorMock);
editorMock.ui.registry.addButton.mock.calls[0][1].onAction();

Expand All @@ -184,7 +184,7 @@ describe('TinyMCE Embed IFrame Plugin', () => {
expect(apiMock.redial).toHaveBeenCalled();
});

it('modifies generalTab items when sizeType is not inline', () => {
test('modifies generalTab items when sizeType is not inline', () => {
tinyMCEEmbedIframePlugin(editorMock);
editorMock.ui.registry.addButton.mock.calls[0][1].onAction();

Expand Down Expand Up @@ -220,7 +220,7 @@ describe('TinyMCE Embed IFrame Plugin', () => {
}));
});

it('adds sizeinput to generalTab items when sizeType is inline', () => {
test('adds sizeinput to generalTab items when sizeType is inline', () => {
tinyMCEEmbedIframePlugin(editorMock);
editorMock.ui.registry.addButton.mock.calls[0][1].onAction();

Expand All @@ -245,7 +245,7 @@ describe('TinyMCE Embed IFrame Plugin', () => {
);
});

it('tests onSubmit function in plugin', () => {
test('tests onSubmit function in plugin', () => {
const dataMock = {
source: 'https://www.example.com',
sizeType: 'big',
Expand All @@ -266,7 +266,7 @@ describe('TinyMCE Embed IFrame Plugin', () => {
expect(apiMock.close).toHaveBeenCalled();
});

it('tests onSubmit function in plugin advanced properties', () => {
test('tests onSubmit function in plugin advanced properties', () => {
const dataMock = {
source: 'https://www.example.com',
sizeType: 'big',
Expand Down

0 comments on commit 6f38272

Please sign in to comment.