Completed
Push — master ( 93e6f2...6e83f4 )
by greg
16:27 queued 13:12
created

tests/e2e/data/data2.js   A

Complexity

Total Complexity 10
Complexity/F 1

Size

Lines of Code 60
Function Count 10

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
c 1
b 0
f 0
nc 1
dl 0
loc 60
rs 10
wmc 10
mnd 0
bc 10
fnc 10
bpm 1
cpm 1
noi 0
1
describe('Abe', function() {
2
3
  describe('data', 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 autocomplete template post', function(client) {
24
      client
25
        .useXpath()
26
        .url('http://localhost:3003/abe/editor')
27
        .click('//*[@id="selectTemplate"]/option[3]')
28
        .waitForElementVisible("//div[@data-precontrib-templates='data']//input[@id='name']", 1000)
29
        .setValue("//div[@data-precontrib-templates='data']//input[@id='name']", 'data')
30
        .click("//button[@type='submit']")
31
        .pause(1000)
32
        .waitForElementVisible('//*[@id="abeForm"]', 2000)
33
        .assert.urlEquals("http://localhost:3003/abe/editor/data.html", "Clicked URL Matches with URL of the New Window");
34
    });
35
36
    it('Abe type data reference json', function(client) {
37
      client
38
        .useXpath()
39
        .url('http://localhost:3003/abe/editor/data.html')
40
        .waitForElementVisible('//body')
41
        .pause(1000)
42
        .expect.element("//form[@id='abeForm']//li[@class='active']/a").text.to.contain('slug');
43
    });
44
    
45
    
46
    it('The autocomplete article is deleted in the manager', function(client) {
47
      client
48
        .useXpath()
49
        .url('http://localhost:3003/abe/editor')
50
        .waitForElementVisible('//body')
51
        .pause(1000)
52
        .click("//table[@id='navigation-list']/tbody/tr[1]/td[7]/div/a")
53
        .pause(1000)
54
        .acceptAlert()
55
        .url('http://localhost:3003/abe/editor')
56
        .pause(2000)
57
        .expect.element("//table[@id='navigation-list']/tbody/tr[1]/td[2]/a").text.to.not.contain('/articles/ftest.html');
58
    });
59
  });
60
});