This repository has been archived by the owner on Apr 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.js
73 lines (52 loc) · 1.54 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
'use strict';
require('chai').should();
let webdriver = require('selenium-webdriver');
let By = webdriver.By;
let d = new webdriver.Builder()
.forBrowser('firefox')
.build();
after(function(done){
d.quit().then(done);
});
describe('Social Tables Help Page', function(){
// increase timeout from 2000ms to account for webdriver load
this.timeout(15000);
beforeEach(function(done){
d.get('http://help.socialtables.com')
// wait for page to load
.then(d.wait(d.findElement(By.tagName('title'))))
.then(done)
});
// Test 0
it('has the correct title', function(done) {
d.getTitle()
.then(title => title.should.equal('Social Tables Help - Home'))
.then(() => done())
.catch(error => done(error));
});
// Test 1
// note - change xdescribe to describe to get this code to run
xdescribe('Logo', function(){
it('should link to https://www.socialtables.com/', function(done){
// Insert Your Code Here
});
});
// Test 2
xdescribe('Searching for \'Bobby Fisher\'', function(){
it('should return 0 results', function(done){
// Insert Your Code Here
});
});
// Test 3
xdescribe('Searching for \'event\'', function(){
it('should return 10 results', function(done){
// Insert Your Code Here
})
});
// Test 4
xdescribe('Searching for a word under three character', function(){
it('should trigger an alert box with the text \'Search string must be at least 3 characters long\'', function(done){
// Insert Your Code Here
});
});
});