Completed
Push — master ( d8612b...787738 )
by greg
01:56
created

index.js ➔ ... ➔ beforeEach   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
rs 10
1
describe('Abe', function() {
2
3
  describe('operations', function() {
4
5
    before(function(client, done) {
6
      done();
7
    });
8
9
    after(function(client, done) {
10
      client.end(function() {
11
        done();
12
      });
13
    });
14
15
    afterEach(function(client, done) {
16
      done();
17
    });
18
19
    beforeEach(function(client, done) {
20
      done();
21
    });
22
23
    it('Create a single article', function(client) {
24
      client
25
        .url('http://localhost:3003/abe/editor')
26
        .waitForElementVisible('body')
27
        .assert.title('Abe')
28
        .click('select[id="level-1"] option:nth-child(2)')
29
        .click('select[name="selectTemplate"] option[value="single"]')
30
        .waitForElementVisible('div[data-precontrib-templates=single]', 1000)
31
        .setValue('div[data-precontrib-templates=single] > div > input', 'ftest')
32
        .click('button[type="submit"]')
33
        .waitForElementVisible('form[id="abeForm"]', 2000)
34
        .assert.urlEquals("http://localhost:3003/abe/editor/articles/ftest.html", "Clicked URL Matches with URL of the New Window")
35
        .end();
36
    });
37
38
    it('The created single article is found in the manager', function(client) {
39
      client
40
        .useXpath()
41
        .url('http://localhost:3003/abe/editor')
42
        .waitForElementVisible('//body')
43
        .assert.containsText("//table[@id='navigation-list']/tbody/tr[1]/td[2]/a", "/articles/ftest.html")
44
        .end();
45
    });
46
  });
47
});