-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from adjust/v111
Version 1.1.1
- Loading branch information
Showing
13 changed files
with
588 additions
and
13 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
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
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,33 @@ | ||
import { SmartBannerLayoutFactory, SmartBannerViewData } from '@adjustcom/smart-banner-sdk-layout'; | ||
|
||
import json from '../../../../../fake-data/visual-tests/texts-lengths-in-small-banner.json'; | ||
|
||
const records = json as any as SmartBannerViewData[]; | ||
|
||
export function VisualTest(banners: SmartBannerViewData[] = records) { | ||
const render = (appRoot: HTMLElement) => { | ||
|
||
const root = document.createElement('div'); | ||
root.style.height = '100vh'; | ||
root.style.display = 'flex'; | ||
root.style.flexDirection = 'column'; | ||
root.style.flexWrap = 'wrap'; | ||
|
||
const elements: HTMLElement[] = []; | ||
|
||
for (let record of banners) { | ||
const elem = document.createElement('div'); | ||
elem.style.padding = '3px'; | ||
|
||
const preview = SmartBannerLayoutFactory.createPreview(record); | ||
preview.render(elem); | ||
|
||
elements.push(elem); | ||
} | ||
|
||
root.append(...elements); | ||
appRoot.append(root); | ||
}; | ||
|
||
return { render }; | ||
} |
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
"./../typings.d.ts" | ||
], | ||
"compilerOptions": { | ||
"allowJs": true | ||
"allowJs": true, | ||
"resolveJsonModule": true, | ||
} | ||
} |
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
Oops, something went wrong.