Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
5124c613
Unverified
Commit
5124c613
authored
May 31, 2018
by
Ray Schamp
Committed by
GitHub
May 31, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1910 from LLK/travis
Run smoke tests with Travis after deployment
parents
963a1898
ecd3f673
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
25 deletions
+62
-25
.travis.yml
.travis.yml
+37
-17
test/integration/package.json
test/integration/package.json
+1
-1
test/integration/selenium-helpers.js
test/integration/selenium-helpers.js
+21
-4
test/integration/smoke-testing/test_project_rows.js
test/integration/smoke-testing/test_project_rows.js
+3
-3
No files found.
.travis.yml
View file @
5124c613
...
@@ -18,6 +18,12 @@ env:
...
@@ -18,6 +18,12 @@ env:
-
API_HOST_VAR=API_HOST_$TRAVIS_BRANCH
-
API_HOST_VAR=API_HOST_$TRAVIS_BRANCH
-
API_HOST=${!API_HOST_VAR}
-
API_HOST=${!API_HOST_VAR}
-
API_HOST=${API_HOST:-$API_HOST_STAGING}
-
API_HOST=${API_HOST:-$API_HOST_STAGING}
-
ROOT_URL_master=https://scratch.mit.edu
-
ROOT_URL_STAGING=https://scratch.ly
-
ROOT_URL_VAR=ROOT_URL_$TRAVIS_BRANCH
-
ROOT_URL=${!ROOT_URL_VAR}
-
ROOT_URL=${ROOT_URL:-$ROOT_URL_STAGING}
-
PATH=$PATH:$PWD/test/integration/node_modules/chromedriver/bin
# EB_AWS_ACCESS_KEY_ID
# EB_AWS_ACCESS_KEY_ID
-
secure
:
A138rYuXDsOmpEwYxZ31WyXEeq5fg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P1WE/EswaIyK5qMp522E79mP1yH6M750iUvi4N39+QW1BNX3ADkOwyAI67ArX5on5gWP83RXcJ15im7XsBpsmVn/KXi6AouWPb8jmSmKCj0QZCzfLY7ivM42IugYpK2NV7kFB38DpXQamJ5eskgwYa3elRmednIFUuwb1QDnONvJogVjk4CLmoSxssC2mJnnrUItM7l8G6As81GMI+6lTtl86hAuXBjUk60FMbgTAQDX9ll26LgpBy8jHSx8=
# EB_AWS_SECRET_ACCESS_KEY
# EB_AWS_SECRET_ACCESS_KEY
...
@@ -58,6 +64,7 @@ env:
...
@@ -58,6 +64,7 @@ env:
-
NODE_ENV=production
-
NODE_ENV=production
-
WWW_VERSION=${TRAVIS_COMMIT:0:5}
-
WWW_VERSION=${TRAVIS_COMMIT:0:5}
addons
:
addons
:
chrome
:
stable
apt
:
apt
:
sources
:
sources
:
-
ubuntu-toolchain-r-test
-
ubuntu-toolchain-r-test
...
@@ -66,20 +73,33 @@ addons:
...
@@ -66,20 +73,33 @@ addons:
install
:
install
:
-
sudo -H pip install -r requirements.txt
-
sudo -H pip install -r requirements.txt
-
npm --production=false install
-
npm --production=false install
deploy
:
jobs
:
-
provider
:
script
include
:
skip_cleanup
:
$SKIP_CLEANUP
-
stage
:
test
script
:
env make sync
deploy
:
on
:
-
provider
:
script
repo
:
LLK/scratch-www
skip_cleanup
:
$SKIP_CLEANUP
branch
:
script
:
env make sync
-
develop
on
:
-
hotfix/*
repo
:
LLK/scratch-www
-
release/*
branch
:
-
provider
:
script
-
develop
skip_cleanup
:
$SKIP_CLEANUP
-
hotfix/*
script
:
env make sync
-
release/*
on
:
-
provider
:
script
repo
:
LLK/scratch-www
skip_cleanup
:
$SKIP_CLEANUP
branch
:
script
:
env make sync
-
master
on
:
repo
:
LLK/scratch-www
branch
:
-
master
-
stage
:
smoke
install
:
-
cd test/integration
-
npm install
-
cd -
script
:
npm run smoke
stages
:
-
test
-
name
:
smoke
if
:
branch IN (travis) and type != pull_request
test/integration/package.json
View file @
5124c613
{
{
"de
vDe
pendencies"
:
{
"dependencies"
:
{
"selenium-webdriver"
:
"3.6.0"
,
"selenium-webdriver"
:
"3.6.0"
,
"chromedriver"
:
"2.37.0"
"chromedriver"
:
"2.37.0"
}
}
...
...
test/integration/selenium-helpers.js
View file @
5124c613
var
webdriver
=
require
(
'
selenium-webdriver
'
);
var
webdriver
=
require
(
'
selenium-webdriver
'
);
const
driver
=
new
webdriver
.
Builder
()
const
headless
=
process
.
env
.
SMOKE_HEADLESS
||
false
;
.
forBrowser
(
'
chrome
'
)
.
build
();
const
getDriver
=
function
()
{
const
chromeCapabilities
=
webdriver
.
Capabilities
.
chrome
();
let
args
=
[];
if
(
headless
)
{
args
.
push
(
'
--headless
'
);
args
.
push
(
'
window-size=1024,1680
'
);
args
.
push
(
'
--no-sandbox
'
);
}
chromeCapabilities
.
set
(
'
chromeOptions
'
,
{
args
});
const
newDriver
=
new
webdriver
.
Builder
()
.
forBrowser
(
'
chrome
'
)
.
withCapabilities
(
chromeCapabilities
)
.
build
();
return
newDriver
;
};
const
driver
=
getDriver
();
const
{
By
,
until
}
=
webdriver
;
const
{
By
,
until
}
=
webdriver
;
...
@@ -70,5 +86,6 @@ module.exports = {
...
@@ -70,5 +86,6 @@ module.exports = {
clickButton
,
clickButton
,
findByCss
,
findByCss
,
clickCss
,
clickCss
,
getLogs
getLogs
,
getDriver
};
};
test/integration/smoke-testing/test_project_rows.js
View file @
5124c613
...
@@ -12,9 +12,9 @@ var seleniumWebdriver = require('selenium-webdriver');
...
@@ -12,9 +12,9 @@ var seleniumWebdriver = require('selenium-webdriver');
// Selenium's promise driver will be deprecated, so we should not rely on it
// Selenium's promise driver will be deprecated, so we should not rely on it
seleniumWebdriver
.
SELENIUM_PROMISE_MANAGER
=
0
;
seleniumWebdriver
.
SELENIUM_PROMISE_MANAGER
=
0
;
// chrome driver
const
{
var
driver
=
new
seleniumWebdriver
.
Builder
().
withCapabilities
(
seleniumWebdriver
.
Capabilities
.
chrome
())
driver
.
build
(
);
}
=
require
(
'
../selenium-helpers.js
'
);
var
rootUrl
=
process
.
env
.
ROOT_URL
||
'
https://scratch.ly
'
;
var
rootUrl
=
process
.
env
.
ROOT_URL
||
'
https://scratch.ly
'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment