generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { readFile } from '@web/test-runner-commands'; | ||
import { expect } from '@esm-bundle/chai'; | ||
import { setConfig } from '../../../libs/utils/utils.js'; | ||
|
||
const { default: init } = await import('../../../libs/blocks/merch-twp/merch-twp.js'); | ||
|
||
describe('Merch TWP', () => { | ||
before(() => { | ||
setConfig({ base: window.location.origin, codeRoot: '/libs' }); | ||
}); | ||
|
||
it('should initialize merch-twp', async () => { | ||
document.body.innerHTML = await readFile({ path: './mocks/twp.html' }); | ||
|
||
const twp = await init(document.querySelector('.merch-twp')); | ||
const layout = twp?.querySelector('merch-subscription-layout'); | ||
const cards = layout.querySelectorAll('merch-card'); | ||
expect(layout).to.exist; | ||
expect(layout.querySelector('merch-subscription-panel')).to.exist; | ||
expect(cards.length).to.be.equal(4); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div class="merch-twp"> | ||
<div> | ||
<div> | ||
<h1 id="try-the-full-version-of-adobe-apps-with-a-7-day-free-trial">Try the full version of Adobe apps with a 7-day free trial.</h1> | ||
<p>Choose a plan:</p> | ||
<merch-card class="merch-card twp " variant="plans"></merch-card> | ||
<merch-card class="merch-card twp " variant="plans"></merch-card> | ||
<merch-card class="merch-card twp " variant="plans"></merch-card> | ||
<merch-card class="merch-card twp " variant="plans"></merch-card> | ||
</div> | ||
</div> | ||
</div> |