Skip to content

Commit bca804a

Browse files
authored
refactor(test): Refactor integration test suite (#131)
* refactor(test): refactor to leverage a test matrix in CI environments WIP: fiddling with Travis YML Jobs WIP: refactor build matrix WIP: remove integration tests (Will reimpl) WIP: remove files that snuck in WIP: remove unneeded arg WIP: add node_modules bin to path fix(*): remove project config (intended to be supplied) WIP: reset TEST_ENV for int tests WIP: update Travis yarn dep WIP: use before_install script instead of install script * WIP: slight glob refactor WIP: reimplement browserify/webpack integration tests WIP: fiddling with int test CI WIP: build matrix for Integration tests (parallelize those jobs too) WIP: trying to parallelize int tests WIP: remove unneeded env assignment WIP: blahhh... WIP: should work... WIP: removing env WIP: removing test harness I haven't started yet test(typescript): add typescript namespace tests * refactor(tests): refactor test harness to be more isolate * docs(integration-tests): add README.md to explain high level concepts * test(integration): add service worker testing * refactor(tests): better isolate the tests from the main package by leveraging their own binaries * fix(storage): remove unnecessary console.log statements * fix(travis.yml): remove unneeded test script argument * test(quickstart): add quickstart integration tests refactor(quickstart-tests): refactor to use FIREBASE_PROJECT as an env var rather than an arg fix(tests): ensure that the wdio binary is pointing to the proper location fix(deps): add dep to quickstart package.json refactor(deps): move ts-node dep to devDeps fix(quickstart-tests): run tests on saucelabs WIP: refactor to remove reload (causing flakiness issues) refactor(quickstart): refactor to only navigate to the base URL instead of reloading the page fix(quickstarts): fix timing issue with reloads WIP: try limiting the scope to the :first-child WIP: refactor the tests to reference the intended post directly rather than indirectly. WIP: refactor to not iterate
1 parent 16ca08b commit bca804a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1702
-1804
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ npm-debug.log
55
/coverage
66
/.nyc_output
77
/tests/config
8-
/temp
8+
temp/
99
/.vscode
1010
/.ts-node
1111
/.idea

.travis.yml

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,43 @@
1-
sudo: required
2-
dist: trusty
31
language: node_js
4-
node_js: "6"
5-
env:
6-
- CXX=g++-4.8
2+
node_js:
3+
- 6
74
cache: yarn
5+
6+
# Define global C++ compiler version
7+
env:
8+
global:
9+
- CXX=g++-4.8
10+
matrix:
11+
- TEST_ENV=node
12+
- TEST_ENV=browser
13+
before_install:
14+
# Yarn defaults to an old version, make sure we
15+
# get an up to date version
16+
- npm install -g yarn
17+
before_script:
18+
- export PATH=$PATH:./node_modules/.bin
19+
- mkdir -p tests/config && echo "$PROJECT_CONFIG" > tests/config/project.json
20+
script:
21+
gulp test --env="$TEST_ENV"
22+
23+
# Integration Test suite
24+
jobs:
25+
include:
26+
- stage: Integration Tests
27+
script: ./integration/webpack/runner.sh
28+
- script: ./integration/browserify/runner.sh
29+
- script: ./integration/typescript/runner.sh
30+
- script: ./integration/serviceWorker/runner.sh
31+
- script: ./integration/quickstart/runner.sh
32+
33+
# Misc Addons/Configs
34+
dist: trusty
35+
sudo: required
836
addons:
9-
firefox: latest
1037
apt:
1138
sources:
1239
- google-chrome
1340
- ubuntu-toolchain-r-test
1441
packages:
1542
- google-chrome-stable
1643
- g++-4.8
17-
before_script:
18-
- "export DISPLAY=:99.0"
19-
- "mkdir -p tests/config && echo \"$PROJECT_CONFIG\" > tests/config/project.json"
20-
script:
21-
- xvfb-run npm test

gulp/config.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,6 @@ const configObj = {
2929
paths: {
3030
outDir: path.resolve(cwd, 'dist'),
3131
tempDir: path.resolve(cwd, 'temp'),
32-
test: {
33-
unit: [
34-
'tests/**/*.test.ts',
35-
'!tests/**/browser/**/*.test.ts',
36-
'!tests/**/binary/**/*.test.ts',
37-
'!src/firebase-*.ts',
38-
],
39-
binary: [
40-
'tests/**/binary/**/*.test.ts',
41-
'!tests/**/binary/**/browser/**/*.test.ts',
42-
],
43-
integration: [
44-
'temp/**/*.test.js',
45-
'!temp/**/browser/**/*',
46-
'!temp/**/react-native/**/*',
47-
]
48-
}
4932
},
5033
babel: {
5134
plugins: [
@@ -119,7 +102,7 @@ const configObj = {
119102

120103
// start these browsers
121104
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
122-
browsers: ['ChromeHeadless', 'Firefox'],
105+
browsers: ['ChromeHeadless'],
123106

124107
// Continuous Integration mode
125108
// if true, Karma captures browsers, runs the tests and exits

gulp/tasks/test.integration.js

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)