Skip to content

Commit

Permalink
Added cta-card.test
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldlangeveld committed Jan 22, 2025
1 parent 51ee88a commit 6ea054a
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions packages/koenig-lexical/test/e2e/cards/cta-card.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import {assertHTML, createSnippet, focusEditor, html, initialize, insertCard} from '../../utils/e2e';
import {expect, test} from '@playwright/test';

test.describe('Call To Action Card', async () => {
let page;

test.beforeAll(async ({browser}) => {
page = await browser.newPage();
});

test.beforeEach(async () => {
await initialize({page});
});

test.afterAll(async () => {
await page.close();
});

test('renders CTA Card', async function () {
await focusEditor(page);
await insertCard(page, {cardName: 'call-to-action'});

await assertHTML(page, html`
<div data-lexical-decorator="true" contenteditable="false">
<div data-kg-card-editing="true" data-kg-card-selected="true" data-kg-card="call-to-action">
</div>
</div>
<p><br /></p>
`, {ignoreCardContents: true});
});
});

0 comments on commit 6ea054a

Please sign in to comment.