Skip to content

Commit

Permalink
functional tests + travis deploy (#144)
Browse files Browse the repository at this point in the history
* functional tests

- fixed "change rows count" test

* functional tests

- fixed "start test" method because of ie
  • Loading branch information
dmitry-kurmanov authored and andrewtelnov committed Dec 1, 2016
1 parent c110c5e commit dcef147
Show file tree
Hide file tree
Showing 33 changed files with 37 additions and 44 deletions.
2 changes: 1 addition & 1 deletion testCafe/tests/conditionsAndTriggers/completeTrigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check visibility`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/conditionsAndTriggers/setValueTrigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check visibility`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/conditionsAndTriggers/visibleIf.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check visibility`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/conditionsAndTriggers/visibleTrigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check visibility`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/dxService/getSurveyResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`correct get result`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/dxService/loadSurvey.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`correct loading`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/dxService/runSurveyOneTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check one time run`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/questions/checkboxes.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`choose empty`, async t => {
Expand Down
17 changes: 5 additions & 12 deletions testCafe/tests/questions/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`fill textarea`, async t => {
Expand All @@ -32,19 +32,12 @@ frameworks.forEach( (framework) => {

if (framework.indexOf("bootstrap") === -1) {
test(`change rows count`, async t => {
const getHeight = ClientFunction(() =>
document.querySelector('textarea').clientHeight - 4); // 4 - it is paddings top and bottom (2 + 2)
let oldHeight;
let newHeight;

oldHeight = await getHeight();
const getComment = Selector(() =>
document.querySelector(`textarea[rows="2"]`), {visibilityCheck: true});

await t
.click(`#change_rows_to_2`);

newHeight = await getHeight();

assert.equal(oldHeight, newHeight*2);
.click(`#change_rows_to_2`)
.hover(getComment);
});

test(`change cols count`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/questions/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`choose empty`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/questions/dropdown_restfull.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`choose empty`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/questions/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`choose file`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/questions/htmlQuestion.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check html elements`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/questions/matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`choose value`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/questions/matrixdropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`choose several values`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/questions/matrixdynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`choose empty`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/questions/multipletext.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`fill text fields`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/questions/radiogroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`choose empty`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/questions/rating.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`description exists`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/questions/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`fill text field`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/survey/autoNextPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check auto next page`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/survey/changeRendering.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check new elements rendering`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/survey/cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check works and delete`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/survey/customCss.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check custom class`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/survey/customNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`set custom navigation`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/survey/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`next`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/survey/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`change question required text`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/survey/preprocessTitlesAndHtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check title and html`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/survey/questionsInOneLine.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check one line`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/survey/workWithData.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`set data`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/validation/customValidators.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check validation`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/validation/standardValidators.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check validation`, async t => {
Expand Down
2 changes: 1 addition & 1 deletion testCafe/tests/validation/validateOnEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
.beforeEach( async t => {
await t
.typeText(`#testName`, title)
.pressKey(`enter`);
.click(`body`);
});

test(`check validation`, async t => {
Expand Down

0 comments on commit dcef147

Please sign in to comment.