Skip to content

Commit 7a61a7e

Browse files
committed
ic:Functional tests improved
1 parent 57fcd69 commit 7a61a7e

File tree

2 files changed

+29
-15
lines changed

2 files changed

+29
-15
lines changed

tests/functional/1-index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('Abe', function() {
2727
.waitForElementVisible('//body')
2828
.assert.title('Abe')
2929
.click('//*[@id="level-1"]/option[2]')
30-
.click('//*[@id="selectTemplate"]/option[8]')
30+
.click('//*[@id="selectTemplate"]/option[9]')
3131
.waitForElementVisible("//div[@data-precontrib-templates='single']//input[@id='name']", 1000)
3232
.setValue("//div[@data-precontrib-templates='single']//input[@id='name']", 'ftest')
3333
.click("//button[@type='submit']")

tests/functional/2-abe-data.js

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,43 @@ describe('Abe', function() {
2525
.useXpath()
2626
.url('http://localhost:3003/abe/editor')
2727
.click('//*[@id="selectTemplate"]/option[2]')
28-
.waitForElementVisible('//*[@id="name"]', 1000)
29-
.setValue('//*[@id="name"]', 'autocomplete')
30-
.click('/html/body/div[1]/div[1]/div[2]/div[1]/div[1]/div[2]/form/div[11]/div/button')
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']")
3131
.pause(1000)
3232
.waitForElementVisible('//*[@id="abeForm"]', 2000)
3333
.assert.urlEquals("http://localhost:3003/abe/editor/autocomplete.html", "Clicked URL Matches with URL of the New Window");
3434
});
3535

36-
37-
it('Abe type data reference json', function(client) {
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) {
3854
client
3955
.useXpath()
40-
.url('http://localhost:3003/abe/editor/autocomplete.html')
56+
.url('http://localhost:3003/abe/editor')
4157
.waitForElementVisible('//body')
4258
.pause(1000)
43-
.click('//*[@id="abeForm"]/ul/li[2]/a')
44-
.waitForElementVisible('//*[@id="reference"]/div')
45-
.click('//*[@id="reference.single"]/option[2]')
46-
.click('//*[@id="reference.multiple"]/option[3]')
47-
.setValue('//*[@id="reference.autocomplete"]', 'test')
48-
.waitForElementVisible('//*[@id="reference"]/div/div/div/div[3]/div[2]', 2000)
49-
.click('//*[@id="reference"]/div/div/div/div[3]/div[2]/div[1]')
50-
.waitForElementVisible('//*[@id="reference"]/div/div/div/div[3]/div/div', 2000);
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');
5165
});
5266
});
5367
});

0 commit comments

Comments
 (0)