-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into release/v.0.2.0
* master: feat(banner): additional props for banner localisation (#103) chore: Lint workflow checks and cleanup (#102) fix: Changed Responsive design (#98) feat: Integrated Visual Regression with ember-backstop (#94) fix: Refactored Github action CI workflow (#96) Removed since (#95) fix(modal): modal patch for safari (#91) fix(nucleus): removed classic decorator dependency (#87) fix(icon): fixed failing tests (#89) [RELEASE] 0.3.0 (#79) # Conflicts: # packages/banner/package.json # packages/button/package.json # packages/inline-banner/package.json # packages/modal/package.json # packages/toast-message/package.json
- Loading branch information
Showing
107 changed files
with
2,001 additions
and
167 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,7 @@ tmp | |
/bower.json.ember-try | ||
/package.json.ember-try | ||
.DS_Store | ||
|
||
#backstopjs | ||
html_report | ||
bitmaps_test |
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,11 @@ | ||
/* eslint-env node */ | ||
'use strict'; | ||
|
||
module.exports = { | ||
extends: 'recommended', | ||
|
||
rules: { | ||
'no-bare-strings': false, | ||
'quotes': 'double' | ||
} | ||
}; |
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
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,37 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
id: `ember-backstop test`, | ||
viewports: [ | ||
{ | ||
label: 'webview', | ||
width: 1440, | ||
height: 900, | ||
}, | ||
], | ||
onBeforeScript: `puppet/onBefore.js`, | ||
onReadyScript: `puppet/onReady.js`, | ||
scenarios: [ | ||
{ | ||
label: '{testName}', | ||
cookiePath: 'backstop_data/engine_scripts/cookies.json', | ||
url: '{origin}/backstop/dview/{testId}/{scenarioId}', | ||
delay: 500, | ||
}, | ||
], | ||
paths: { | ||
bitmaps_reference: 'backstop_data/bitmaps_reference', | ||
bitmaps_test: 'backstop_data/bitmaps_test', | ||
engine_scripts: 'backstop_data/engine_scripts', | ||
html_report: 'backstop_data/html_report', | ||
ci_report: 'backstop_data/ci_report', | ||
}, | ||
report: [], | ||
engine: 'puppet', | ||
engineOptions: { | ||
args: ['--no-sandbox'], | ||
}, | ||
asyncCaptureLimit: 10, | ||
asyncCompareLimit: 50, | ||
debug: false, | ||
debugWindow: false, | ||
}; |
Binary file added
BIN
+12.9 KB
...nner_with_link_passes_visual_regression_tests__assert0_0_document_0_webview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.72 KB
..._normal_banner_passes_visual_regression_tests__assert0_0_document_0_webview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions
41
packages/banner/ember-backstop/backstop_data/engine_scripts/puppet/clickAndHoverHelper.js
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,41 @@ | ||
/* eslint-env browser, node */ | ||
|
||
module.exports = async (page, scenario) => { | ||
const hoverSelector = scenario.hoverSelectors || scenario.hoverSelector; | ||
const clickSelector = scenario.clickSelectors || scenario.clickSelector; | ||
const keyPressSelector = scenario.keyPressSelectors || scenario.keyPressSelector; | ||
const scrollToSelector = scenario.scrollToSelector; | ||
const postInteractionWait = scenario.postInteractionWait; // selector [str] | ms [int] | ||
|
||
if (keyPressSelector) { | ||
for (const keyPressSelectorItem of [].concat(keyPressSelector)) { | ||
await page.waitFor(keyPressSelectorItem.selector); | ||
await page.type(keyPressSelectorItem.selector, keyPressSelectorItem.keyPress); | ||
} | ||
} | ||
|
||
if (hoverSelector) { | ||
for (const hoverSelectorIndex of [].concat(hoverSelector)) { | ||
await page.waitFor(hoverSelectorIndex); | ||
await page.hover(hoverSelectorIndex); | ||
} | ||
} | ||
|
||
if (clickSelector) { | ||
for (const clickSelectorIndex of [].concat(clickSelector)) { | ||
await page.waitFor(clickSelectorIndex); | ||
await page.click(clickSelectorIndex); | ||
} | ||
} | ||
|
||
if (postInteractionWait) { | ||
await page.waitFor(postInteractionWait); | ||
} | ||
|
||
if (scrollToSelector) { | ||
await page.waitFor(scrollToSelector); | ||
await page.evaluate(scrollToSelector => { | ||
document.querySelector(scrollToSelector).scrollIntoView(); | ||
}, scrollToSelector); | ||
} | ||
}; |
11 changes: 11 additions & 0 deletions
11
packages/banner/ember-backstop/backstop_data/engine_scripts/puppet/onReady.js
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,11 @@ | ||
/* eslint-env browser, node */ | ||
|
||
const debug = require('debug')('BackstopJS'); | ||
|
||
module.exports = async (page, scenario) => { | ||
debug('SCENARIO > ' + scenario.label); | ||
await require('./overrideCSS')(page, scenario); | ||
await require('./clickAndHoverHelper')(page, scenario); | ||
|
||
// add more ready handlers here... | ||
}; |
13 changes: 13 additions & 0 deletions
13
packages/banner/ember-backstop/backstop_data/engine_scripts/puppet/overrideCSS.js
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,13 @@ | ||
/* eslint-env browser, node */ | ||
|
||
module.exports = function(page) { | ||
// inject arbitrary css to override styles | ||
page.evaluate(() => { | ||
const BACKSTOP_TEST_CSS_OVERRIDE = `#ember-testing {width: 100% !important; height: 100% !important; -webkit-transform: scale(1) !important; transform: scale(1) !important;}`; | ||
let style = document.createElement('style'); | ||
style.type = 'text/css'; | ||
let styleNode = document.createTextNode(BACKSTOP_TEST_CSS_OVERRIDE); | ||
style.appendChild(styleNode); | ||
document.head.appendChild(style); | ||
}); | ||
}; |
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
Oops, something went wrong.