Skip to content

Commit dcef147

Browse files
dmitry-kurmanovandrewtelnov
authored andcommitted
functional tests + travis deploy (#144)
* functional tests - fixed "change rows count" test * functional tests - fixed "start test" method because of ie
1 parent c110c5e commit dcef147

33 files changed

+37
-44
lines changed

testCafe/tests/conditionsAndTriggers/completeTrigger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
1212
.beforeEach( async t => {
1313
await t
1414
.typeText(`#testName`, title)
15-
.pressKey(`enter`);
15+
.click(`body`);
1616
});
1717

1818
test(`check visibility`, async t => {

testCafe/tests/conditionsAndTriggers/setValueTrigger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
1212
.beforeEach( async t => {
1313
await t
1414
.typeText(`#testName`, title)
15-
.pressKey(`enter`);
15+
.click(`body`);
1616
});
1717

1818
test(`check visibility`, async t => {

testCafe/tests/conditionsAndTriggers/visibleIf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
1212
.beforeEach( async t => {
1313
await t
1414
.typeText(`#testName`, title)
15-
.pressKey(`enter`);
15+
.click(`body`);
1616
});
1717

1818
test(`check visibility`, async t => {

testCafe/tests/conditionsAndTriggers/visibleTrigger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
1212
.beforeEach( async t => {
1313
await t
1414
.typeText(`#testName`, title)
15-
.pressKey(`enter`);
15+
.click(`body`);
1616
});
1717

1818
test(`check visibility`, async t => {

testCafe/tests/dxService/getSurveyResult.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
1212
.beforeEach( async t => {
1313
await t
1414
.typeText(`#testName`, title)
15-
.pressKey(`enter`);
15+
.click(`body`);
1616
});
1717

1818
test(`correct get result`, async t => {

testCafe/tests/dxService/loadSurvey.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
1212
.beforeEach( async t => {
1313
await t
1414
.typeText(`#testName`, title)
15-
.pressKey(`enter`);
15+
.click(`body`);
1616
});
1717

1818
test(`correct loading`, async t => {

testCafe/tests/dxService/runSurveyOneTime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ frameworks.forEach( (framework) => {
1313
.beforeEach( async t => {
1414
await t
1515
.typeText(`#testName`, title)
16-
.pressKey(`enter`);
16+
.click(`body`);
1717
});
1818

1919
test(`check one time run`, async t => {

testCafe/tests/questions/checkboxes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
1212
.beforeEach( async t => {
1313
await t
1414
.typeText(`#testName`, title)
15-
.pressKey(`enter`);
15+
.click(`body`);
1616
});
1717

1818
test(`choose empty`, async t => {

testCafe/tests/questions/comment.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
1212
.beforeEach( async t => {
1313
await t
1414
.typeText(`#testName`, title)
15-
.pressKey(`enter`);
15+
.click(`body`);
1616
});
1717

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

3333
if (framework.indexOf("bootstrap") === -1) {
3434
test(`change rows count`, async t => {
35-
const getHeight = ClientFunction(() =>
36-
document.querySelector('textarea').clientHeight - 4); // 4 - it is paddings top and bottom (2 + 2)
37-
let oldHeight;
38-
let newHeight;
39-
40-
oldHeight = await getHeight();
35+
const getComment = Selector(() =>
36+
document.querySelector(`textarea[rows="2"]`), {visibilityCheck: true});
4137

4238
await t
43-
.click(`#change_rows_to_2`);
44-
45-
newHeight = await getHeight();
46-
47-
assert.equal(oldHeight, newHeight*2);
39+
.click(`#change_rows_to_2`)
40+
.hover(getComment);
4841
});
4942

5043
test(`change cols count`, async t => {

testCafe/tests/questions/dropdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ frameworks.forEach( (framework) => {
1212
.beforeEach( async t => {
1313
await t
1414
.typeText(`#testName`, title)
15-
.pressKey(`enter`);
15+
.click(`body`);
1616
});
1717

1818
test(`choose empty`, async t => {

0 commit comments

Comments
 (0)