aboutsummaryrefslogtreecommitdiffstats
path: root/test/screens
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-03-30 15:59:16 +0800
committerkumavis <aaron@kumavis.me>2018-03-30 15:59:16 +0800
commit0d27d27efa31f614973e6e5cbc8f53cc85aa0bc2 (patch)
tree6ba5292cf7b24fb9b0fec02e63d30599e4330c5f /test/screens
parentfcdfd48057db83801d37bc54b1a04c0a328ab24c (diff)
downloadtangerine-wallet-browser-0d27d27efa31f614973e6e5cbc8f53cc85aa0bc2.tar
tangerine-wallet-browser-0d27d27efa31f614973e6e5cbc8f53cc85aa0bc2.tar.gz
tangerine-wallet-browser-0d27d27efa31f614973e6e5cbc8f53cc85aa0bc2.tar.bz2
tangerine-wallet-browser-0d27d27efa31f614973e6e5cbc8f53cc85aa0bc2.tar.lz
tangerine-wallet-browser-0d27d27efa31f614973e6e5cbc8f53cc85aa0bc2.tar.xz
tangerine-wallet-browser-0d27d27efa31f614973e6e5cbc8f53cc85aa0bc2.tar.zst
tangerine-wallet-browser-0d27d27efa31f614973e6e5cbc8f53cc85aa0bc2.zip
development - screenshotter - capture en locale and build gif from only en
Diffstat (limited to 'test/screens')
-rw-r--r--test/screens/new.spec.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/screens/new.spec.js b/test/screens/new.spec.js
index 83b960c58..14daac1c1 100644
--- a/test/screens/new.spec.js
+++ b/test/screens/new.spec.js
@@ -36,8 +36,6 @@ async function captureAllScreens() {
await driver.switchTo().window(tabs[0])
await delay(300)
- await captureScreenShot('start-old')
-
// click try new ui
await driver.findElement(By.css('#app-content > div > div.app-primary.from-right > div > div.flex-row.flex-center.flex-grow > p')).click()
await delay(300)
@@ -105,7 +103,7 @@ async function captureAllScreens() {
// finish up
console.log('building gif...')
await generateGif()
- // await driver.quit()
+ await driver.quit()
return
//
@@ -147,12 +145,15 @@ async function captureAllScreens() {
async function captureLanguageScreenShots(label) {
const nonEnglishLocales = localesIndex.filter(localeMeta => localeMeta.code !== 'en')
+ // take english shot
+ await captureScreenShot(`${label} (en)`)
for (let localeMeta of nonEnglishLocales) {
- // set locale
+ // set locale and take shot
await setLocale(localeMeta.code)
await delay(300)
await captureScreenShot(`${label} (${localeMeta.code})`)
}
+ // return locale to english
await setLocale('en')
await delay(300)
}
@@ -184,11 +185,11 @@ async function captureAllScreens() {
const pngBuffer = Buffer.from(screenshot, 'base64')
const size = sizeOfPng.calculate(pngBuffer)
- // read all pngs into gif
+ // read only the english pngs into gif
const encoder = new GIFEncoder(size.width, size.height)
- const stream = pngFileStream('./test-artifacts/screens/*.png')
+ const stream = pngFileStream('./test-artifacts/screens/* (en).png')
.pipe(encoder.createWriteStream({ repeat: -1, delay: 1000, quality: 10 }))
- .pipe(fs.createWriteStream('./test-artifacts/screens/walkthrough.gif'))
+ .pipe(fs.createWriteStream('./test-artifacts/screens/walkthrough (en).gif'))
// wait for end
await pify(endOfStream)(stream)