Replace SauceLabs with BrowserStack (#171)

This commit is contained in:
jelhan 2019-03-14 21:30:48 +01:00 committed by GitHub
parent 25b9bf0aba
commit b8c02ca579
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 581 additions and 557 deletions

4
.gitignore vendored
View file

@ -25,3 +25,7 @@
/.node_modules.ember-try/ /.node_modules.ember-try/
/bower.json.ember-try /bower.json.ember-try
/package.json.ember-try /package.json.ember-try
# BrowserStack
/*.pid
/*.log

View file

@ -8,9 +8,7 @@ matrix:
- env: TEST="API" - env: TEST="API"
php: 5.6 php: 5.6
- env: TEST="EMBER" - env: TEST="EMBER"
- env: TEST="SAUCE" - env: TEST="BROWSER"
allow_failures:
- env: TEST="SAUCE"
dist: trusty dist: trusty
sudo: false sudo: false
@ -21,36 +19,38 @@ addons:
cache: cache:
yarn: true yarn: true
env:
global:
- "BROWSERSTACK_USERNAME=jeldrikhanschke1"
- "BROWSERSTACK_ACCESS_KEY=xaM9Uxurv2GyxFLKQXgj"
before_install: before_install:
- if [ "$TEST" == "API" ]; then export TEST_API=true; else export TEST_API=false; fi # provide yarn if ember build is tested
- if [ "$TEST" == "EMBER" ]; then export TEST_EMBER=true; else export TEST_EMBER=false; fi - if [ $TEST = "EMBER" ] || [ $TEST = "BROWSER" ]; then curl -o- -L https://yarnpkg.com/install.sh | bash; fi
- if [ "$TEST" == "SAUCE" ]; then export TEST_SAUCE=true; else export TEST_SAUCE=false; fi - if [ $TEST = "EMBER" ] || [ $TEST = "BROWSER" ]; then export PATH=$HOME/.yarn/bin:$PATH; fi
# provide yarn and bower if ember build is tested
- if $TEST_EMBER || $TEST_SAUCE; then curl -o- -L https://yarnpkg.com/install.sh | bash; fi
- if $TEST_EMBER || $TEST_SAUCE; then export PATH=$HOME/.yarn/bin:$PATH; fi
install: install:
# install dependencies for client # install dependencies for client
- if $TEST_EMBER || $TEST_SAUCE; then yarn install --no-interactive; fi - if [ $TEST = "EMBER" ] || [ $TEST = "BROWSER" ]; then yarn install --no-interactive; fi
# install dependencies for api # install dependencies for api
- if $TEST_API; then cd api/ && composer install && cd ..; fi - if [ $TEST = "API" ]; then cd api/ && composer install && cd ..; fi
before_script: before_script:
# http://php.net/manual/de/ini.core.php#ini.always-populate-raw-post-data # http://php.net/manual/de/ini.core.php#ini.always-populate-raw-post-data
- if $TEST_API; then echo 'always_populate_raw_post_data = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi - if [ $TEST = "API" ]; then echo 'always_populate_raw_post_data = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
# create a sauce tunnel # create a browser stack tunnel for cross-browser testing
- if $TEST_SAUCE; then node_modules/ember-cli/bin/ember sauce:connect; fi - if [ $TEST = "BROWSER" ]; then node_modules/ember-cli/bin/ember browserstack:connect; fi
script: script:
# run frontend and integration tests # run frontend and integration tests
- if $TEST_EMBER; then yarn run lint:hbs; fi - if [ $TEST = "EMBER" ]; then yarn run lint:hbs; fi
- if $TEST_EMBER; then yarn run lint:js; fi - if [ $TEST = "EMBER" ]; then yarn run lint:js; fi
- if $TEST_EMBER; then yarn test; fi - if [ $TEST = "EMBER" ]; then yarn test; fi
# test against different browsers using sauce lab # test against different browsers using sauce lab
- if $TEST_SAUCE; then node_modules/ember-cli/bin/ember test --launch='SL_chrome,SL_firefox,SL_edge,SL_ie,SL_safari' --test-port 8080; fi - if [ $TEST = "BROWSER" ]; then yarn test --config-file testem.browserstack.js; fi
# run api tests with composer # run api tests with composer
- if $TEST_API; then cd api/ && ./vendor/bin/codecept run && cd ..; fi - if [ $TEST = "API" ]; then cd api/ && ./vendor/bin/codecept run && cd ..; fi
after_script: after_script:
# destroy the sauce tunnel # destroy the sauce tunnel
- if $TEST_SAUCE; then node_modules/ember-cli/bin/ember sauce:disconnect; fi - if [ $TEST = "BROWSER" ]; then node_modules/ember-cli/bin/ember browserstack:disconnect; fi

View file

@ -4,8 +4,6 @@
[![Code Climate](https://codeclimate.com/github/jelhan/croodle/badges/gpa.svg)](https://codeclimate.com/github/jelhan/croodle) [![Code Climate](https://codeclimate.com/github/jelhan/croodle/badges/gpa.svg)](https://codeclimate.com/github/jelhan/croodle)
[![devDependency Status](https://david-dm.org/jelhan/croodle/dev-status.svg)](https://david-dm.org/jelhan/croodle?type=dev) [![devDependency Status](https://david-dm.org/jelhan/croodle/dev-status.svg)](https://david-dm.org/jelhan/croodle?type=dev)
[![Sauce Test Status](https://saucelabs.com/browser-matrix/jelhan.svg)](https://saucelabs.com/u/jelhan)
Croodle is a web application to schedule a date or to do a poll on a general topics. Stored content data like title and description, number and labels of options and available answers and names of users and there selections is encrypted/decrypted in the browser using 256 bits AES. Croodle is a web application to schedule a date or to do a poll on a general topics. Stored content data like title and description, number and labels of options and available answers and names of users and there selections is encrypted/decrypted in the browser using 256 bits AES.
This is an alpha version. Changes could brake backward compatibility. Also it is not well tested and some features are missing. It is not ment for productive use yet. This is an alpha version. Changes could brake backward compatibility. Also it is not well tested and some features are missing. It is not ment for productive use yet.
@ -96,6 +94,14 @@ directory to `/api` and execute `./vendor/bin/codecept run`. You have
to install composer development requirements before (`composer install` to install composer development requirements before (`composer install`
without `--no-dev` option). without `--no-dev` option).
## Credits
Continous Integration powered by<br>
<a href="https://travis-ci.com/"><img src="https://travis-ci.com/images/logos/TravisCI-Full-Color.png" height="50"></a>
Cross-browser testing provided by<br>
<a href="https://www.browserstack.com"><img src="docs/Browserstack-logo.svg" height="50"></a>
## License ## License
croodle is [MIT Licensed](https://github.com/jelhan/croodle/blob/master/LICENSE). croodle is [MIT Licensed](https://github.com/jelhan/croodle/blob/master/LICENSE).

View file

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 490.1 105.6" style="enable-background:new 0 0 490.1 105.6;" xml:space="preserve">
<style type="text/css">
.st0{fill:#F4B960;}
.st1{fill:#E66F32;}
.st2{fill:#E43C41;}
.st3{fill:#BDD041;}
.st4{fill:#6DB54C;}
.st5{fill:#AEDAE6;}
.st6{fill:#56B8DE;}
.st7{fill:#00B1D5;}
.st8{fill:url(#SVGID_1_);}
.st9{fill:#221F1F;}
.st10{fill:#FFFFFF;}
.st11{fill:#000111;}
</style>
<title>Browserstack-logo-white</title>
<circle class="st0" cx="52.8" cy="52.8" r="52.8"/>
<circle class="st1" cx="47.5" cy="47.5" r="47.5"/>
<circle class="st2" cx="53.8" cy="41.1" r="41.1"/>
<circle class="st3" cx="57.1" cy="44.4" r="37.8"/>
<circle class="st4" cx="54.3" cy="47.2" r="35.1"/>
<circle class="st5" cx="48.8" cy="41.7" r="29.5"/>
<circle class="st6" cx="53.6" cy="36.8" r="24.7"/>
<circle class="st7" cx="56.6" cy="39.9" r="21.7"/>
<radialGradient id="SVGID_1_" cx="53.45" cy="63.02" r="18.57" gradientTransform="matrix(1 0 0 -1 0 106)" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#797979"/>
<stop offset="1" style="stop-color:#4C4C4C"/>
</radialGradient>
<circle class="st8" cx="53.5" cy="43" r="18.6"/>
<circle class="st9" cx="53.5" cy="43" r="18.6"/>
<ellipse transform="matrix(0.4094 -0.9123 0.9123 0.4094 2.8913 76.9251)" class="st10" cx="60.9" cy="36.2" rx="5.7" ry="3.7"/>
<path class="st11" d="M122.5,32.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h16.6c9.5,0,13.9,4.4,13.9,11c0.2,3.7-1.8,7.2-5.2,8.8v0.1
c3.7,1.5,6.1,5.2,6,9.3c0,8.2-5.6,12.2-15.4,12.2h-16c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1L122.5,32.6L122.5,32.6z M139.6,49.1
c3.9,0,6.4-2.2,6.4-5.4s-2.4-5.5-6.4-5.5h-8.9c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1v10.2c0,0.2,0.1,0.3,0.3,0.4c0,0,0,0,0.1,0
H139.6L139.6,49.1z M130.6,66.9h9.3c4.3,0,6.8-2.3,6.8-5.8s-2.4-5.7-6.7-5.7h-9.3c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1v10.7
C130.3,66.8,130.4,66.9,130.6,66.9C130.6,66.9,130.6,66.9,130.6,66.9L130.6,66.9z"/>
<path class="st11" d="M159.9,73.3c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1V44.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h6
c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v2.5h0.1c1.5-2.2,4.2-3.8,8.2-3.8c2.4,0,4.8,0.8,6.6,2.4c0.3,0.3,0.4,0.5,0.1,0.8l-3.5,4.1
c-0.2,0.3-0.6,0.4-0.9,0.2c0,0,0,0-0.1,0c-1.4-0.9-3-1.4-4.7-1.4c-4.1,0-6,2.7-6,7.4v15.9c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0
H159.9L159.9,73.3z"/>
<path class="st11" d="M182.9,65.8c-0.8-2.3-1.1-4.8-1.1-7.2c-0.1-2.5,0.3-4.9,1.1-7.2c1.8-5.1,6.6-8.1,13.1-8.1s11.2,3,13,8.1
c0.8,2.3,1.1,4.8,1.1,7.2c0.1,2.5-0.3,4.9-1.1,7.2c-1.8,5.1-6.6,8.1-13,8.1S184.7,71,182.9,65.8z M201.9,64c0.5-1.7,0.8-3.6,0.7-5.4
c0.1-1.8-0.1-3.7-0.7-5.4c-0.9-2.5-3.3-4-5.9-3.8c-2.6-0.2-5.1,1.4-6,3.8c-0.5,1.8-0.8,3.6-0.7,5.4c-0.1,1.8,0.1,3.7,0.7,5.4
c0.9,2.5,3.4,4,6,3.8C198.6,68,201,66.5,201.9,64L201.9,64z"/>
<path class="st11" d="M241.9,73.3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0.2,0,0.4,0.1,0.4,0.3c0,0.1,0,0.3-0.1,0.3l-10.1,10.7L490,72.7c0.1,0.2,0.1,0.4,0,0.5
c-0.1,0.1-0.2,0.1-0.3,0.1H482.8L482.8,73.3z"/>
</svg>

After

Width:  |  Height:  |  Size: 7.4 KiB

View file

@ -29,6 +29,7 @@
"ember-cli-app-version": "^3.2.0", "ember-cli-app-version": "^3.2.0",
"ember-cli-babel": "^6.16.0", "ember-cli-babel": "^6.16.0",
"ember-cli-browser-navigation-button-test-helper": "^0.1.1", "ember-cli-browser-navigation-button-test-helper": "^0.1.1",
"ember-cli-browserstack": "^0.0.7",
"ember-cli-chart": "^3.3.1", "ember-cli-chart": "^3.3.1",
"ember-cli-clipboard": "^0.8.0", "ember-cli-clipboard": "^0.8.0",
"ember-cli-content-security-policy": "^1.0.0", "ember-cli-content-security-policy": "^1.0.0",
@ -44,7 +45,6 @@
"ember-cli-page-object": "^1.11.0", "ember-cli-page-object": "^1.11.0",
"ember-cli-release": "^0.2.9", "ember-cli-release": "^0.2.9",
"ember-cli-sass": "^8.0.1", "ember-cli-sass": "^8.0.1",
"ember-cli-sauce": "^1.6.0",
"ember-cli-sri": "^2.1.1", "ember-cli-sri": "^2.1.1",
"ember-cli-template-lint": "^1.0.0-beta.1", "ember-cli-template-lint": "^1.0.0-beta.1",
"ember-cli-uglify": "^2.1.0", "ember-cli-uglify": "^2.1.0",

128
testem.browserstack.js Normal file
View file

@ -0,0 +1,128 @@
/* eslint-env node */
module.exports = {
'test_page': 'tests/index.html?hidepassed',
'disable_watching': true,
'parallel': 5,
browser_start_timeout: 2000,
browser_disconnect_timeout: 120,
'launch_in_ci': [
'BS_IE_11',
'BS_MS_Edge',
'BS_Safari_Current',
],
'launch_in_dev': [
'Chrome'
],
launchers: {
BS_Chrome_Current: {
exe: 'node_modules/.bin/browserstack-launch',
args: [
'--os',
'Windows',
'--osv',
'10',
'--b',
'chrome',
'--bv',
'latest',
'-t',
'1200',
'--u',
'<url>',
],
protocol: 'browser',
},
BS_Firefox_Current: {
exe: 'node_modules/.bin/browserstack-launch',
args: [
'--os',
'Windows',
'--osv',
'10',
'--b',
'firefox',
'--bv',
'latest',
'-t',
'1200',
'--u',
'<url>',
],
protocol: 'browser',
},
BS_Safari_Current: {
exe: 'node_modules/.bin/browserstack-launch',
args: [
'--os',
'OS X',
'--osv',
'Mojave',
'--b',
'safari',
'--bv',
'latest',
'-t',
'1200',
'--u',
'<url>',
],
protocol: 'browser',
},
BS_Safari_Last: {
exe: 'node_modules/.bin/browserstack-launch',
args: [
'--os',
'OS X',
'--osv',
'High Sierra',
'--b',
'safari',
'--bv',
'latest',
'-t',
'1200',
'--u',
'<url>',
],
protocol: 'browser',
},
BS_MS_Edge: {
exe: 'node_modules/.bin/browserstack-launch',
args: [
'--os',
'Windows',
'--osv',
'10',
'--b',
'edge',
'--bv',
'latest',
'-t',
'1200',
'--u',
'<url>',
],
protocol: 'browser',
},
BS_IE_11: {
exe: 'node_modules/.bin/browserstack-launch',
args: [
'--os',
'Windows',
'--osv',
'10',
'--b',
'ie',
'--bv',
'11.0',
'-t',
'1500',
'--u',
'<url>&legacy=true',
],
protocol: 'browser',
},
}
};

View file

@ -593,8 +593,8 @@ module('Acceptance | create a poll', function(hooks) {
test('create a poll and using back button (find a date)', async function(assert) { test('create a poll and using back button (find a date)', async function(assert) {
let days = [ let days = [
'2016-01-02', moment('2016-01-02'),
'2016-01-13', moment('2016-01-13'),
]; ];
const dayFormat = moment.localeData().longDateFormat('LLLL') const dayFormat = moment.localeData().longDateFormat('LLLL')
.replace( .replace(
@ -614,13 +614,13 @@ module('Acceptance | create a poll', function(hooks) {
assert.equal(currentRouteName(), 'create.options'); assert.equal(currentRouteName(), 'create.options');
await pageCreateOptions.selectDates( await pageCreateOptions.selectDates(
days.map((day) => new Date(day)) days.map((_) => _.toDate())
); );
await pageCreateOptions.next(); await pageCreateOptions.next();
assert.equal(currentRouteName(), 'create.options-datetime'); assert.equal(currentRouteName(), 'create.options-datetime');
assert.deepEqual( assert.deepEqual(
pageCreateOptionsDatetime.days().labels, pageCreateOptionsDatetime.days().labels,
days.map((day) => moment(day).format(dayFormat)), days.map((_) => _.format(dayFormat)),
'time inputs having days as label' 'time inputs having days as label'
); );
@ -629,7 +629,7 @@ module('Acceptance | create a poll', function(hooks) {
assert.equal(currentRouteName(), 'create.options'); assert.equal(currentRouteName(), 'create.options');
assert.deepEqual( assert.deepEqual(
findAll('.ember-power-calendar-day--selected').map((el) => el.dataset.date), findAll('.ember-power-calendar-day--selected').map((el) => el.dataset.date),
days, days.map((_) => _.format('YYYY-MM-DD')),
'days are still present after back button is used' 'days are still present after back button is used'
); );
@ -658,8 +658,8 @@ module('Acceptance | create a poll', function(hooks) {
assert.deepEqual( assert.deepEqual(
pagePollParticipation.options().labels, pagePollParticipation.options().labels,
[ [
moment(days[0]).format(dayFormat), days[0].format(dayFormat),
moment(days[1]).hour(10).minute(0).format('LLLL') days[1].clone().hour(10).minute(0).format('LLLL')
], ],
'options are correctly labeled' 'options are correctly labeled'
); );

View file

@ -32,16 +32,16 @@ module('Integration | Component | create options dates', function(hooks) {
this.set('options', []); this.set('options', []);
await render(hbs`{{#bs-form as |form|}}{{create-options-dates options=options form=form}}{{/bs-form}}`); await render(hbs`{{#bs-form as |form|}}{{create-options-dates options=options form=form}}{{/bs-form}}`);
await calendarSelect('[data-test-form-element-for="days"]', new Date('2015-01-01')); await calendarSelect('[data-test-form-element-for="days"]', new Date(2015, 0, 1));
await calendarSelect('[data-test-form-element-for="days"]', new Date('2015-01-02')); await calendarSelect('[data-test-form-element-for="days"]', new Date(2015, 0, 2));
assert.deepEqual( assert.deepEqual(
this.get('options').map((option) => option.title), this.get('options').map((option) => option.title),
['2015-01-01', '2015-01-02'], ['2015-01-01', '2015-01-02'],
'dates are correct' 'dates are correct'
); );
await calendarSelect('[data-test-form-element-for="days"]', new Date('2016-12-31')); await calendarSelect('[data-test-form-element-for="days"]', new Date(2016, 11, 31));
await calendarSelect('[data-test-form-element-for="days"]', new Date('2016-01-01')); await calendarSelect('[data-test-form-element-for="days"]', new Date(2016, 0, 1));
assert.deepEqual( assert.deepEqual(
this.get('options').map((option) => option.title), this.get('options').map((option) => option.title),
['2015-01-01', '2015-01-02', '2016-01-01', '2016-12-31'], ['2015-01-01', '2015-01-02', '2016-01-01', '2016-12-31'],

View file

@ -99,34 +99,34 @@ module('Unit | Component | create options datetime', function(hooks) {
test('bindings are working on grouped datetimes', function(assert) { test('bindings are working on grouped datetimes', function(assert) {
let component = this.owner.factoryFor('component:create-options-datetime').create(); let component = this.owner.factoryFor('component:create-options-datetime').create();
run(() => { let baseDate = moment('2015-01-01T11:11');
component.set('dates', [
this.store.createFragment('option', { component.set('dates', [
title: moment('2015-01-01T11:11:00.000Z').toISOString() this.store.createFragment('option', {
}) title: baseDate.toISOString()
]); })
}); ]);
assert.equal( assert.equal(
component.get('groupedDates.firstObject.items.firstObject.time'), component.get('groupedDates.firstObject.items.firstObject.time'),
moment('2015-01-01T11:11:00.000Z').format('HH:mm'), baseDate.format('HH:mm'),
'time is correct before' 'time is correct before'
); );
run(() => {
component.set( component.set(
'groupedDates.firstObject.items.firstObject.time', 'groupedDates.firstObject.items.firstObject.time',
'00:00' '00:00'
); );
});
assert.equal( assert.equal(
component.get('dates.firstObject.title'), component.get('dates.firstObject.title'),
moment('2015-01-01T00:00').toISOString(), moment(baseDate).hour(0).minute(0).toISOString(),
'option is updated after time changed on grouped datetimes' 'option is updated after time changed on grouped datetimes'
); );
run(() => {
component.get('dates').pushObject( component.get('dates').pushObject(
this.store.createFragment('option', { title: moment('2015-01-01T12:12').toISOString() }) this.store.createFragment('option', {
); title: baseDate.add(1, 'hour').add(1, 'minute').toISOString(),
}); })
);
assert.equal( assert.equal(
component.get('groupedDates.firstObject.items.length'), component.get('groupedDates.firstObject.items.length'),
2, 2,
@ -137,11 +137,10 @@ module('Unit | Component | create options datetime', function(hooks) {
'12:12', '12:12',
'grouped datetimes got updated correctly after option was added (same day)' 'grouped datetimes got updated correctly after option was added (same day)'
); );
run(() => {
component.get('dates').pushObject( component.get('dates').pushObject(
this.store.createFragment('option', { title: moment('2015-02-02T01:01').toISOString() }) this.store.createFragment('option', { title: moment('2015-02-02T01:01').toISOString() })
); );
});
assert.equal( assert.equal(
component.get('groupedDates.length'), component.get('groupedDates.length'),
2, 2,
@ -223,8 +222,8 @@ module('Unit | Component | create options datetime', function(hooks) {
options: [ options: [
{ title: '2015-01-01' }, { title: '2015-01-01' },
{ title: '2015-01-02' }, { title: '2015-01-02' },
{ title: moment('2015-01-03T11:00:00.000Z').toISOString() }, { title: moment('2015-01-03T11:00').toISOString() },
{ title: moment('2015-01-03T15:00:00.000Z').toISOString() } { title: moment('2015-01-03T15:00').toISOString() }
] ]
}); });
let component = this.owner.factoryFor('component:create-options-datetime').create({ let component = this.owner.factoryFor('component:create-options-datetime').create({

View file

@ -12,16 +12,14 @@ module('Unit | Controller | create/options datetime', function(hooks) {
let controller = this.owner.factoryFor('controller:create/options-datetime').create({ let controller = this.owner.factoryFor('controller:create/options-datetime').create({
model: { model: {
options: [ options: [
EmberObject.create({ title: '2015-01-01T12:00:00.000Z' }), EmberObject.create({ title: moment('2015-01-01T12:00').toISOString() }),
dirtyOption, dirtyOption,
EmberObject.create({ title: '2017-11-11' }), EmberObject.create({ title: '2017-11-11' }),
EmberObject.create({ title: '2018-04-04T11:11:00.000Z' }) EmberObject.create({ title: moment('2018-04-04T11:11').toISOString() })
] ]
} }
}); });
run(() => { controller.normalizeOptions();
controller.normalizeOptions();
});
assert.equal( assert.equal(
controller.get('options.length'), controller.get('options.length'),
3, 3,

781
yarn.lock

File diff suppressed because it is too large Load diff