refactor app directory structure and add tests

This commit is contained in:
s2
2016-11-10 16:27:26 +01:00
parent 204834ce28
commit dd88218c0e
1844 changed files with 263520 additions and 0 deletions

24
tests/node_modules/nightwatch/examples/mocha/github.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
describe('Github', function() {
it('Demo test GitHub', function (client) {
client
.url('https://github.com/nightwatchjs/nightwatch')
.waitForElementVisible('body', 1000)
.assert.title('nightwatchjs/nightwatch · GitHub')
.assert.visible('.container h1 strong a')
.assert.containsText('.container h1 strong a', 'nightwatch', 'Checking project title is set to nightwatch');
});
after(function(client, done) {
if (client.sessionId) {
client.end(function() {
done();
});
} else {
done();
}
});
});

View File

@@ -0,0 +1,38 @@
describe('Google demo test for Mocha', function() {
describe('for demo purposes', function() {
before(function(client, done) {
done();
});
after(function(client, done) {
if (client.sessionId) {
client.end(function() {
done();
});
} else {
done();
}
});
afterEach(function(client, done) {
done();
});
beforeEach(function(client, done) {
done();
});
it('uses BDD to run the Google simple test', function(client) {
client
.url('http://google.com')
.expect.element('body').to.be.present.before(1000);
client.setValue('input[type=text]', ['nightwatch', client.Keys.ENTER])
.pause(1000)
.assert.containsText('#main', 'Night Watch');
});
});
});