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

data1.js ➔ ... ➔ client.end   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 0
dl 0
loc 3
rs 10
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[2]')
28
        .waitForElementVisible("//div[@data-precontrib-templates='autocomplete']//input[@id='name']", 1000)
29
        .setValue("//div[@data-precontrib-templates='autocomplete']//input[@id='name']", 'autocomplete')
30
        .click("//button[@type='submit']")
31
        .pause(1000)
32
        .waitForElementVisible('//*[@id="abeForm"]', 2000)
33
        .assert.urlEquals("http://localhost:3003/abe/editor/autocomplete.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/autocomplete.html')
40
    //     .waitForElementVisible('//body')
41
    //     .pause(1000)
42
    //     .click('//*[@id="abeForm"]/ul/li[2]/a')
43
    //     .waitForElementVisible('//*[@id="reference"]/div')
44
    //     .click('//*[@id="reference.single"]/option[2]')
45
    //     .click('//*[@id="reference.multiple"]/option[3]')
46
    //     .setValue('//*[@id="reference.autocomplete"]', 'rouge')
47
    //     .waitForElementVisible('//*[@id="reference"]/div/div/div/div[3]/div[2]', 2000)
48
    //     .click('//*[@id="reference"]/div/div/div/div[3]/div[2]/div[1]')
49
    //     .waitForElementVisible('//*[@id="reference"]/div/div/div/div[3]/div/div', 2000);
50
    // });
51
    // 
52
    
53
    it('The autocomplete article is deleted in the manager', function(client) {
54
      client
55
        .useXpath()
56
        .url('http://localhost:3003/abe/editor')
57
        .waitForElementVisible('//body')
58
        .pause(1000)
59
        .click("//table[@id='navigation-list']/tbody/tr[1]/td[7]/div/a")
60
        .pause(1000)
61
        .acceptAlert()
62
        .url('http://localhost:3003/abe/editor')
63
        .pause(2000)
64
        .expect.element("//table[@id='navigation-list']/tbody/tr[1]/td[2]/a").text.to.not.contain('/articles/ftest.html');
65
    });
66
  });
67
});