Skip to content

Commit

Permalink
ic: data test functional
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaslabbe committed Dec 20, 2016
1 parent 3f1042b commit e3aa9ef
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ abe-logs/*
# test-coverage
coverage/*
test/templates/hbs/*
tests/demo/data/autocomplete*

# dist
dist
Expand Down
34 changes: 34 additions & 0 deletions tests/demo/data/articles/article-3-abe-d20161220T130733472Z.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"abe_meta": {
"template": "single",
"link": "/articles/article-3.html",
"complete": "100",
"type": "publish",
"date": "2016-11-05T17:05:38.370Z",
"latest": {
"date": "2016-12-20T13:07:33.472Z",
"abeUrl": "/articles/article-3-abe-d20161220T130733472Z.html"
},
"status": "draft",
"draft": {
"date": "2016-11-05T17:05:38.370Z",
"abeUrl": "/articles/article-3-abe-d20161105T170538370Z.html",
"latest": {
"date": "2016-12-20T13:07:33.472Z",
"abeUrl": "/articles/article-3-abe-d20161220T130733472Z.html"
}
},
"cleanName": "article-3",
"cleanFilename": "/articles"
},
"article_main_image": "/image/5238561864_86a3ccb678_b-7c9e.jpg",
"article_title": "Article 3",
"article_date": "20 March 2016",
"article_highlight": "another highlight",
"category_json": [
{
"category": "Photography"
}
],
"article_content": "This is the content of article 3"
}
File renamed without changes.
12 changes: 7 additions & 5 deletions tests/functional/abe-data.js → tests/functional/2-abe-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ describe('Abe', function() {

it('Create a autocomplete template post', function(client) {
client
.useXpath()
.url('http://localhost:3003/abe/editor')
.click('select[name="selectTemplate"] option[value="autocomplete"]')
.waitForElementVisible('div[data-precontrib-templates="autocomplete"] input[id="name"]', 1000)
.setValue('div[data-precontrib-templates="autocomplete"] input[id="name"]', 'autocomplete')
.click('button[type="submit"]')
.waitForElementVisible('form[id="abeForm"]', 2000)
.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')
.pause(1000)
.waitForElementVisible('//*[@id="abeForm"]', 2000)
.assert.urlEquals("http://localhost:3003/abe/editor/autocomplete.html", "Clicked URL Matches with URL of the New Window");
});

Expand Down

0 comments on commit e3aa9ef

Please sign in to comment.