[functional testing] Add minimal smoke test, clean up config

This commit is contained in:
Jonathan Budzenski 2015-09-08 11:45:29 -05:00
parent 71dd15ca22
commit d7db845b58
2 changed files with 22 additions and 79 deletions

20
test/functional/apps.js Normal file
View file

@ -0,0 +1,20 @@
define([
'intern!object',
'intern/dojo/node!expect.js'
], function (registerSuite, expect) {
registerSuite(function () {
var url = 'http://localhost:5620/apps';
return {
'apps': function () {
return this.remote
.get(url)
.setFindTimeout(60000)
.findByCssSelector('a[href="/app/kibana"]')
.getVisibleText()
.then(function (text) {
expect(text).to.eql('Kibana\nthe kibana you know and love');
});
}
};
});
});

View file

@ -1,94 +1,17 @@
// Learn more about configuring this file at <https://theintern.github.io/intern/#configuration>.
// These default settings work OK for most people. The options that *must* be changed below are the
// packages, suites, excludeInstrumentation, and (if you want functional tests) functionalSuites
define({
// The port on which the instrumenting proxy will listen
proxyPort: 9000,
// A fully qualified URL to the Intern proxy
proxyUrl: 'http://localhost:9000/',
// Default desired capabilities for all environments. Individual capabilities can be overridden by any of the
// specified browser environments in the `environments` array below as well. See
// <https://theintern.github.io/intern/#option-capabilities> for links to the different capabilities options for
// different services.
//
// Note that the `build` capability will be filled in with the current commit ID or build tag from the CI
// environment automatically
capabilities: {
'selenium-version': '2.45.0',
'selenium-version': '2.47.1',
'idle-timeout': 30
//'browserstack.selenium_version': '2.45.0'
},
// Browsers to run integration testing against. Note that version numbers must be strings if used with Sauce
// OnDemand. Options that will be permutated are browserName, version, platform, and platformVersion; any other
// capabilities options specified for an environment will be copied as-is
environments: [
/*{ browserName: 'internet explorer', version: '11', platform: 'WIN8' },
{ browserName: 'internet explorer', version: '10', platform: 'WIN8' },
{ browserName: 'internet explorer', version: '9', platform: 'WINDOWS' },
{ browserName: 'firefox', version: '37', platform: [ 'WINDOWS', 'MAC' ] },
{ browserName: 'chrome', version: '39', platform: [ 'WINDOWS', 'MAC' ] },
{ browserName: 'safari', version: '8', platform: 'MAC' } */
// {
// browserName: 'chrome'
// },
{
browserName: 'firefox'
}
],
// Maximum number of simultaneous integration tests that should be executed on the remote WebDriver service
maxConcurrency: 1,
// Whether or not to start Sauce Connect before running tests
useSauceConnect: false,
// Name of the tunnel class to use for WebDriver tests.
// See <https://theintern.github.io/intern/#option-tunnel> for built-in options
//tunnel: 'BrowserStackTunnel',
// Connection information for the remote WebDriver service. If using Sauce Labs, keep your username and password
// in the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables unless you are sure you will NEVER be
// publishing this configuration file somewhere
webdriver: {
host: 'localhost',
port: 4444
},
// Configuration options for the module loader; any AMD configuration options supported by the AMD loader in use
// can be used here.
// If you want to use a different loader than the default loader, see
// <https://theintern.github.io/intern/#option-useLoader> for instruction
loaderOptions: {
// Packages that should be registered with the loader in each testing environment
// packages: [ { name: 'myPackage', location: '.' } ]
packages: [{
name: 'intern-selftest',
location: '.'
}],
map: {
'intern-selftest': {
dojo: 'intern-selftest/node_modules/dojo'
}
}
},
// Non-functional test suite(s) to run in each browser
suites: [ /* 'tests/unit/hello' 'myPackage/tests/foo', 'myPackage/tests/bar' */ ],
// Functional test suite(s) to execute against each browser once non-functional tests are completed
// functionalSuites: ['test/functional/settingsDefaults' /* 'myPackage/tests/functional' */ ],
functionalSuites: ['test/functional/settingsDefaults.js' /* 'myPackage/tests/functional' */ ],
// A regular expression matching URLs to files that should not be included in code coverage analysis
functionalSuites: ['test/functional/apps.js'],
excludeInstrumentation: /^(?:tests|node_modules)\//
});