Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CCI rendering errors #163

Merged
merged 1 commit into from
Mar 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ jobs:
# Each step uses the same `$BASH_ENV`, so need to modify it
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
- run:
name: Upgrade Chrome
command: |
curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome.deb
sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome
rm google-chrome.deb
- run:
name: Install Yarn
command: npm i -g yarn
Expand All @@ -31,14 +38,6 @@ jobs:
key: dependency-cache-v0-{{ checksum "yarn.lock" }}
paths:
- node_modules
- run:
name: Install Dependencies
command: |
node -v
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update -y
sudo apt-get install lsb-base google-chrome-stable -y
- run:
name: Build
command: |
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"eslint": "5.12.1",
"eslint-config-airbnb": "17.1.0",
"eslint-plugin-import": "2.15.0",
"eslint-plugin-protractor": "1.41.0",
"eslint-plugin-react": "7.12.4",
"glob": "7.1.3",
"handlebars": "4.0.12",
Expand Down
8 changes: 8 additions & 0 deletions test/component/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"env": {
"protractor": true
},
"plugins": [
"protractor"
]
}
1 change: 1 addition & 0 deletions test/component/components.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Object.keys(components).forEach((component) => {
before(() => browser.get(file));

it('should match baseline', () => {
browser.wait(protractor.ExpectedConditions.presenceOf($('body.ready'), 5 * 1000, 'Page was not ready to render'));
const img = browser.takeImageOf(settings);
expect(img).to.eventually.matchImageOf(fixture, component);
});
Expand Down
5 changes: 5 additions & 0 deletions test/fixtures/src/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,9 @@
</head>
<body>
{{{content}}}
<script>
setTimeout(() => {
document.body.classList.add('ready');
}, 500)
</script>
</body>
Loading