Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ic: refactoring e2e tests + adding 1 test
- Loading branch information
1 parent
93e6f2c
commit 6e83f4d
Showing
10 changed files
with
160 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
tests/demo/data/articles/article-3-abe-d20170114T011124015Z.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "2017-01-14T01:11:24.015Z", | ||
"abeUrl": "/articles/article-3-abe-d20170114T011124015Z.html" | ||
}, | ||
"status": "draft", | ||
"draft": { | ||
"date": "2016-11-05T17:05:38.370Z", | ||
"abeUrl": "/articles/article-3-abe-d20161105T170538370Z.html", | ||
"latest": { | ||
"date": "2017-01-14T01:11:24.015Z", | ||
"abeUrl": "/articles/article-3-abe-d20170114T011124015Z.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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
[ | ||
{ | ||
"month": "January", | ||
"monthFormated": "01" | ||
}, | ||
{ | ||
"month": "February", | ||
"monthFormated": "02" | ||
}, | ||
{ | ||
"month": "March", | ||
"monthFormated": "03" | ||
}, | ||
{ | ||
"month": "April", | ||
"monthFormated": "04" | ||
}, | ||
{ | ||
"month": "May", | ||
"monthFormated": "05" | ||
}, | ||
{ | ||
"month": "June", | ||
"monthFormated": "06" | ||
}, | ||
{ | ||
"month": "July", | ||
"monthFormated": "07" | ||
}, | ||
{ | ||
"month": "August", | ||
"monthFormated": "08" | ||
}, | ||
{ | ||
"month": "September", | ||
"monthFormated": "09" | ||
}, | ||
{ | ||
"month": "October", | ||
"monthFormated": "10" | ||
}, | ||
{ | ||
"month": "November", | ||
"monthFormated": "11" | ||
}, | ||
{ | ||
"month": "December", | ||
"monthFormated": "12" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"year": 2017, | ||
"yearFormated": 17 | ||
}, | ||
{ | ||
"year": 2018, | ||
"yearFormated": 18 | ||
}, | ||
{ | ||
"year": 2019, | ||
"yearFormated": 19 | ||
}, | ||
{ | ||
"year": 2020, | ||
"yearFormated": 20 | ||
}, | ||
{ | ||
"year": 2021, | ||
"yearFormated": 21 | ||
}, | ||
{ | ||
"year": 2022, | ||
"yearFormated": 22 | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{abe type="slug" source="acl-{{testYear[0].yearFormated}}{{testMonth[0].monthFormated}}-en-1"}} | ||
{{abe type='data' key='testYear' source='reference/years.json' desc='Year' required="true" display="year" tab="slug" visible="false" max-length="1"}} | ||
{{abe type='data' key='testMonth' source='reference/months.json' desc='Month' required="true" display="month" tab="slug" visible="false" max-length="1"}} | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>title</title> | ||
</head> | ||
<body> | ||
content | ||
</body> | ||
</html> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
describe('Abe', function() { | ||
|
||
describe('slug', function() { | ||
|
||
before(function(client, done) { | ||
done(); | ||
}); | ||
|
||
after(function(client, done) { | ||
client.end(function() { | ||
done(); | ||
}); | ||
}); | ||
|
||
afterEach(function(client, done) { | ||
done(); | ||
}); | ||
|
||
beforeEach(function(client, done) { | ||
done(); | ||
}); | ||
|
||
it('Create a slug template post', function(client) { | ||
client | ||
.useXpath() | ||
.url('http://localhost:3003/abe/editor') | ||
.click('//*[@id="selectTemplate"]/option[11]') | ||
.pause(1000) | ||
.elements('xpath',"//div[@data-precontrib-templates='slug']", function (result) { | ||
client.assert.equal(result.value.length, 2); | ||
}); | ||
}); | ||
}); | ||
}); |