Skip to content

Commit

Permalink
ic:Functional tests improved
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybesson committed Jan 2, 2017
1 parent 57fcd69 commit 7a61a7e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 15 deletions.
2 changes: 1 addition & 1 deletion tests/functional/1-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Abe', function() {
.waitForElementVisible('//body')
.assert.title('Abe')
.click('//*[@id="level-1"]/option[2]')
.click('//*[@id="selectTemplate"]/option[8]')
.click('//*[@id="selectTemplate"]/option[9]')
.waitForElementVisible("//div[@data-precontrib-templates='single']//input[@id='name']", 1000)
.setValue("//div[@data-precontrib-templates='single']//input[@id='name']", 'ftest')
.click("//button[@type='submit']")
Expand Down
42 changes: 28 additions & 14 deletions tests/functional/2-abe-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,43 @@ describe('Abe', function() {
.useXpath()
.url('http://localhost:3003/abe/editor')
.click('//*[@id="selectTemplate"]/option[2]')
.waitForElementVisible('//*[@id="name"]', 1000)
.setValue('//*[@id="name"]', 'autocomplete')
.click('/html/body/div[1]/div[1]/div[2]/div[1]/div[1]/div[2]/form/div[11]/div/button')
.waitForElementVisible("//div[@data-precontrib-templates='autocomplete']//input[@id='name']", 1000)
.setValue("//div[@data-precontrib-templates='autocomplete']//input[@id='name']", 'autocomplete')
.click("//button[@type='submit']")
.pause(1000)
.waitForElementVisible('//*[@id="abeForm"]', 2000)
.assert.urlEquals("http://localhost:3003/abe/editor/autocomplete.html", "Clicked URL Matches with URL of the New Window");
});


it('Abe type data reference json', function(client) {
// it('Abe type data reference json', function(client) {
// client
// .useXpath()
// .url('http://localhost:3003/abe/editor/autocomplete.html')
// .waitForElementVisible('//body')
// .pause(1000)
// .click('//*[@id="abeForm"]/ul/li[2]/a')
// .waitForElementVisible('//*[@id="reference"]/div')
// .click('//*[@id="reference.single"]/option[2]')
// .click('//*[@id="reference.multiple"]/option[3]')
// .setValue('//*[@id="reference.autocomplete"]', 'rouge')
// .waitForElementVisible('//*[@id="reference"]/div/div/div/div[3]/div[2]', 2000)
// .click('//*[@id="reference"]/div/div/div/div[3]/div[2]/div[1]')
// .waitForElementVisible('//*[@id="reference"]/div/div/div/div[3]/div/div', 2000);
// });
//

it('The autocomplete article is deleted in the manager', function(client) {
client
.useXpath()
.url('http://localhost:3003/abe/editor/autocomplete.html')
.url('http://localhost:3003/abe/editor')
.waitForElementVisible('//body')
.pause(1000)
.click('//*[@id="abeForm"]/ul/li[2]/a')
.waitForElementVisible('//*[@id="reference"]/div')
.click('//*[@id="reference.single"]/option[2]')
.click('//*[@id="reference.multiple"]/option[3]')
.setValue('//*[@id="reference.autocomplete"]', 'test')
.waitForElementVisible('//*[@id="reference"]/div/div/div/div[3]/div[2]', 2000)
.click('//*[@id="reference"]/div/div/div/div[3]/div[2]/div[1]')
.waitForElementVisible('//*[@id="reference"]/div/div/div/div[3]/div/div', 2000);
.click("//table[@id='navigation-list']/tbody/tr[1]/td[7]/div/a")
.pause(1000)
.acceptAlert()
.url('http://localhost:3003/abe/editor')
.pause(2000)
.expect.element("//table[@id='navigation-list']/tbody/tr[1]/td[2]/a").text.to.not.contain('/articles/ftest.html');
});
});
});

0 comments on commit 7a61a7e

Please sign in to comment.