github.js 579 B

123456789101112131415161718192021222324
  1. describe('Github', function() {
  2. it('Demo test GitHub', function (client) {
  3. client
  4. .url('https://github.com/nightwatchjs/nightwatch')
  5. .waitForElementVisible('body', 1000)
  6. .assert.title('nightwatchjs/nightwatch · GitHub')
  7. .assert.visible('.container h1 strong a')
  8. .assert.containsText('.container h1 strong a', 'nightwatch', 'Checking project title is set to nightwatch');
  9. });
  10. after(function(client, done) {
  11. if (client.sessionId) {
  12. client.end(function() {
  13. done();
  14. });
  15. } else {
  16. done();
  17. }
  18. });
  19. });