Skip to content

Commit

Permalink
fix up after wrong-way merge
Browse files Browse the repository at this point in the history
  • Loading branch information
megahirt committed Mar 5, 2018
1 parent c768ccb commit c8cf272
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 190 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,3 @@ Before putting data into **ElasticSearch**, setup the index with settings and da
```
./scripts/server/elasticSearch/setupElasticSearchCATIndex.sh
```

##Contributors
- Benjamin Kastner
- Mark Wissink
131 changes: 1 addition & 130 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
// 'test-restart-webserver'
// 'test-e2e-env'
// 'test-e2e-doTest'
// 'test-e2e-doTestV2'
// 'test-e2e-run'
// 'test-e2e-compile'
// 'test-e2e-compile:watch'
Expand Down Expand Up @@ -725,134 +724,6 @@ gulp.task('test-e2e-teardownForLocalDev', gulp.series(
'test-restart-webserver')
);

// -------------------------------------
// Task: E2E Test: Do TestV2
// Forked from Task: E2E Test: Do Test by Ben Kastner 2018-01-11
// -------------------------------------
gulp.task('test-e2e-doTestV2', function (cb) {
var params = require('yargs')
.usage(
'Usage: $0 test-e2e-doTest --webserverHost [hostname] --specs [testSpecs] ' +
'--seleniumAddress [address] --verbosity [bool] --conf [filename]')
.option('webserverHost', {
demand: true,
describe: 'hostname (without the protocol) for E2E testing',
type: 'string' })
.option('excludeBellows', {
demand: false,
describe: 'exclude the bellows specs. Useful for the xf parameter in rune2e.sh',
type: 'boolean' })
.option('specs', {
demand: false,
describe: 'testSpecs are the names of the e2e test specs to run',
type: 'string' })
.option('seleniumAddress', {
demand: false,
describe: 'address of a running selenium server. default http://default.local:4444/wd/hub',
type: 'string' })
.option('verbosity', {
demand: false,
describe: 'bool for jasmine reporter verbosity. true for more detail',
type: 'boolean' })
.option('conf', {
demand: false,
describe: 'filename of a protractor conf file. default is protractorConf.js',
type: 'string' })
.option('browserStackUser', {
demand: false,
describe: 'BrowserStack API username',
type: 'string' })
.option('browserStackKey', {
demand: false,
describe: 'BrowserStack API key',
type: 'string' })
.help('?')
.alias('?', 'help')
.example('$0 test-e2e-run --webserverHost languageforge.local',
'Runs all the E2E tests for languageforge')
.example('$0 test-e2e-run --webserverHost scriptureforge.local --specs projectSettingsPage',
'Runs the scriptureforge E2E test for projectSettingsPage')
.argv;

var protocol =
(params.webserverHost === 'jamaicanpsalms.scriptureforge.local') ? 'https://' : 'http://';

var configFile;
var isBrowserStack = false;
var protractorOptions = {
debug: false,
args: []
};

// Get the browser stack user and password
if (params.browserStackUser && params.browserStackUser.length > 0) {
protractorOptions.args.push('--browserstackUser', params.browserStackUser);
isBrowserStack = true;
}

if (params.browserStackKey && params.browserStackKey.length > 0) {
protractorOptions.args.push('--browserstackKey', params.browserStackKey);
}

var webserverHost = params.webserverHost;
if (isBrowserStack) {
webserverHost = webserverHost.replace('.local', '.org');
}

if (params.conf && params.conf.length > 0) {
configFile = './test/app/' + params.conf;
} else {
if (isBrowserStack) {
configFile = './test/app/browserStackLFProtractorConf.js';
} else {
configFile = './test/app/protractorConf.js';
}
}

// vars for configuring protractor
protractorOptions.configFile = configFile;
protractorOptions.args.push('--baseUrl', protocol + webserverHost);

// Generate list of specs to test (glob format so protractor will test whatever files exist)
var specString = (params.specs) ? params.specs : '*';

var specs = [
'test/app/allspecs/e2e/*.spec.js',
'test/app/bellows/**/e2e/' + specString + '.spec.js'];

if (params.excludeBellows) {
specs.pop()
}

if (params.webserverHost.includes('languageforge')) {
specs.push('test/app/languageforge/**/e2e/' + specString + '.spec.js');
} else {
specs.push('test/app/scriptureforge/**/e2e/' + specString + '.spec.js');
}


// Get the selenium server address
if (params.seleniumAddress && params.seleniumAddress.length > 0) {
protractorOptions.args.push('--seleniumAddress', params.seleniumAddress);
}

if (params.verbosity) {
protractorOptions.args.push('--params.verbosity', 3);
} else {
protractorOptions.args.push('--params.verbosity', 0);
}

// It's better to pass the specs array of files to test, and not use the --exclude parameter
console.log('specs: ', specs);
return gulp.src(specs)
.pipe(protractor(protractorOptions))
.on('error', function (e) {
console.log(e);
throw e;
})
.on('end', cb);
});

// -------------------------------------
// Task: E2E Test: Run
// -------------------------------------
Expand All @@ -862,7 +733,7 @@ gulp.task('test-e2e-run',
'test-e2e-useTestConfig',
'test-restart-webserver',
'test-e2e-setupTestEnvironment',
'test-e2e-doTestV2')
'test-e2e-doTest')
);
gulp.task('test-e2e-run').description = 'Run the E2E test on local developer environment';

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"@types/karma": "^0.13.36",
"@types/karma-coverage": "^0.5.32",
"@types/ng-file-upload": "^12.2.1",
"@types/node": "^6.0.96",
"@types/node": "^7.0.39",
"@types/offline-js": "^0.7.28",
"@types/quill": "^1.3.2",
"@types/rangy": "0.0.30",
Expand Down
1 change: 0 additions & 1 deletion refreshDeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ else
APP_NAME="languageforge"
fi

#rm -rf node_modules
npm install
cd src
composer install
Expand Down
13 changes: 1 addition & 12 deletions rune2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Usage
# rune2e.sh lf : runs E2E tests for LF
# rune2e.sh sf : runs E2E tests for SF
# run2e2.sh xf : runs E2E tests for both LF and SF (only runs bellows tasks once)
# rune2e.sh jp : runs E2E tests for JP
# rune2e.sh lf --specs lexicon-new-project : runs lexicon-new-project spec for LF
#
Expand All @@ -12,29 +11,19 @@
if [ "$1" = "lf" ]
then
E2EHOSTNAME="languageforge.local"
gulp test-e2e-run --webserverHost $E2EHOSTNAME ${@:2}
elif [ "$1" = "sf" ]
then
E2EHOSTNAME="scriptureforge.local"
gulp test-e2e-run --webserverHost $E2EHOSTNAME ${@:2}
elif [ "$1" = "xf" ]
then
E2EHOSTNAME="languageforge.local"
gulp test-e2e-run --webserverHost $E2EHOSTNAME ${@:2}
gulp test-e2e-teardownTestEnvironment #need to do this before switching hostname
E2EHOSTNAME="scriptureforge.local"
gulp test-e2e-run --webserverHost $E2EHOSTNAME ${@:2} --excludeBellows
elif [ "$1" = "jp" ]
then
E2EHOSTNAME="jamaicanpsalms.scriptureforge.local"
gulp test-e2e-run --webserverHost $E2EHOSTNAME ${@:2}
else
E2EHOSTNAME="languageforge.local"
gulp test-e2e-run --webserverHost $E2EHOSTNAME ${@:2}
fi

# Ensure Cleanup

gulp test-e2e-run --webserverHost $E2EHOSTNAME ${@:2}
STATUS=$?
gulp test-e2e-teardownForLocalDev
exit $STATUS

This file was deleted.

33 changes: 0 additions & 33 deletions src/netcore-api/SIL.XForge.WebApi.Server/Models/TranslateRoles.cs

This file was deleted.

2 changes: 1 addition & 1 deletion test/app/scriptureforge/sfchecks/pages/textSettingsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class SfTextSettingsPage {
noExportMsg: element(by.id('noExportMsg')),

answerCount: element(by.binding('download.answerCount')),
commentCount: element(by.binding('download.commentCount')),
commentCount: element(by.binding('download.commentCount'))
};

}
1 change: 0 additions & 1 deletion test/php/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<testsuite name="xForge all PHP unit tests">
<directory>./</directory>
<exclude>./library/shared/LanguageDataTest.php</exclude>
<exclude>./model/languageforge/translate/dto/TranslateMetricDtoTest.php</exclude>
</testsuite>
</testsuites>
<groups>
Expand Down

0 comments on commit c8cf272

Please sign in to comment.