|
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
|
|
|
}); |