Open DavertMik opened 2 years ago
π Linked to Test 'nulla elit ac nulla sed vel' in Testomat.io
| Result | failed | | Tests | undefined |
| --- | --- |
| Result | π΄ failed |
| Tests | undefined total |
| --- | --- |
| Result | π΄ failed |
| Tests | undefined total |
Result | π΄ failed |
---|---|
Tests | undefined total |
RUN REPORT | π΄ failed |
---|---|
Tests | 1 total (π’ 0 passed, π΄ 1 failed, undefined 0 skipped) |
π΄ Status | FAILED |
---|---|
βοΈ Tests | 1 total (π’ 0 passed, failed, π‘ 0 skipped) |
π Duration | 6974s |
π΄ Failed | 1 tests |
π’ Passed | 0 tests |
π‘ Skipped | 0 tests |
β« Status | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 1 total (π’ 0 passed, failed, π‘ 0 skipped) |
π Duration | 7150s |
π΄ Failed | 1 tests |
π’ Passed | 0 tests |
π‘ Skipped | 0 tests |
### Failures
Text "some text" was not found on page after 5 sec page.waitForFunction: Timeout 5000ms exceeded.
I am on page "http://todomvc.com/examples/angularjs/#/" [90m(1428ms)[39m
[36m[1mGiven I already have some todos[22m[39m
[31mI wait for text "some text"[39m [90m(5006ms)[39m
[1m[31m################[ Failure ]################[39m[22m
[1mText "some text" was not found on page after 5 sec[22m
[1mpage.waitForFunction: Timeout 5000ms exceeded.[22m
2345 | [90m}[39m
2346 | [90m}[39m [36melse[39m [90m{[39m
2347 | waiter [90m=[39m contextObject[90m.[39mwaitForFunction[90m([39mtext [90m=>[39m document[90m.[39mbody [90m&&[39m document[90m.[39mbody[90m.[39minnerText[90m.[39mindexOf[90m([39mtext[90m)[39m [90m>[39m [90m-[39m[35m1[39m[90m,[39m text[90m,[39m [90m{[39m timeout[90m:[39m waitTimeout [90m}[39m[90m)[39m[90m;[39m
2348 | [90m}[39m
2349 | [36mreturn[39m waiter[90m.[39m[36mcatch[39m[90m([39m[90m([39merr[90m)[39m [90m=>[39m [90m{[39m
[41m > 2350 [49m| [36mthrow[39m [36mnew[39m Error[90m([39m[32m`Text "${text}" was not found on page after ${waitTimeout / 1000} sec\n${err.message}`[39m[90m)[39m[90m;[39m
2351 | [90m}[39m[90m)[39m[90m;[39m
2352 | [90m}[39m
2353 |
2354 | [90m[1m/**[22m[39m
2355 |[90m[1m * Waits for a network request.[22m[39m
β« Status | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 32 total (π’ 9 passed, failed, π‘ 0 skipped) |
π Duration | 61920ms |
π΄ Failed | 12 tests |
π’ Passed | 9 tests |
π‘ Skipped | 0 tests |
Expected "Todo with umlauts Àâü" but got "
Todo with umlauts Àâü
"
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "
Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo
"
Expected "Todo with html code " but got "
Todo with html code <script>alert("hello")</script>
"
Expected "Todo with lots of whitespace around" but got "
Todo with lots of whitespace around
"
Expected "first" but got "
first
"
I.createUserAndLogIn is not a function
Expected "boom" but got "
boom
"
Cannot read property 'page' of undefined
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
Expected "foo" but got "
foo
"
Text "some text" was not found on page after 5 sec page.waitForFunction: Timeout 5000ms exceeded.
β« Status | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 32 total (π’ 9 passed, failed, π‘ 0 skipped) |
π Duration | 63967ms |
π΄ Failed | 12 tests |
π’ Passed | 9 tests |
π‘ Skipped | 0 tests |
β« Status | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 32 |
π Duration | 63516ms |
π΄ Failed | 12 tests |
π’ Passed | 9 tests |
π‘ Skipped | 0 tests |
β« Status | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 32 |
π Duration | 62680ms |
π΄ Failed | 12 tests |
π’ Passed | 9 tests |
π‘ Skipped | 0 tests |
Expected "Todo with umlauts " but got "Todo with umlauts "
[32m[1mTodosPage: goto [22m[39m I am on page "http://todomvc.com/examples/angularjs/#/" [90m(1699ms)[39m I refresh page [90m(673ms)[39m I execute script () => sessionStorage.clear() [90m(7ms)[39m I execute script () => console.error('Boom!') [90m(3ms)[39m I wait for visible ".new-todo" [90m(45ms)[39m[36m[1mWhen I enter {Todo Text}[22m[39m[32m[1mTodosPage: enterTodo "Todo with umlauts "[22m[39m I fill field ".new-todo", "Todo with umlauts " [90m(337ms)[39m I press key "Enter" [90m(38ms)[39m[36m[1mThen I see {Result}[22m[39m[32m[1mTodosPage: seeNthTodoEquals 1, "Todo with umlauts "[22m[39m I grab text from ".todo-list li" [90m(8ms)[39m[1m[31m################[ Failure ]################[39m[22m[1mExpected "Todo with umlauts " but got "[22m[1m[22m[1m[22m[1mTodo with umlauts [22m[1m[22m[1m[22m[1m[22m[1m[22m[1m[22m[1m"[22m[1m[32m+ expected[39m[22m [1m[31m- actual[39m[22m[31m- false[39m[32m+ true[39m 84 | [36mlet[39m todos [90m=[39m [36mawait[39m I[90m.[39mgrabTextFrom[90m([39m[32m'.todo-list li'[39m[90m)[39m 85 | [36mif[39m [90m([39m[36mtypeof[39m todos [90m===[39m [32m'string'[39m[90m)[39m [90m{[39m 86 | todos [90m=[39m [90m[[39mtodos[90m][39m 87 | [90m}[39m 88 |[41m > 89 [49m| assert[90m([39mtodos[90m[[39mnthTodo [90m-[39m [35m1[39m[90m][39m [90m===[39m [35m1[39m[90m,[39m [32m`Expected "${todo}" but got "${todos[nthTodo - 1]}"`[39m[90m)[39m 90 | [36mreturn[39m todos 91 | [90m}[39m[90m,[39m 92 | 93 | seeNumberOfTodos[90m([39mnumberOfTodos[90m)[39m [90m{[39m 94 | I[90m.[39mseeNumberOfVisibleElements[90m([39m[32m'.todo-list li'[39m[90m,[39m numberOfTodos[90m)[39m at [1mObject.seeNthTodoEquals[22m ([90m[4mtodomvc-tests/pages/todos.page.js:89:9[24m[39m) at [1masync Test.<anonymous>[22m ([90m[4mtodomvc-tests/create-todos_test.js:90:5[24m[39m)
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo"
[32m[1mTodosPage: goto [22m[39m I am on page "http://todomvc.com/examples/angularjs/#/" [90m(1205ms)[39m I refresh page [90m(646ms)[39m I execute script () => sessionStorage.clear() [90m(6ms)[39m I execute script () => console.error('Boom!') [90m(5ms)[39m I wait for visible ".new-todo" [90m(63ms)[39m[36m[1mWhen I enter {Todo Text}[22m[39m[32m[1mTodosPage: enterTodo "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo"[22m[39m I fill field ".new-todo", "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" [90m(2126ms)[39m I press key "Enter" [90m(50ms)[39m[36m[1mThen I see {Result}[22m[39m[32m[1mTodosPage: seeNthTodoEquals 1, "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo"[22m[39m I grab text from ".todo-list li" [90m(14ms)[39m[1m[31m################[ Failure ]################[39m[22m[1mExpected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "[22m[1m[22m[1m[22m[1mVery loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo[22m[1m[22m[1m[22m[1m[22m[1m[22m[1m[22m[1m"[22m[1m[32m+ expected[39m[22m [1m[31m- actual[39m[22m[31m- false[39m[32m+ true[39m 84 | [36mlet[39m todos [90m=[39m [36mawait[39m I[90m.[39mgrabTextFrom[90m([39m[32m'.todo-list li'[39m[90m)[39m 85 | [36mif[39m [90m([39m[36mtypeof[39m todos [90m===[39m [32m'string'[39m[90m)[39m [90m{[39m 86 | todos [90m=[39m [90m[[39mtodos[90m][39m 87 | [90m}[39m 88 |[41m > 89 [49m| assert[90m([39mtodos[90m[[39mnthTodo [90m-[39m [35m1[39m[90m][39m [90m===[39m [35m1[39m[90m,[39m [32m`Expected "${todo}" but got "${todos[nthTodo - 1]}"`[39m[90m)[39m 90 | [36mreturn[39m todos 91 | [90m}[39m[90m,[39m 92 | 93 | seeNumberOfTodos[90m([39mnumberOfTodos[90m)[39m [90m{[39m 94 | I[90m.[39mseeNumberOfVisibleElements[90m([39m[32m'.todo-list li'[39m[90m,[39m numberOfTodos[90m)[39m at [1mObject.seeNthTodoEquals[22m ([90m[4mtodomvc-tests/pages/todos.page.js:89:9[24m[39m) at [1masync Test.<anonymous>[22m ([90m[4mtodomvc-tests/create-todos_test.js:90:5[24m[39m)
Expected "Todo with html code <script>alert("hello")</script>" but got "Todo with html code <script>alert("hello")</script>"
[32m[1mTodosPage: goto [22m[39m I am on page "http://todomvc.com/examples/angularjs/#/" [90m(1245ms)[39m I refresh page [90m(661ms)[39m I execute script () => sessionStorage.clear() [90m(4ms)[39m I execute script () => console.error('Boom!') [90m(3ms)[39m I wait for visible ".new-todo" [90m(45ms)[39m[36m[1mWhen I enter {Todo Text}[22m[39m[32m[1mTodosPage: enterTodo "Todo with html code <script>alert("hello")</script>"[22m[39m I fill field ".new-todo", "Todo with html code <script>alert("hello")</script>" [90m(790ms)[39m I press key "Enter" [90m(34ms)[39m[36m[1mThen I see {Result}[22m[39m[32m[1mTodosPage: seeNthTodoEquals 1, "Todo with html code <script>alert("hello")</script>"[22m[39m I grab text from ".todo-list li" [90m(7ms)[39m[1m[31m################[ Failure ]################[39m[22m[1mExpected "Todo with html code <script>alert("hello")</script>" but got "[22m[1m[22m[1m[22m[1mTodo with html code <script>alert("hello")</script>[22m[1m[22m[1m[22m[1m[22m[1m[22m[1m[22m[1m"[22m[1m[32m+ expected[39m[22m [1m[31m- actual[39m[22m[31m- false[39m[32m+ true[39m 84 | [36mlet[39m todos [90m=[39m [36mawait[39m I[90m.[39mgrabTextFrom[90m([39m[32m'.todo-list li'[39m[90m)[39m 85 | [36mif[39m [90m([39m[36mtypeof[39m todos [90m===[39m [32m'string'[39m[90m)[39m [90m{[39m 86 | todos [90m=[39m [90m[[39mtodos[90m][39m 87 | [90m}[39m 88 |[41m > 89 [49m| assert[90m([39mtodos[90m[[39mnthTodo [90m-[39m [35m1[39m[90m][39m [90m===[39m [35m1[39m[90m,[39m [32m`Expected "${todo}" but got "${todos[nthTodo - 1]}"`[39m[90m)[39m 90 | [36mreturn[39m todos 91 | [90m}[39m[90m,[39m 92 | 93 | seeNumberOfTodos[90m([39mnumberOfTodos[90m)[39m [90m{[39m 94 | I[90m.[39mseeNumberOfVisibleElements[90m([39m[32m'.todo-list li'[39m[90m,[39m numberOfTodos[90m)[39m at [1mObject.seeNthTodoEquals[22m ([90m[4mtodomvc-tests/pages/todos.page.js:89:9[24m[39m) at [1masync Test.<anonymous>[22m ([90m[4mtodomvc-tests/create-todos_test.js:90:5[24m[39m)
Expected "Todo with lots of whitespace around" but got "Todo with lots of whitespace around"
[32m[1mTodosPage: goto [22m[39m I am on page "http://todomvc.com/examples/angularjs/#/" [90m(1166ms)[39m I refresh page [90m(662ms)[39m I execute script () => sessionStorage.clear() [90m(4ms)[39m I execute script () => console.error('Boom!') [90m(3ms)[39m I wait for visible ".new-todo" [90m(35ms)[39m[36m[1mGiven I have an empty todo list[22m[39m[36m[1mWhen I enter a todo with whitespace around the text[22m[39m[32m[1mTodosPage: enterTodo " Todo with lots of whitespace around "[22m[39m I fill field ".new-todo", " Todo with lots of whitespace around " [90m(745ms)[39m I press key "Enter" [90m(42ms)[39m[36m[1mThen I see the trimmed text of the todo in the list[22m[39m[32m[1mTodosPage: seeNthTodoEquals 1, "Todo with lots of whitespace around"[22m[39m I grab text from ".todo-list li" [90m(16ms)[39m[1m[31m################[ Failure ]################[39m[22m[1mExpected "Todo with lots of whitespace around" but got "[22m[1m[22m[1m[22m[1mTodo with lots of whitespace around[22m[1m[22m[1m[22m[1m[22m[1m[22m[1m[22m[1m"[22m[1m[32m+ expected[39m[22m [1m[31m- actual[39m[22m[31m- false[39m[32m+ true[39m 84 | [36mlet[39m todos [90m=[39m [36mawait[39m I[90m.[39mgrabTextFrom[90m([39m[32m'.todo-list li'[39m[90m)[39m 85 | [36mif[39m [90m([39m[36mtypeof[39m todos [90m===[39m [32m'string'[39m[90m)[39m [90m{[39m 86 | todos [90m=[39m [90m[[39mtodos[90m][39m 87 | [90m}[39m 88 |[41m > 89 [49m| assert[90m([39mtodos[90m[[39mnthTodo [90m-[39m [35m1[39m[90m][39m [90m===[39m [35m1[39m[90m,[39m [32m`Expected "${todo}" but got "${todos[nthTodo - 1]}"`[39m[90m)[39m 90 | [36mreturn[39m todos 91 | [90m}[39m[90m,[39m 92 | 93 | seeNumberOfTodos[90m([39mnumberOfTodos[90m)[39m [90m{[39m 94 | I[90m.[39mseeNumberOfVisibleElements[90m([39m[32m'.todo-list li'[39m[90m,[39m numberOfTodos[90m)[39m at [1mObject.seeNthTodoEquals[22m ([90m[4mtodomvc-tests/pages/todos.page.js:89:9[24m[39m) at [1masync Test.<anonymous>[22m ([90m[4mtodomvc-tests/create-todos_test.js:109:3[24m[39m)
Expected "first" but got "first"
[32m[1mTodosPage: goto [22m[39m I am on page "http://todomvc.com/examples/angularjs/#/" [90m(1186ms)[39m I refresh page [90m(675ms)[39m I execute script () => sessionStorage.clear() [90m(5ms)[39m I execute script () => console.error('Boom!') [90m(3ms)[39m I wait for visible ".new-todo" [90m(41ms)[39m[36m[1mGiven I added some todos[22m[39m[32m[1mTodosPage: enterTodo "last"[22m[39m I fill field ".new-todo", "first" [90m(111ms)[39m I press key "Enter" [90m(45ms)[39m I fill field ".new-todo", "second" [90m(117ms)[39m I press key "Enter" [90m(11ms)[39m I fill field ".new-todo", "last" [90m(82ms)[39m I press key "Enter" [90m(8ms)[39m[36m[1mWhen I look at my todo list[22m[39m[36m[1mThen I see the todos in the order in which I added them[22m[39m[32m[1mTodosPage: seeNthTodoEquals 1, "first"[22m[39m I grab text from ".todo-list li" [90m(10ms)[39m[1m[31m################[ Failure ]################[39m[22m[1mExpected "first" but got "[22m[1m[22m[1m[22m[1mfirst[22m[1m[22m[1m[22m[1m[22m[1m[22m[1m[22m[1m"[22m[1m[32m+ expected[39m[22m [1m[31m- actual[39m[22m[31m- false[39m[32m+ true[39m 84 | [36mlet[39m todos [90m=[39m [36mawait[39m I[90m.[39mgrabTextFrom[90m([39m[32m'.todo-list li'[39m[90m)[39m 85 | [36mif[39m [90m([39m[36mtypeof[39m todos [90m===[39m [32m'string'[39m[90m)[39m [90m{[39m 86 | todos [90m=[39m [90m[[39mtodos[90m][39m 87 | [90m}[39m 88 |[41m > 89 [49m| assert[90m([39mtodos[90m[[39mnthTodo [90m-[39m [35m1[39m[90m][39m [90m===[39m [35m1[39m[90m,[39m [32m`Expected "${todo}" but got "${todos[nthTodo - 1]}"`[39m[90m)[39m 90 | [36mreturn[39m todos 91 | [90m}[39m[90m,[39m 92 | 93 | seeNumberOfTodos[90m([39mnumberOfTodos[90m)[39m [90m{[39m 94 | I[90m.[39mseeNumberOfVisibleElements[90m([39m[32m'.todo-list li'[39m[90m,[39m numberOfTodos[90m)[39m at [1mObject.seeNthTodoEquals[22m ([90m[4mtodomvc-tests/pages/todos.page.js:89:9[24m[39m) at [1masync Test.<anonymous>[22m ([90m[4mtodomvc-tests/create-todos_test.js:121:3[24m[39m)
I.createUserAndLogIn is not a function
[32m[1mTodosPage: goto [22m[39m I am on page "http://todomvc.com/examples/angularjs/#/" [90m(1179ms)[39m I refresh page [90m(674ms)[39m I execute script () => sessionStorage.clear() [90m(6ms)[39m I execute script () => console.error('Boom!') [90m(3ms)[39m I wait for visible ".new-todo" [90m(44ms)[39m[32m[1mTodosPage: enterTodo "baz"[22m[39m I fill field ".new-todo", "foo" [90m(78ms)[39m I press key "Enter" [90m(47ms)[39m I fill field ".new-todo", "bar" [90m(74ms)[39m I press key "Enter" [90m(11ms)[39m I fill field ".new-todo", "baz" [90m(74ms)[39m I press key "Enter" [90m(10ms)[39m[1m[31m################[ Failure ]################[39m[22m[1mI.createUserAndLogIn is not a function[22m 7 | TodosPage[90m.[39menterTodo[90m([39m[32m'bar'[39m[90m)[39m 8 | TodosPage[90m.[39menterTodo[90m([39m[32m'baz'[39m[90m)[39m 9 |[90m}[39m[90m)[39m 10 | 11 |Scenario[90m([39m[32m'Unapproved user cant chat with unapproved user'[39m[90m,[39m [36masync[39m [90m([39m[90m{[39mI[90m}[39m[90m)[39m [90m=>[39m [90m{[39m[41m > 12 [49m| I[90m.[39mcreateUserAndLogIn[90m([39m[90m)[39m[90m;[39m 13 | [36mconst[39m username [90m=[39m globalConf[90m.[39musers[90m.[39mgetCurrentUser[90m([39m[90m)[39m[90m.[39musername[90m;[39m 14 | [36mawait[39m I[90m.[39mgetUserId[90m([39musername[90m)[39m[90m;[39m 15 | 16 | I[90m.[39mlogOut[90m([39m[90m)[39m[90m;[39m 17 | at [1mTest.<anonymous>[22m ([90m[4mtodomvc-tests/edit-todos_test.js:12:5[24m[39m)
Expected "boom" but got "boom"
[32m[1mTodosPage: goto [22m[39m I am on page "http://todomvc.com/examples/angularjs/#/" [90m(1167ms)[39m I refresh page [90m(632ms)[39m I execute script () => sessionStorage.clear() [90m(5ms)[39m I execute script () => console.error('Boom!') [90m(4ms)[39m I wait for visible ".new-todo" [90m(36ms)[39m[32m[1mTodosPage: enterTodo "baz"[22m[39m I fill field ".new-todo", "foo" [90m(68ms)[39m I press key "Enter" [90m(31ms)[39m I fill field ".new-todo", "bar" [90m(59ms)[39m I press key "Enter" [90m(7ms)[39m I fill field ".new-todo", "baz" [90m(55ms)[39m I press key "Enter" [90m(7ms)[39m[36m[1mGiven I have some todos[22m[39m[36m[1mWhen I edit the first todo[22m[39m[32m[1mTodosPage: editNthTodo 1, "boom"[22m[39m I double click 1 todo item [90m(102ms)[39m I fill field 1nth todo input, "boom" [90m(93ms)[39m I press key "Enter" [90m(6ms)[39m[36m[1mThen I see that the todo text has been changed[22m[39m[32m[1mTodosPage: seeNthTodoEquals 1, "boom"[22m[39m I grab text from ".todo-list li" [90m(11ms)[39m[1m[31m################[ Failure ]################[39m[22m[1mExpected "boom" but got "[22m[1m[22m[1m[22m[1mboom[22m[1m[22m[1m[22m[1m[22m[1m[22m[1m[22m[1m"[22m[1m[32m+ expected[39m[22m [1m[31m- actual[39m[22m[31m- false[39m[32m+ true[39m 84 | [36mlet[39m todos [90m=[39m [36mawait[39m I[90m.[39mgrabTextFrom[90m([39m[32m'.todo-list li'[39m[90m)[39m 85 | [36mif[39m [90m([39m[36mtypeof[39m todos [90m===[39m [32m'string'[39m[90m)[39m [90m{[39m 86 | todos [90m=[39m [90m[[39mtodos[90m][39m 87 | [90m}[39m 88 |[41m > 89 [49m| assert[90m([39mtodos[90m[[39mnthTodo [90m-[39m [35m1[39m[90m][39m [90m===[39m [35m1[39m[90m,[39m [32m`Expected "${todo}" but got "${todos[nthTodo - 1]}"`[39m[90m)[39m 90 | [36mreturn[39m todos 91 | [90m}[39m[90m,[39m 92 | 93 | seeNumberOfTodos[90m([39mnumberOfTodos[90m)[39m [90m{[39m 94 | I[90m.[39mseeNumberOfVisibleElements[90m([39m[32m'.todo-list li'[39m[90m,[39m numberOfTodos[90m)[39m at [1mObject.seeNthTodoEquals[22m ([90m[4mtodomvc-tests/pages/todos.page.js:89:9[24m[39m) at [1masync Test.<anonymous>[22m ([90m[4mtodomvc-tests/edit-todos_test.js:32:5[24m[39m)
Cannot read property 'page' of undefined
[32m[1mTodosPage: goto [22m[39m I am on page "http://todomvc.com/examples/angularjs/#/" [90m(1130ms)[39m I refresh page [90m(702ms)[39m I execute script () => sessionStorage.clear() [90m(5ms)[39m I execute script () => console.error('Boom!') [90m(2ms)[39m I wait for visible ".new-todo" [90m(25ms)[39m[32m[1mTodosPage: enterTodo "baz"[22m[39m I fill field ".new-todo", "foo" [90m(74ms)[39m I press key "Enter" [90m(44ms)[39m I fill field ".new-todo", "bar" [90m(60ms)[39m I press key "Enter" [90m(8ms)[39m I fill field ".new-todo", "baz" [90m(61ms)[39m I press key "Enter" [90m(8ms)[39m[36m[1mGiven I have some todos[22m[39m[36m[1mWhen I delete the first todo[22m[39m[32m[1mTodosPage: deleteNthTodo 1[22m[39m [31mI hover ".todo-list li:nth-child(1)"[39m [90m(1ms)[39m[1m[31m################[ Failure ]################[39m[22m[1mCannot read property 'page' of undefined[22m 70 | I[90m.[39mpressKey[90m([39m[32m'Enter'[39m[90m)[39m 71 | [90m}[39m[90m,[39m 72 | 73 | deleteNthTodo[90m([39mnthTodo[90m)[39m [90m{[39m 74 | [90m[1m// Use a custom helper function to hover over an todo item[22m[39m[41m > 75 [49m| I[90m.[39mhover[90m([39m[32m`.todo-list li:nth-child(${nthTodo})`[39m[90m)[39m 76 | I[90m.[39mclick[90m([39mnthTTodoDeleteButton[90m([39mnthTodo[90m)[39m[90m)[39m 77 | [90m}[39m[90m,[39m 78 | 79 | refresh[90m([39m[90m)[39m [90m{[39m 80 | I[90m.[39mrefreshPage[90m([39m[90m)[39m at [1mObject.deleteNthTodo[22m ([90m[4m./todomvc-tests/pages/todos.page.js:75:11[24m[39m)
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
[32m[1mTodosPage: goto [22m[39m I am on page "http://todomvc.com/examples/angularjs/#/" [90m(1101ms)[39m I refresh page [90m(636ms)[39m I execute script () => sessionStorage.clear() [90m(3ms)[39m I execute script () => console.error('Boom!') [90m(4ms)[39m I wait for visible ".new-todo" [90m(36ms)[39m[32m[1mTodosPage: enterTodo "baz"[22m[39m I fill field ".new-todo", "foo" [90m(69ms)[39m I press key "Enter" [90m(24ms)[39m I fill field ".new-todo", "bar" [90m(67ms)[39m I press key "Enter" [90m(8ms)[39m I fill field ".new-todo", "baz" [90m(65ms)[39m I press key "Enter" [90m(8ms)[39m[36m[1mGiven I have some todos[22m[39m[36m[1mWhen I mark them all as completed[22m[39m[32m[1mTodosPage: markAllAsCompleted [22m[39m [31mI click "label[for="toggle-all""[39m [90m(27ms)[39m[1m[31m################[ Failure ]################[39m[22m[1mpage.$$: Unexpected token "" while parsing selector "label[for="toggle-all""[22m 43 | assert[90m([39mclassNames[90m.[39mindexOf[90m([39m[32m'completed'[39m[90m)[39m [90m>=[39m [35m0[39m[90m,[39m [32m'Expected todo to be marked as completed'[39m[90m)[39m 44 | I[90m.[39mclick[90m([39mnthTodoCheckbox[90m([39mnthTodo[90m)[39m[90m)[39m 45 | [90m}[39m[90m,[39m 46 | 47 | markAllAsCompleted[90m([39m[90m)[39m [90m{[39m[41m > 48 [49m| I[90m.[39mclick[90m([39m[32m'label[for="toggle-all"'[39m[90m)[39m 49 | [90m}[39m[90m,[39m 50 | 51 | clearCompleted[90m([39m[90m)[39m [90m{[39m 52 | I[90m.[39mclick[90m([39m[32m'button.clear-completed'[39m[90m)[39m 53 | [90m}[39m[90m,[39m at [1mObject.markAllAsCompleted[22m ([90m[4m./todomvc-tests/pages/todos.page.js:48:11[24m[39m)
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
[32m[1mTodosPage: goto [22m[39m I am on page "http://todomvc.com/examples/angularjs/#/" [90m(1221ms)[39m I refresh page [90m(648ms)[39m I execute script () => sessionStorage.clear() [90m(5ms)[39m I execute script () => console.error('Boom!') [90m(3ms)[39m I wait for visible ".new-todo" [90m(41ms)[39m[32m[1mTodosPage: enterTodo "baz"[22m[39m I fill field ".new-todo", "foo" [90m(70ms)[39m I press key "Enter" [90m(34ms)[39m I fill field ".new-todo", "bar" [90m(62ms)[39m I press key "Enter" [90m(8ms)[39m I fill field ".new-todo", "baz" [90m(70ms)[39m I press key "Enter" [90m(8ms)[39m[36m[1mGiven I have some completed todos[22m[39m[32m[1mTodosPage: markAllAsCompleted [22m[39m [31mI click "label[for="toggle-all""[39m [90m(23ms)[39m[1m[31m################[ Failure ]################[39m[22m[1mpage.$$: Unexpected token "" while parsing selector "label[for="toggle-all""[22m 43 | assert[90m([39mclassNames[90m.[39mindexOf[90m([39m[32m'completed'[39m[90m)[39m [90m>=[39m [35m0[39m[90m,[39m [32m'Expected todo to be marked as completed'[39m[90m)[39m 44 | I[90m.[39mclick[90m([39mnthTodoCheckbox[90m([39mnthTodo[90m)[39m[90m)[39m 45 | [90m}[39m[90m,[39m 46 | 47 | markAllAsCompleted[90m([39m[90m)[39m [90m{[39m[41m > 48 [49m| I[90m.[39mclick[90m([39m[32m'label[for="toggle-all"'[39m[90m)[39m 49 | [90m}[39m[90m,[39m 50 | 51 | clearCompleted[90m([39m[90m)[39m [90m{[39m 52 | I[90m.[39mclick[90m([39m[32m'button.clear-completed'[39m[90m)[39m 53 | [90m}[39m[90m,[39m at [1mObject.markAllAsCompleted[22m ([90m[4m./todomvc-tests/pages/todos.page.js:48:11[24m[39m)
Expected "foo" but got "foo"
[36m[1mGiven I have some todos[22m[39mI clear cookie [90m(2ms)[39m[32m[1mTodosPage: goto [22m[39m I am on page "http://todomvc.com/examples/angularjs/#/" [90m(1277ms)[39m I refresh page [90m(622ms)[39m I execute script () => sessionStorage.clear() [90m(3ms)[39m I execute script () => console.error('Boom!') [90m(4ms)[39m I wait for visible ".new-todo" [90m(26ms)[39m[32m[1mTodosPage: enterTodos [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}][22m[39m I execute script (todoItems) => { localStorage.setItem('todos-angularjs', JSON.stringify(todoItems)); }, [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}] [90m(8ms)[39m[32m[1mTodosPage: refresh [22m[39m I refresh page [90m(665ms)[39mI save screenshot "initial-todos.png" [90m(109ms)[39m[36m[1mAnd I marked the first as completed[22m[39m[32m[1mTodosPage: markNthAsCompleted 1[22m[39m I grab attribute from 1 todo item, "class" [90m(32ms)[39m I click {xpath: .//div/input[ancestor::*[contains(concat(' ', normalize-space(./@class), ' '), ' todo-list ')]//li[count(preceding-sibling::*) = 0]]} [90m(84ms)[39m[36m[1mWhen I refresh the page[22m[39m[32m[1mTodosPage: refresh [22m[39m I refresh page [90m(647ms)[39m[36m[1mThen I still see the same todos[22m[39m[32m[1mTodosPage: seeNumberOfTodos 4[22m[39m I see number of visible elements ".todo-list li", 4 [90m(34ms)[39m[32m[1mTodosPage: seeNthTodoEquals 1, "foo"[22m[39m I grab text from ".todo-list li" [90m(8ms)[39m[1m[31m################[ Failure ]################[39m[22m[1mExpected "foo" but got "[22m[1m[22m[1m[22m[1mfoo[22m[1m[22m[1m[22m[1m[22m[1m[22m[1m[22m[1m"[22m[1m[32m+ expected[39m[22m [1m[31m- actual[39m[22m[31m- false[39m[32m+ true[39m 84 | [36mlet[39m todos [90m=[39m [36mawait[39m I[90m.[39mgrabTextFrom[90m([39m[32m'.todo-list li'[39m[90m)[39m 85 | [36mif[39m [90m([39m[36mtypeof[39m todos [90m===[39m [32m'string'[39m[90m)[39m [90m{[39m 86 | todos [90m=[39m [90m[[39mtodos[90m][39m 87 | [90m}[39m 88 |[41m > 89 [49m| assert[90m([39mtodos[90m[[39mnthTodo [90m-[39m [35m1[39m[90m][39m [90m===[39m [35m1[39m[90m,[39m [32m`Expected "${todo}" but got "${todos[nthTodo - 1]}"`[39m[90m)[39m 90 | [36mreturn[39m todos 91 | [90m}[39m[90m,[39m 92 | 93 | seeNumberOfTodos[90m([39mnumberOfTodos[90m)[39m [90m{[39m 94 | I[90m.[39mseeNumberOfVisibleElements[90m([39m[32m'.todo-list li'[39m[90m,[39m numberOfTodos[90m)[39m at [1mObject.seeNthTodoEquals[22m ([90m[4mtodomvc-tests/pages/todos.page.js:89:9[24m[39m) at [1masync Test.<anonymous>[22m ([90m[4mtodomvc-tests/persist-todos_test.js:27:3[24m[39m)
Text "some text" was not found on page after 5 secpage.waitForFunction: Timeout 5000ms exceeded.
I am on page "http://todomvc.com/examples/angularjs/#/" [90m(1181ms)[39m[36m[1mGiven I already have some todos[22m[39m[31mI wait for text "some text"[39m [90m(5004ms)[39m[1m[31m################[ Failure ]################[39m[22m[1mText "some text" was not found on page after 5 sec[22m[1mpage.waitForFunction: Timeout 5000ms exceeded.[22m 2345 | [90m}[39m 2346 | [90m}[39m [36melse[39m [90m{[39m 2347 | waiter [90m=[39m contextObject[90m.[39mwaitForFunction[90m([39mtext [90m=>[39m document[90m.[39mbody [90m&&[39m document[90m.[39mbody[90m.[39minnerText[90m.[39mindexOf[90m([39mtext[90m)[39m [90m>[39m [90m-[39m[35m1[39m[90m,[39m text[90m,[39m [90m{[39m timeout[90m:[39m waitTimeout [90m}[39m[90m)[39m[90m;[39m 2348 | [90m}[39m 2349 | [36mreturn[39m waiter[90m.[39m[36mcatch[39m[90m([39m[90m([39merr[90m)[39m [90m=>[39m [90m{[39m[41m > 2350 [49m| [36mthrow[39m [36mnew[39m Error[90m([39m[32m`Text "${text}" was not found on page after ${waitTimeout / 1000} sec\n${err.message}`[39m[90m)[39m[90m;[39m 2351 | [90m}[39m[90m)[39m[90m;[39m 2352 | [90m}[39m 2353 | 2354 | [90m[1m/**[22m[39m 2355 |[90m[1m * Waits for a network request.[22m[39m
β« Status | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 32 |
π Duration | 61147ms |
π΄ Failed | 12 tests |
π’ Passed | 9 tests |
π‘ Skipped | 0 tests |
Expected "Todo with umlauts " but got "Todo with umlauts "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1161ms) I refresh page (655ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (46ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with umlauts Àâü" I fill field ".new-todo", "Todo with umlauts Àâü" (339ms) I press key "Enter" (44ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with umlauts Àâü" I grab text from ".todo-list li" (16ms)
################[ Failure ]################
Expected "Todo with umlauts Àâü" but got "
Todo with umlauts Àâü
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1184ms) I refresh page (655ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (39ms) When I enter {Todo Text} TodosPage: enterTodo "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I fill field ".new-todo", "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" (2042ms) I press key "Enter" (24ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I grab text from ".todo-list li" (8ms)
################[ Failure ]################
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "
Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "Todo with html code " but got "Todo with html code "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1124ms) I refresh page (639ms) I execute script () => sessionStorage.clear() (6ms) I execute script () => console.error('Boom!') (5ms) I wait for visible ".new-todo" (38ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with html code <script>alert("hello")</script>" I fill field ".new-todo", "Todo with html code <script>alert("hello")</script>" (776ms) I press key "Enter" (46ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with html code <script>alert("hello")</script>" I grab text from ".todo-list li" (18ms)
################[ Failure ]################
Expected "Todo with html code " but got "
Todo with html code <script>alert("hello")</script>
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "Todo with lots of whitespace around" but got "Todo with lots of whitespace around"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1101ms) I refresh page (628ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (42ms) Given I have an empty todo list When I enter a todo with whitespace around the text TodosPage: enterTodo " Todo with lots of whitespace around " I fill field ".new-todo", " Todo with lots of whitespace around " (757ms) I press key "Enter" (47ms) Then I see the trimmed text of the todo in the list TodosPage: seeNthTodoEquals 1, "Todo with lots of whitespace around" I grab text from ".todo-list li" (14ms)
################[ Failure ]################
Expected "Todo with lots of whitespace around" but got "
Todo with lots of whitespace around
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "first" but got "first"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1071ms) I refresh page (662ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (28ms) Given I added some todos TodosPage: enterTodo "last" I fill field ".new-todo", "first" (93ms) I press key "Enter" (48ms) I fill field ".new-todo", "second" (100ms) I press key "Enter" (10ms) I fill field ".new-todo", "last" (82ms) I press key "Enter" (11ms) When I look at my todo list Then I see the todos in the order in which I added them TodosPage: seeNthTodoEquals 1, "first" I grab text from ".todo-list li" (11ms)
################[ Failure ]################
Expected "first" but got "
first
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
I.createUserAndLogIn is not a function
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1094ms) I refresh page (638ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (42ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (75ms) I press key "Enter" (35ms) I fill field ".new-todo", "bar" (61ms) I press key "Enter" (7ms) I fill field ".new-todo", "baz" (60ms) I press key "Enter" (7ms)
################[ Failure ]################
I.createUserAndLogIn is not a function 7 | TodosPage.enterTodo('bar') 8 | TodosPage.enterTodo('baz') 9 |}) 10 | 11 |Scenario('Unapproved user cant chat with unapproved user', async ({I}) => {
12 | I.createUserAndLogIn(); 13 | const username = globalConf.users.getCurrentUser().username; 14 | await I.getUserId(username); 15 | 16 | I.logOut(); 17 |
at Test.
---
- π΄ **Edited todo is saved on blur**
> Expected "boom" but got "boom"
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1159ms)
I refresh page (655ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (3ms)
I wait for visible ".new-todo" (42ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (73ms)
I press key "Enter" (41ms)
I fill field ".new-todo", "bar" (66ms)
I press key "Enter" (8ms)
I fill field ".new-todo", "baz" (65ms)
I press key "Enter" (6ms)
Given I have some todos
When I edit the first todo
TodosPage: editNthTodo 1, "boom"
I double click 1 todo item (93ms)
I fill field 1nth todo input, "boom" (78ms)
I press key "Enter" (6ms)
Then I see that the todo text has been changed
TodosPage: seeNthTodoEquals 1, "boom"
I grab text from ".todo-list li" (12ms)
################[ Failure ]################
Expected "boom" but got "
boom
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/edit-todos_test.js:32:5)
Cannot read property 'page' of undefined
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1140ms) I refresh page (667ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (41ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (76ms) I press key "Enter" (43ms) I fill field ".new-todo", "bar" (60ms) I press key "Enter" (9ms) I fill field ".new-todo", "baz" (67ms) I press key "Enter" (7ms) Given I have some todos When I delete the first todo TodosPage: deleteNthTodo 1 I hover ".todo-list li:nth-child(1)" (1ms)
################[ Failure ]################
Cannot read property 'page' of undefined 70 | I.pressKey('Enter') 71 | }, 72 | 73 | deleteNthTodo(nthTodo) { 74 | // Use a custom helper function to hover over an todo item
75 | I.hover(
.todo-list li:nth-child(${nthTodo})
) 76 | I.click(nthTTodoDeleteButton(nthTodo)) 77 | }, 78 | 79 | refresh() { 80 | I.refreshPage()
at Object.deleteNthTodo (./todomvc-tests/pages/todos.page.js:75:11)
---
- π΄ **Mark all todos as completed**
> page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1124ms)
I refresh page (623ms)
I execute script () => sessionStorage.clear() (4ms)
I execute script () => console.error('Boom!') (8ms)
I wait for visible ".new-todo" (36ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (70ms)
I press key "Enter" (36ms)
I fill field ".new-todo", "bar" (70ms)
I press key "Enter" (10ms)
I fill field ".new-todo", "baz" (62ms)
I press key "Enter" (6ms)
Given I have some todos
When I mark them all as completed
TodosPage: markAllAsCompleted
I click "label[for="toggle-all"" (34ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed')
44 | I.click(nthTodoCheckbox(nthTodo))
45 | },
46 |
47 | markAllAsCompleted() {
> 48 | I.click('label[for="toggle-all"')
49 | },
50 |
51 | clearCompleted() {
52 | I.click('button.clear-completed')
53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1130ms) I refresh page (641ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (2ms) I wait for visible ".new-todo" (22ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (67ms) I press key "Enter" (37ms) I fill field ".new-todo", "bar" (66ms) I press key "Enter" (11ms) I fill field ".new-todo", "baz" (72ms) I press key "Enter" (8ms) Given I have some completed todos TodosPage: markAllAsCompleted I click "label[for="toggle-all"" (29ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all"" 43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed') 44 | I.click(nthTodoCheckbox(nthTodo)) 45 | }, 46 | 47 | markAllAsCompleted() {
48 | I.click('label[for="toggle-all"') 49 | }, 50 | 51 | clearCompleted() { 52 | I.click('button.clear-completed') 53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
---
- π΄ **Todos survive a page refresh @step-06**
> Expected "foo" but got "foo"
```diff
Given I have some todos
I clear cookie (2ms)
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1150ms)
I refresh page (664ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (4ms)
I wait for visible ".new-todo" (29ms)
TodosPage: enterTodos [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}]
I execute script (todoItems) => {
localStorage.setItem('todos-angularjs', JSON.stringify(todoItems));
}, [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}] (6ms)
TodosPage: refresh
I refresh page (626ms)
I save screenshot "initial-todos.png" (161ms)
And I marked the first as completed
TodosPage: markNthAsCompleted 1
I grab attribute from 1 todo item, "class" (27ms)
I click {xpath: .//div/input[ancestor::*[contains(concat(' ', normalize-space(./@class), ' '), ' todo-list ')]//li[count(preceding-sibling::*) = 0]]} (90ms)
When I refresh the page
TodosPage: refresh
I refresh page (607ms)
Then I still see the same todos
TodosPage: seeNumberOfTodos 4
I see number of visible elements ".todo-list li", 4 (48ms)
TodosPage: seeNthTodoEquals 1, "foo"
I grab text from ".todo-list li" (10ms)
################[ Failure ]################
Expected "foo" but got "
foo
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/persist-todos_test.js:27:3)
Text "some text" was not found on page after 5 secpage.waitForFunction: Timeout 5000ms exceeded.
I am on page "http://todomvc.com/examples/angularjs/#/" (1191ms) Given I already have some todos I wait for text "some text" (5005ms)
################[ Failure ]################
Text "some text" was not found on page after 5 sec page.waitForFunction: Timeout 5000ms exceeded. 2345 | } 2346 | } else { 2347 | waiter = contextObject.waitForFunction(text => document.body && document.body.innerText.indexOf(text) > -1, text, { timeout: waitTimeout }); 2348 | } 2349 | return waiter.catch((err) => {
2350 | throw new Error(
Text "${text}" was not found on page after ${waitTimeout / 1000} sec\n${err.message}
); 2351 | }); 2352 | } 2353 | 2354 | /* 2355 | Waits for a network request.
β« Status | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 32 π΄ 12 failed, π’ passed, 9 π‘ 0 skipped |
π Duration | 61304ms |
Expected "Todo with umlauts " but got "Todo with umlauts "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1142ms) I refresh page (608ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (32ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with umlauts Àâü" I fill field ".new-todo", "Todo with umlauts Àâü" (321ms) I press key "Enter" (41ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with umlauts Àâü" I grab text from ".todo-list li" (11ms)
################[ Failure ]################
Expected "Todo with umlauts Àâü" but got "
Todo with umlauts Àâü
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1144ms) I refresh page (621ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (5ms) I wait for visible ".new-todo" (65ms) When I enter {Todo Text} TodosPage: enterTodo "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I fill field ".new-todo", "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" (2049ms) I press key "Enter" (39ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I grab text from ".todo-list li" (13ms)
################[ Failure ]################
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "
Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "Todo with html code " but got "Todo with html code "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1133ms) I refresh page (639ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (46ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with html code <script>alert("hello")</script>" I fill field ".new-todo", "Todo with html code <script>alert("hello")</script>" (788ms) I press key "Enter" (47ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with html code <script>alert("hello")</script>" I grab text from ".todo-list li" (13ms)
################[ Failure ]################
Expected "Todo with html code " but got "
Todo with html code <script>alert("hello")</script>
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "Todo with lots of whitespace around" but got "Todo with lots of whitespace around"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1131ms) I refresh page (642ms) I execute script () => sessionStorage.clear() (6ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (37ms) Given I have an empty todo list When I enter a todo with whitespace around the text TodosPage: enterTodo " Todo with lots of whitespace around " I fill field ".new-todo", " Todo with lots of whitespace around " (769ms) I press key "Enter" (25ms) Then I see the trimmed text of the todo in the list TodosPage: seeNthTodoEquals 1, "Todo with lots of whitespace around" I grab text from ".todo-list li" (9ms)
################[ Failure ]################
Expected "Todo with lots of whitespace around" but got "
Todo with lots of whitespace around
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "first" but got "first"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1097ms) I refresh page (634ms) I execute script () => sessionStorage.clear() (7ms) I execute script () => console.error('Boom!') (5ms) I wait for visible ".new-todo" (40ms) Given I added some todos TodosPage: enterTodo "last" I fill field ".new-todo", "first" (99ms) I press key "Enter" (27ms) I fill field ".new-todo", "second" (101ms) I press key "Enter" (7ms) I fill field ".new-todo", "last" (75ms) I press key "Enter" (7ms) When I look at my todo list Then I see the todos in the order in which I added them TodosPage: seeNthTodoEquals 1, "first" I grab text from ".todo-list li" (9ms)
################[ Failure ]################
Expected "first" but got "
first
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
I.createUserAndLogIn is not a function
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1210ms) I refresh page (647ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (36ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (72ms) I press key "Enter" (30ms) I fill field ".new-todo", "bar" (68ms) I press key "Enter" (8ms) I fill field ".new-todo", "baz" (52ms) I press key "Enter" (6ms)
################[ Failure ]################
I.createUserAndLogIn is not a function 7 | TodosPage.enterTodo('bar') 8 | TodosPage.enterTodo('baz') 9 |}) 10 | 11 |Scenario('Unapproved user cant chat with unapproved user', async ({I}) => {
12 | I.createUserAndLogIn(); 13 | const username = globalConf.users.getCurrentUser().username; 14 | await I.getUserId(username); 15 | 16 | I.logOut(); 17 |
at Test.
---
- π΄ **Edited todo is saved on blur**
> Expected "boom" but got "boom"
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1099ms)
I refresh page (661ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (2ms)
I wait for visible ".new-todo" (37ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (73ms)
I press key "Enter" (35ms)
I fill field ".new-todo", "bar" (70ms)
I press key "Enter" (9ms)
I fill field ".new-todo", "baz" (70ms)
I press key "Enter" (11ms)
Given I have some todos
When I edit the first todo
TodosPage: editNthTodo 1, "boom"
I double click 1 todo item (92ms)
I fill field 1nth todo input, "boom" (89ms)
I press key "Enter" (5ms)
Then I see that the todo text has been changed
TodosPage: seeNthTodoEquals 1, "boom"
I grab text from ".todo-list li" (8ms)
################[ Failure ]################
Expected "boom" but got "
boom
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/edit-todos_test.js:32:5)
Cannot read property 'page' of undefined
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1175ms) I refresh page (620ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (45ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (80ms) I press key "Enter" (47ms) I fill field ".new-todo", "bar" (74ms) I press key "Enter" (8ms) I fill field ".new-todo", "baz" (75ms) I press key "Enter" (9ms) Given I have some todos When I delete the first todo TodosPage: deleteNthTodo 1 I hover ".todo-list li:nth-child(1)" (1ms)
################[ Failure ]################
Cannot read property 'page' of undefined 70 | I.pressKey('Enter') 71 | }, 72 | 73 | deleteNthTodo(nthTodo) { 74 | // Use a custom helper function to hover over an todo item
75 | I.hover(
.todo-list li:nth-child(${nthTodo})
) 76 | I.click(nthTTodoDeleteButton(nthTodo)) 77 | }, 78 | 79 | refresh() { 80 | I.refreshPage()
at Object.deleteNthTodo (./todomvc-tests/pages/todos.page.js:75:11)
---
- π΄ **Mark all todos as completed**
> page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1157ms)
I refresh page (637ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (7ms)
I wait for visible ".new-todo" (38ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (62ms)
I press key "Enter" (37ms)
I fill field ".new-todo", "bar" (76ms)
I press key "Enter" (15ms)
I fill field ".new-todo", "baz" (71ms)
I press key "Enter" (9ms)
Given I have some todos
When I mark them all as completed
TodosPage: markAllAsCompleted
I click "label[for="toggle-all"" (29ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed')
44 | I.click(nthTodoCheckbox(nthTodo))
45 | },
46 |
47 | markAllAsCompleted() {
> 48 | I.click('label[for="toggle-all"')
49 | },
50 |
51 | clearCompleted() {
52 | I.click('button.clear-completed')
53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1176ms) I refresh page (649ms) I execute script () => sessionStorage.clear() (6ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (43ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (66ms) I press key "Enter" (47ms) I fill field ".new-todo", "bar" (67ms) I press key "Enter" (9ms) I fill field ".new-todo", "baz" (73ms) I press key "Enter" (9ms) Given I have some completed todos TodosPage: markAllAsCompleted I click "label[for="toggle-all"" (37ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all"" 43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed') 44 | I.click(nthTodoCheckbox(nthTodo)) 45 | }, 46 | 47 | markAllAsCompleted() {
48 | I.click('label[for="toggle-all"') 49 | }, 50 | 51 | clearCompleted() { 52 | I.click('button.clear-completed') 53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
---
- π΄ **Todos survive a page refresh @step-06**
> Expected "foo" but got "foo"
```diff
Given I have some todos
I clear cookie (2ms)
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1190ms)
I refresh page (650ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (4ms)
I wait for visible ".new-todo" (45ms)
TodosPage: enterTodos [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}]
I execute script (todoItems) => {
localStorage.setItem('todos-angularjs', JSON.stringify(todoItems));
}, [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}] (9ms)
TodosPage: refresh
I refresh page (688ms)
I save screenshot "initial-todos.png" (160ms)
And I marked the first as completed
TodosPage: markNthAsCompleted 1
I grab attribute from 1 todo item, "class" (26ms)
I click {xpath: .//div/input[ancestor::*[contains(concat(' ', normalize-space(./@class), ' '), ' todo-list ')]//li[count(preceding-sibling::*) = 0]]} (55ms)
When I refresh the page
TodosPage: refresh
I refresh page (637ms)
Then I still see the same todos
TodosPage: seeNumberOfTodos 4
I see number of visible elements ".todo-list li", 4 (49ms)
TodosPage: seeNthTodoEquals 1, "foo"
I grab text from ".todo-list li" (10ms)
################[ Failure ]################
Expected "foo" but got "
foo
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/persist-todos_test.js:27:3)
Text "some text" was not found on page after 5 secpage.waitForFunction: Timeout 5000ms exceeded.
I am on page "http://todomvc.com/examples/angularjs/#/" (1208ms) Given I already have some todos I wait for text "some text" (5005ms)
################[ Failure ]################
Text "some text" was not found on page after 5 sec page.waitForFunction: Timeout 5000ms exceeded. 2345 | } 2346 | } else { 2347 | waiter = contextObject.waitForFunction(text => document.body && document.body.innerText.indexOf(text) > -1, text, { timeout: waitTimeout }); 2348 | } 2349 | return waiter.catch((err) => {
2350 | throw new Error(
Text "${text}" was not found on page after ${waitTimeout / 1000} sec\n${err.message}
); 2351 | }); 2352 | } 2353 | 2354 | /* 2355 | Waits for a network request.
β« Status | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 1 π΄ 1 failed, π’ passed, 0 π‘ 0 skipped |
π Duration | 7083ms |
Text "some text" was not found on page after 5 secpage.waitForFunction: Timeout 5000ms exceeded.
I am on page "http://todomvc.com/examples/angularjs/#/" (1349ms) Given I already have some todos I wait for text "some text" (5007ms)
################[ Failure ]################
Text "some text" was not found on page after 5 sec page.waitForFunction: Timeout 5000ms exceeded. 2345 | } 2346 | } else { 2347 | waiter = contextObject.waitForFunction(text => document.body && document.body.innerText.indexOf(text) > -1, text, { timeout: waitTimeout }); 2348 | } 2349 | return waiter.catch((err) => {
2350 | throw new Error(
Text "${text}" was not found on page after ${waitTimeout / 1000} sec\n${err.message}
); 2351 | }); 2352 | } 2353 | 2354 | /* 2355 | Waits for a network request.
β« Status | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 32 π΄ 12 failed, π’ passed, 9 π‘ 0 skipped |
π Duration | 61712ms |
Expected "Todo with umlauts " but got "Todo with umlauts "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1191ms) I refresh page (610ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (46ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with umlauts Àâü" I fill field ".new-todo", "Todo with umlauts Àâü" (341ms) I press key "Enter" (44ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with umlauts Àâü" I grab text from ".todo-list li" (9ms)
################[ Failure ]################
Expected "Todo with umlauts Àâü" but got "
Todo with umlauts Àâü
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1217ms) I refresh page (649ms) I execute script () => sessionStorage.clear() (7ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (44ms) When I enter {Todo Text} TodosPage: enterTodo "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I fill field ".new-todo", "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" (2134ms) I press key "Enter" (47ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I grab text from ".todo-list li" (14ms)
################[ Failure ]################
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "
Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "Todo with html code " but got "Todo with html code "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1167ms) I refresh page (657ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (45ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with html code <script>alert("hello")</script>" I fill field ".new-todo", "Todo with html code <script>alert("hello")</script>" (799ms) I press key "Enter" (46ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with html code <script>alert("hello")</script>" I grab text from ".todo-list li" (13ms)
################[ Failure ]################
Expected "Todo with html code " but got "
Todo with html code <script>alert("hello")</script>
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "Todo with lots of whitespace around" but got "Todo with lots of whitespace around"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1144ms) I refresh page (665ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (31ms) Given I have an empty todo list When I enter a todo with whitespace around the text TodosPage: enterTodo " Todo with lots of whitespace around " I fill field ".new-todo", " Todo with lots of whitespace around " (758ms) I press key "Enter" (46ms) Then I see the trimmed text of the todo in the list TodosPage: seeNthTodoEquals 1, "Todo with lots of whitespace around" I grab text from ".todo-list li" (12ms)
################[ Failure ]################
Expected "Todo with lots of whitespace around" but got "
Todo with lots of whitespace around
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "first" but got "first"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1254ms) I refresh page (661ms) I execute script () => sessionStorage.clear() (7ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (36ms) Given I added some todos TodosPage: enterTodo "last" I fill field ".new-todo", "first" (100ms) I press key "Enter" (47ms) I fill field ".new-todo", "second" (116ms) I press key "Enter" (6ms) I fill field ".new-todo", "last" (79ms) I press key "Enter" (5ms) When I look at my todo list Then I see the todos in the order in which I added them TodosPage: seeNthTodoEquals 1, "first" I grab text from ".todo-list li" (10ms)
################[ Failure ]################
Expected "first" but got "
first
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
I.createUserAndLogIn is not a function
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1226ms) I refresh page (648ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (41ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (66ms) I press key "Enter" (29ms) I fill field ".new-todo", "bar" (59ms) I press key "Enter" (9ms) I fill field ".new-todo", "baz" (71ms) I press key "Enter" (8ms)
################[ Failure ]################
I.createUserAndLogIn is not a function 7 | TodosPage.enterTodo('bar') 8 | TodosPage.enterTodo('baz') 9 |}) 10 | 11 |Scenario('Unapproved user cant chat with unapproved user', async ({I}) => {
12 | I.createUserAndLogIn(); 13 | const username = globalConf.users.getCurrentUser().username; 14 | await I.getUserId(username); 15 | 16 | I.logOut(); 17 |
at Test.
---
- π΄ **Edited todo is saved on blur**
> Expected "boom" but got "boom"
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1208ms)
I refresh page (654ms)
I execute script () => sessionStorage.clear() (4ms)
I execute script () => console.error('Boom!') (2ms)
I wait for visible ".new-todo" (35ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (70ms)
I press key "Enter" (31ms)
I fill field ".new-todo", "bar" (61ms)
I press key "Enter" (7ms)
I fill field ".new-todo", "baz" (66ms)
I press key "Enter" (8ms)
Given I have some todos
When I edit the first todo
TodosPage: editNthTodo 1, "boom"
I double click 1 todo item (81ms)
I fill field 1nth todo input, "boom" (90ms)
I press key "Enter" (6ms)
Then I see that the todo text has been changed
TodosPage: seeNthTodoEquals 1, "boom"
I grab text from ".todo-list li" (13ms)
################[ Failure ]################
Expected "boom" but got "
boom
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/edit-todos_test.js:32:5)
Cannot read property 'page' of undefined
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1146ms) I refresh page (637ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (35ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (70ms) I press key "Enter" (39ms) I fill field ".new-todo", "bar" (72ms) I press key "Enter" (12ms) I fill field ".new-todo", "baz" (69ms) I press key "Enter" (5ms) Given I have some todos When I delete the first todo TodosPage: deleteNthTodo 1 I hover ".todo-list li:nth-child(1)" (1ms)
################[ Failure ]################
Cannot read property 'page' of undefined 70 | I.pressKey('Enter') 71 | }, 72 | 73 | deleteNthTodo(nthTodo) { 74 | // Use a custom helper function to hover over an todo item
75 | I.hover(
.todo-list li:nth-child(${nthTodo})
) 76 | I.click(nthTTodoDeleteButton(nthTodo)) 77 | }, 78 | 79 | refresh() { 80 | I.refreshPage()
at Object.deleteNthTodo (./todomvc-tests/pages/todos.page.js:75:11)
---
- π΄ **Mark all todos as completed**
> page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1188ms)
I refresh page (659ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (6ms)
I wait for visible ".new-todo" (42ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (68ms)
I press key "Enter" (29ms)
I fill field ".new-todo", "bar" (75ms)
I press key "Enter" (11ms)
I fill field ".new-todo", "baz" (74ms)
I press key "Enter" (8ms)
Given I have some todos
When I mark them all as completed
TodosPage: markAllAsCompleted
I click "label[for="toggle-all"" (31ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed')
44 | I.click(nthTodoCheckbox(nthTodo))
45 | },
46 |
47 | markAllAsCompleted() {
> 48 | I.click('label[for="toggle-all"')
49 | },
50 |
51 | clearCompleted() {
52 | I.click('button.clear-completed')
53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1258ms) I refresh page (672ms) I execute script () => sessionStorage.clear() (6ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (38ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (65ms) I press key "Enter" (50ms) I fill field ".new-todo", "bar" (73ms) I press key "Enter" (13ms) I fill field ".new-todo", "baz" (69ms) I press key "Enter" (7ms) Given I have some completed todos TodosPage: markAllAsCompleted I click "label[for="toggle-all"" (16ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all"" 43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed') 44 | I.click(nthTodoCheckbox(nthTodo)) 45 | }, 46 | 47 | markAllAsCompleted() {
48 | I.click('label[for="toggle-all"') 49 | }, 50 | 51 | clearCompleted() { 52 | I.click('button.clear-completed') 53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
---
- π΄ **Todos survive a page refresh @step-06**
> Expected "foo" but got "foo"
```diff
Given I have some todos
I clear cookie (1ms)
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1106ms)
I refresh page (631ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (6ms)
I wait for visible ".new-todo" (45ms)
TodosPage: enterTodos [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}]
I execute script (todoItems) => {
localStorage.setItem('todos-angularjs', JSON.stringify(todoItems));
}, [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}] (5ms)
TodosPage: refresh
I refresh page (668ms)
I save screenshot "initial-todos.png" (117ms)
And I marked the first as completed
TodosPage: markNthAsCompleted 1
I grab attribute from 1 todo item, "class" (24ms)
I click {xpath: .//div/input[ancestor::*[contains(concat(' ', normalize-space(./@class), ' '), ' todo-list ')]//li[count(preceding-sibling::*) = 0]]} (81ms)
When I refresh the page
TodosPage: refresh
I refresh page (639ms)
Then I still see the same todos
TodosPage: seeNumberOfTodos 4
I see number of visible elements ".todo-list li", 4 (41ms)
TodosPage: seeNthTodoEquals 1, "foo"
I grab text from ".todo-list li" (8ms)
################[ Failure ]################
Expected "foo" but got "
foo
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/persist-todos_test.js:27:3)
Text "some text" was not found on page after 5 secpage.waitForFunction: Timeout 5000ms exceeded.
I am on page "http://todomvc.com/examples/angularjs/#/" (1127ms) Given I already have some todos I wait for text "some text" (5004ms)
################[ Failure ]################
Text "some text" was not found on page after 5 sec page.waitForFunction: Timeout 5000ms exceeded. 2345 | } 2346 | } else { 2347 | waiter = contextObject.waitForFunction(text => document.body && document.body.innerText.indexOf(text) > -1, text, { timeout: waitTimeout }); 2348 | } 2349 | return waiter.catch((err) => {
2350 | throw new Error(
Text "${text}" was not found on page after ${waitTimeout / 1000} sec\n${err.message}
); 2351 | }); 2352 | } 2353 | 2354 | /* 2355 | Waits for a network request.
β« Status | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 1 π΄ 1 failed, π’ passed, 0 π‘ 0 skipped |
π Duration | 6918ms |
Text "some text" was not found on page after 5 secpage.waitForFunction: Timeout 5000ms exceeded.
I am on page "http://todomvc.com/examples/angularjs/#/" (1224ms) Given I already have some todos I wait for text "some text" (5009ms)
################[ Failure ]################
Text "some text" was not found on page after 5 sec page.waitForFunction: Timeout 5000ms exceeded. 2345 | } 2346 | } else { 2347 | waiter = contextObject.waitForFunction(text => document.body && document.body.innerText.indexOf(text) > -1, text, { timeout: waitTimeout }); 2348 | } 2349 | return waiter.catch((err) => {
2350 | throw new Error(
Text "${text}" was not found on page after ${waitTimeout / 1000} sec\n${err.message}
); 2351 | }); 2352 | } 2353 | 2354 | /* 2355 | Waits for a network request.
β« Status | π’ PASSED π’ |
---|---|
βοΈ Tests | 0 tests executed |
ποΈ Summary | π΄ 0 failed; π’ 0 passed, π‘ 0 skipped |
π Duration | 124ms |
β« Status | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 1 tests executed |
ποΈ Summary | π΄ 1 failed; π’ 0 passed, π‘ 0 skipped |
π Duration | 6803ms |
Text "some text" was not found on page after 5 secpage.waitForFunction: Timeout 5000ms exceeded.
I am on page "http://todomvc.com/examples/angularjs/#/" (1141ms) Given I already have some todos I wait for text "some text" (5005ms)
################[ Failure ]################
Text "some text" was not found on page after 5 sec page.waitForFunction: Timeout 5000ms exceeded. 2345 | } 2346 | } else { 2347 | waiter = contextObject.waitForFunction(text => document.body && document.body.innerText.indexOf(text) > -1, text, { timeout: waitTimeout }); 2348 | } 2349 | return waiter.catch((err) => {
2350 | throw new Error(
Text "${text}" was not found on page after ${waitTimeout / 1000} sec\n${err.message}
); 2351 | }); 2352 | } 2353 | 2354 | /* 2355 | Waits for a network request.
Report | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 32 tests run |
ποΈ Summary | π΄ 12 failed; π’ 9 passed, π‘ 0 skipped |
π Duration | 61259ms |
[[object Object]]
Expected "Todo with umlauts " but got "Todo with umlauts "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1166ms) I refresh page (625ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (46ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with umlauts Àâü" I fill field ".new-todo", "Todo with umlauts Àâü" (330ms) I press key "Enter" (31ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with umlauts Àâü" I grab text from ".todo-list li" (11ms)
################[ Failure ]################
Expected "Todo with umlauts Àâü" but got "
Todo with umlauts Àâü
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
[[object Object]]
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1170ms) I refresh page (668ms) I execute script () => sessionStorage.clear() (6ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (48ms) When I enter {Todo Text} TodosPage: enterTodo "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I fill field ".new-todo", "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" (2165ms) I press key "Enter" (25ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I grab text from ".todo-list li" (9ms)
################[ Failure ]################
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "
Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
[[object Object]]
Expected "Todo with html code " but got "Todo with html code "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1149ms) I refresh page (646ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (40ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with html code <script>alert("hello")</script>" I fill field ".new-todo", "Todo with html code <script>alert("hello")</script>" (766ms) I press key "Enter" (50ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with html code <script>alert("hello")</script>" I grab text from ".todo-list li" (12ms)
################[ Failure ]################
Expected "Todo with html code " but got "
Todo with html code <script>alert("hello")</script>
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "Todo with lots of whitespace around" but got "Todo with lots of whitespace around"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1179ms) I refresh page (634ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (37ms) Given I have an empty todo list When I enter a todo with whitespace around the text TodosPage: enterTodo " Todo with lots of whitespace around " I fill field ".new-todo", " Todo with lots of whitespace around " (758ms) I press key "Enter" (44ms) Then I see the trimmed text of the todo in the list TodosPage: seeNthTodoEquals 1, "Todo with lots of whitespace around" I grab text from ".todo-list li" (13ms)
################[ Failure ]################
Expected "Todo with lots of whitespace around" but got "
Todo with lots of whitespace around
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "first" but got "first"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1122ms) I refresh page (626ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (44ms) Given I added some todos TodosPage: enterTodo "last" I fill field ".new-todo", "first" (103ms) I press key "Enter" (47ms) I fill field ".new-todo", "second" (120ms) I press key "Enter" (11ms) I fill field ".new-todo", "last" (81ms) I press key "Enter" (9ms) When I look at my todo list Then I see the todos in the order in which I added them TodosPage: seeNthTodoEquals 1, "first" I grab text from ".todo-list li" (14ms)
################[ Failure ]################
Expected "first" but got "
first
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
I.createUserAndLogIn is not a function
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1157ms) I refresh page (623ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (39ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (75ms) I press key "Enter" (23ms) I fill field ".new-todo", "bar" (60ms) I press key "Enter" (7ms) I fill field ".new-todo", "baz" (62ms) I press key "Enter" (6ms)
################[ Failure ]################
I.createUserAndLogIn is not a function 7 | TodosPage.enterTodo('bar') 8 | TodosPage.enterTodo('baz') 9 |}) 10 | 11 |Scenario('Unapproved user cant chat with unapproved user', async ({I}) => {
12 | I.createUserAndLogIn(); 13 | const username = globalConf.users.getCurrentUser().username; 14 | await I.getUserId(username); 15 | 16 | I.logOut(); 17 |
at Test.
---
- π΄ Edit/Delete Todos @step-06 **Edited todo is saved on blur** (284ms)
> Expected "boom" but got "boom"
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1158ms)
I refresh page (644ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (4ms)
I wait for visible ".new-todo" (49ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (81ms)
I press key "Enter" (46ms)
I fill field ".new-todo", "bar" (73ms)
I press key "Enter" (10ms)
I fill field ".new-todo", "baz" (75ms)
I press key "Enter" (6ms)
Given I have some todos
When I edit the first todo
TodosPage: editNthTodo 1, "boom"
I double click 1 todo item (77ms)
I fill field 1nth todo input, "boom" (89ms)
I press key "Enter" (7ms)
Then I see that the todo text has been changed
TodosPage: seeNthTodoEquals 1, "boom"
I grab text from ".todo-list li" (13ms)
################[ Failure ]################
Expected "boom" but got "
boom
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/edit-todos_test.js:32:5)
Cannot read property 'page' of undefined
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1164ms) I refresh page (675ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (41ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (70ms) I press key "Enter" (39ms) I fill field ".new-todo", "bar" (76ms) I press key "Enter" (11ms) I fill field ".new-todo", "baz" (71ms) I press key "Enter" (7ms) Given I have some todos When I delete the first todo TodosPage: deleteNthTodo 1 I hover ".todo-list li:nth-child(1)"0
################[ Failure ]################
Cannot read property 'page' of undefined 70 | I.pressKey('Enter') 71 | }, 72 | 73 | deleteNthTodo(nthTodo) { 74 | // Use a custom helper function to hover over an todo item
75 | I.hover(
.todo-list li:nth-child(${nthTodo})
) 76 | I.click(nthTTodoDeleteButton(nthTodo)) 77 | }, 78 | 79 | refresh() { 80 | I.refreshPage()
at Object.deleteNthTodo (./todomvc-tests/pages/todos.page.js:75:11)
---
- π΄ Mark as completed/not completed @step-06 **Mark all todos as completed** (162ms)
> page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1174ms)
I refresh page (653ms)
I execute script () => sessionStorage.clear() (6ms)
I execute script () => console.error('Boom!') (8ms)
I wait for visible ".new-todo" (28ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (68ms)
I press key "Enter" (44ms)
I fill field ".new-todo", "bar" (70ms)
I press key "Enter" (10ms)
I fill field ".new-todo", "baz" (71ms)
I press key "Enter" (6ms)
Given I have some todos
When I mark them all as completed
TodosPage: markAllAsCompleted
I click "label[for="toggle-all"" (17ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed')
44 | I.click(nthTodoCheckbox(nthTodo))
45 | },
46 |
47 | markAllAsCompleted() {
> 48 | I.click('label[for="toggle-all"')
49 | },
50 |
51 | clearCompleted() {
52 | I.click('button.clear-completed')
53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1139ms) I refresh page (673ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (2ms) I wait for visible ".new-todo" (39ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (76ms) I press key "Enter" (38ms) I fill field ".new-todo", "bar" (54ms) I press key "Enter" (10ms) I fill field ".new-todo", "baz" (63ms) I press key "Enter" (7ms) Given I have some completed todos TodosPage: markAllAsCompleted I click "label[for="toggle-all"" (24ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all"" 43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed') 44 | I.click(nthTodoCheckbox(nthTodo)) 45 | }, 46 | 47 | markAllAsCompleted() {
48 | I.click('label[for="toggle-all"') 49 | }, 50 | 51 | clearCompleted() { 52 | I.click('button.clear-completed') 53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
---
- π΄ Persist Todos **Todos survive a page refresh @step-06** (917ms)
> Expected "foo" but got "foo"
```diff
Given I have some todos
I clear cookie (2ms)
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1177ms)
I refresh page (647ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (6ms)
I wait for visible ".new-todo" (43ms)
TodosPage: enterTodos [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}]
I execute script (todoItems) => {
localStorage.setItem('todos-angularjs', JSON.stringify(todoItems));
}, [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}] (9ms)
TodosPage: refresh
I refresh page (669ms)
I save screenshot "initial-todos.png" (156ms)
And I marked the first as completed
TodosPage: markNthAsCompleted 1
I grab attribute from 1 todo item, "class" (24ms)
I click {xpath: .//div/input[ancestor::*[contains(concat(' ', normalize-space(./@class), ' '), ' todo-list ')]//li[count(preceding-sibling::*) = 0]]} (61ms)
When I refresh the page
TodosPage: refresh
I refresh page (621ms)
Then I still see the same todos
TodosPage: seeNumberOfTodos 4
I see number of visible elements ".todo-list li", 4 (43ms)
TodosPage: seeNthTodoEquals 1, "foo"
I grab text from ".todo-list li" (9ms)
################[ Failure ]################
Expected "foo" but got "
foo
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/persist-todos_test.js:27:3)
Text "some text" was not found on page after 5 secpage.waitForFunction: Timeout 5000ms exceeded.
I am on page "http://todomvc.com/examples/angularjs/#/" (1147ms) Given I already have some todos I wait for text "some text" (5006ms)
################[ Failure ]################
Text "some text" was not found on page after 5 sec page.waitForFunction: Timeout 5000ms exceeded. 2345 | } 2346 | } else { 2347 | waiter = contextObject.waitForFunction(text => document.body && document.body.innerText.indexOf(text) > -1, text, { timeout: waitTimeout }); 2348 | } 2349 | return waiter.catch((err) => {
2350 | throw new Error(
Text "${text}" was not found on page after ${waitTimeout / 1000} sec\n${err.message}
); 2351 | }); 2352 | } 2353 | 2354 | /* 2355 | Waits for a network request.
Report | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 32 tests run |
ποΈ Summary | π΄ 12 failed; π’ 9 passed, π‘ 0 skipped |
π Duration | 60863ms |
[[object Object]]
Expected "Todo with umlauts " but got "Todo with umlauts "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1154ms) I refresh page (650ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (31ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with umlauts Àâü" I fill field ".new-todo", "Todo with umlauts Àâü" (331ms) I press key "Enter" (49ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with umlauts Àâü" I grab text from ".todo-list li" (13ms)
################[ Failure ]################
Expected "Todo with umlauts Àâü" but got "
Todo with umlauts Àâü
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
[[object Object]]
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1049ms) I refresh page (636ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (45ms) When I enter {Todo Text} TodosPage: enterTodo "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I fill field ".new-todo", "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" (2139ms) I press key "Enter" (48ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I grab text from ".todo-list li" (13ms)
################[ Failure ]################
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "
Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
[[object Object]]
Expected "Todo with html code " but got "Todo with html code "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1203ms) I refresh page (657ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (44ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with html code <script>alert("hello")</script>" I fill field ".new-todo", "Todo with html code <script>alert("hello")</script>" (779ms) I press key "Enter" (46ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with html code <script>alert("hello")</script>" I grab text from ".todo-list li" (17ms)
################[ Failure ]################
Expected "Todo with html code " but got "
Todo with html code <script>alert("hello")</script>
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "Todo with lots of whitespace around" but got "Todo with lots of whitespace around"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1204ms) I refresh page (655ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (2ms) I wait for visible ".new-todo" (21ms) Given I have an empty todo list When I enter a todo with whitespace around the text TodosPage: enterTodo " Todo with lots of whitespace around " I fill field ".new-todo", " Todo with lots of whitespace around " (733ms) I press key "Enter" (36ms) Then I see the trimmed text of the todo in the list TodosPage: seeNthTodoEquals 1, "Todo with lots of whitespace around" I grab text from ".todo-list li" (9ms)
################[ Failure ]################
Expected "Todo with lots of whitespace around" but got "
Todo with lots of whitespace around
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "first" but got "first"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1109ms) I refresh page (659ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (43ms) Given I added some todos TodosPage: enterTodo "last" I fill field ".new-todo", "first" (106ms) I press key "Enter" (47ms) I fill field ".new-todo", "second" (124ms) I press key "Enter" (11ms) I fill field ".new-todo", "last" (82ms) I press key "Enter" (8ms) When I look at my todo list Then I see the todos in the order in which I added them TodosPage: seeNthTodoEquals 1, "first" I grab text from ".todo-list li" (12ms)
################[ Failure ]################
Expected "first" but got "
first
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
I.createUserAndLogIn is not a function
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1131ms) I refresh page (655ms) I execute script () => sessionStorage.clear() (6ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (52ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (76ms) I press key "Enter" (30ms) I fill field ".new-todo", "bar" (61ms) I press key "Enter" (10ms) I fill field ".new-todo", "baz" (70ms) I press key "Enter" (9ms)
################[ Failure ]################
I.createUserAndLogIn is not a function 7 | TodosPage.enterTodo('bar') 8 | TodosPage.enterTodo('baz') 9 |}) 10 | 11 |Scenario('Unapproved user cant chat with unapproved user', async ({I}) => {
12 | I.createUserAndLogIn(); 13 | const username = globalConf.users.getCurrentUser().username; 14 | await I.getUserId(username); 15 | 16 | I.logOut(); 17 |
at Test.
---
- π΄ Edit/Delete Todos @step-06 **Edited todo is saved on blur** (299ms)
> Expected "boom" but got "boom"
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1184ms)
I refresh page (626ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (4ms)
I wait for visible ".new-todo" (40ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (65ms)
I press key "Enter" (36ms)
I fill field ".new-todo", "bar" (62ms)
I press key "Enter" (8ms)
I fill field ".new-todo", "baz" (63ms)
I press key "Enter" (8ms)
Given I have some todos
When I edit the first todo
TodosPage: editNthTodo 1, "boom"
I double click 1 todo item (74ms)
I fill field 1nth todo input, "boom" (97ms)
I press key "Enter" (6ms)
Then I see that the todo text has been changed
TodosPage: seeNthTodoEquals 1, "boom"
I grab text from ".todo-list li" (10ms)
################[ Failure ]################
Expected "boom" but got "
boom
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/edit-todos_test.js:32:5)
Cannot read property 'page' of undefined
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1164ms) I refresh page (661ms) I execute script () => sessionStorage.clear() (6ms) I execute script () => console.error('Boom!') (8ms) I wait for visible ".new-todo" (38ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (71ms) I press key "Enter" (47ms) I fill field ".new-todo", "bar" (77ms) I press key "Enter" (11ms) I fill field ".new-todo", "baz" (72ms) I press key "Enter" (8ms) Given I have some todos When I delete the first todo TodosPage: deleteNthTodo 1 I hover ".todo-list li:nth-child(1)" (1ms)
################[ Failure ]################
Cannot read property 'page' of undefined 70 | I.pressKey('Enter') 71 | }, 72 | 73 | deleteNthTodo(nthTodo) { 74 | // Use a custom helper function to hover over an todo item
75 | I.hover(
.todo-list li:nth-child(${nthTodo})
) 76 | I.click(nthTTodoDeleteButton(nthTodo)) 77 | }, 78 | 79 | refresh() { 80 | I.refreshPage()
at Object.deleteNthTodo (./todomvc-tests/pages/todos.page.js:75:11)
---
- π΄ Mark as completed/not completed @step-06 **Mark all todos as completed** (123ms)
> page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1145ms)
I refresh page (652ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (7ms)
I wait for visible ".new-todo" (27ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (71ms)
I press key "Enter" (48ms)
I fill field ".new-todo", "bar" (70ms)
I press key "Enter" (11ms)
I fill field ".new-todo", "baz" (71ms)
I press key "Enter" (9ms)
Given I have some todos
When I mark them all as completed
TodosPage: markAllAsCompleted
I click "label[for="toggle-all"" (25ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed')
44 | I.click(nthTodoCheckbox(nthTodo))
45 | },
46 |
47 | markAllAsCompleted() {
> 48 | I.click('label[for="toggle-all"')
49 | },
50 |
51 | clearCompleted() {
52 | I.click('button.clear-completed')
53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1195ms) I refresh page (658ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (11ms) I wait for visible ".new-todo" (48ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (82ms) I press key "Enter" (46ms) I fill field ".new-todo", "bar" (71ms) I press key "Enter" (10ms) I fill field ".new-todo", "baz" (74ms) I press key "Enter" (7ms) Given I have some completed todos TodosPage: markAllAsCompleted I click "label[for="toggle-all"" (26ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all"" 43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed') 44 | I.click(nthTodoCheckbox(nthTodo)) 45 | }, 46 | 47 | markAllAsCompleted() {
48 | I.click('label[for="toggle-all"') 49 | }, 50 | 51 | clearCompleted() { 52 | I.click('button.clear-completed') 53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
---
- π΄ Persist Todos **Todos survive a page refresh @step-06** (974ms)
> Expected "foo" but got "foo"
```diff
Given I have some todos
I clear cookie (2ms)
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1204ms)
I refresh page (639ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (6ms)
I wait for visible ".new-todo" (40ms)
TodosPage: enterTodos [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}]
I execute script (todoItems) => {
localStorage.setItem('todos-angularjs', JSON.stringify(todoItems));
}, [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}] (6ms)
TodosPage: refresh
I refresh page (673ms)
I save screenshot "initial-todos.png" (164ms)
And I marked the first as completed
TodosPage: markNthAsCompleted 1
I grab attribute from 1 todo item, "class" (27ms)
I click {xpath: .//div/input[ancestor::*[contains(concat(' ', normalize-space(./@class), ' '), ' todo-list ')]//li[count(preceding-sibling::*) = 0]]} (95ms)
When I refresh the page
TodosPage: refresh
I refresh page (647ms)
Then I still see the same todos
TodosPage: seeNumberOfTodos 4
I see number of visible elements ".todo-list li", 4 (46ms)
TodosPage: seeNthTodoEquals 1, "foo"
I grab text from ".todo-list li" (8ms)
################[ Failure ]################
Expected "foo" but got "
foo
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/persist-todos_test.js:27:3)
Text "some text" was not found on page after 5 secpage.waitForFunction: Timeout 5000ms exceeded.
I am on page "http://todomvc.com/examples/angularjs/#/" (1167ms) Given I already have some todos I wait for text "some text" (5005ms)
################[ Failure ]################
Text "some text" was not found on page after 5 sec page.waitForFunction: Timeout 5000ms exceeded. 2345 | } 2346 | } else { 2347 | waiter = contextObject.waitForFunction(text => document.body && document.body.innerText.indexOf(text) > -1, text, { timeout: waitTimeout }); 2348 | } 2349 | return waiter.catch((err) => {
2350 | throw new Error(
Text "${text}" was not found on page after ${waitTimeout / 1000} sec\n${err.message}
); 2351 | }); 2352 | } 2353 | 2354 | /* 2355 | Waits for a network request.
Report | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 32 tests run |
ποΈ Summary | π΄ 12 failed; π’ 9 passed, π‘ 0 skipped |
π Duration | 61159ms |
[[object Object]]
Expected "Todo with umlauts " but got "Todo with umlauts "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1216ms) I refresh page (649ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (39ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with umlauts Àâü" I fill field ".new-todo", "Todo with umlauts Àâü" (324ms) I press key "Enter" (49ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with umlauts Àâü" I grab text from ".todo-list li" (16ms)
################[ Failure ]################
Expected "Todo with umlauts Àâü" but got "
Todo with umlauts Àâü
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
[[object Object]]
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1093ms) I refresh page (612ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (5ms) I wait for visible ".new-todo" (49ms) When I enter {Todo Text} TodosPage: enterTodo "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I fill field ".new-todo", "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" (2142ms) I press key "Enter" (45ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I grab text from ".todo-list li" (13ms)
################[ Failure ]################
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "
Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
[[object Object]]
Expected "Todo with html code " but got "Todo with html code "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1185ms) I refresh page (632ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (50ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with html code <script>alert("hello")</script>" I fill field ".new-todo", "Todo with html code <script>alert("hello")</script>" (778ms) I press key "Enter" (49ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with html code <script>alert("hello")</script>" I grab text from ".todo-list li" (14ms)
################[ Failure ]################
Expected "Todo with html code " but got "
Todo with html code <script>alert("hello")</script>
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "Todo with lots of whitespace around" but got "Todo with lots of whitespace around"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1112ms) I refresh page (638ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (40ms) Given I have an empty todo list When I enter a todo with whitespace around the text TodosPage: enterTodo " Todo with lots of whitespace around " I fill field ".new-todo", " Todo with lots of whitespace around " (747ms) I press key "Enter" (30ms) Then I see the trimmed text of the todo in the list TodosPage: seeNthTodoEquals 1, "Todo with lots of whitespace around" I grab text from ".todo-list li" (15ms)
################[ Failure ]################
Expected "Todo with lots of whitespace around" but got "
Todo with lots of whitespace around
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "first" but got "first"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1046ms) I refresh page (647ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (43ms) Given I added some todos TodosPage: enterTodo "last" I fill field ".new-todo", "first" (104ms) I press key "Enter" (45ms) I fill field ".new-todo", "second" (120ms) I press key "Enter" (10ms) I fill field ".new-todo", "last" (83ms) I press key "Enter" (5ms) When I look at my todo list Then I see the todos in the order in which I added them TodosPage: seeNthTodoEquals 1, "first" I grab text from ".todo-list li" (12ms)
################[ Failure ]################
Expected "first" but got "
first
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
I.createUserAndLogIn is not a function
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1105ms) I refresh page (645ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (2ms) I wait for visible ".new-todo" (37ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (64ms) I press key "Enter" (35ms) I fill field ".new-todo", "bar" (60ms) I press key "Enter" (10ms) I fill field ".new-todo", "baz" (66ms) I press key "Enter" (6ms)
################[ Failure ]################
I.createUserAndLogIn is not a function 7 | TodosPage.enterTodo('bar') 8 | TodosPage.enterTodo('baz') 9 |}) 10 | 11 |Scenario('Unapproved user cant chat with unapproved user', async ({I}) => {
12 | I.createUserAndLogIn(); 13 | const username = globalConf.users.getCurrentUser().username; 14 | await I.getUserId(username); 15 | 16 | I.logOut(); 17 |
at Test.
---
- π΄ Edit/Delete Todos @step-06 **Edited todo is saved on blur** (351ms)
> Expected "boom" but got "boom"
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1120ms)
I refresh page (635ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (3ms)
I wait for visible ".new-todo" (45ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (76ms)
I press key "Enter" (42ms)
I fill field ".new-todo", "bar" (74ms)
I press key "Enter" (11ms)
I fill field ".new-todo", "baz" (71ms)
I press key "Enter" (9ms)
Given I have some todos
When I edit the first todo
TodosPage: editNthTodo 1, "boom"
I double click 1 todo item (99ms)
I fill field 1nth todo input, "boom" (89ms)
I press key "Enter" (5ms)
Then I see that the todo text has been changed
TodosPage: seeNthTodoEquals 1, "boom"
I grab text from ".todo-list li" (11ms)
################[ Failure ]################
Expected "boom" but got "
boom
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/edit-todos_test.js:32:5)
Cannot read property 'page' of undefined
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1037ms) I refresh page (670ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (36ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (69ms) I press key "Enter" (46ms) I fill field ".new-todo", "bar" (70ms) I press key "Enter" (11ms) I fill field ".new-todo", "baz" (60ms) I press key "Enter" (7ms) Given I have some todos When I delete the first todo TodosPage: deleteNthTodo 1 I hover ".todo-list li:nth-child(1)"0
################[ Failure ]################
Cannot read property 'page' of undefined 70 | I.pressKey('Enter') 71 | }, 72 | 73 | deleteNthTodo(nthTodo) { 74 | // Use a custom helper function to hover over an todo item
75 | I.hover(
.todo-list li:nth-child(${nthTodo})
) 76 | I.click(nthTTodoDeleteButton(nthTodo)) 77 | }, 78 | 79 | refresh() { 80 | I.refreshPage()
at Object.deleteNthTodo (./todomvc-tests/pages/todos.page.js:75:11)
---
- π΄ Mark as completed/not completed @step-06 **Mark all todos as completed** (181ms)
> page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1155ms)
I refresh page (648ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (9ms)
I wait for visible ".new-todo" (40ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (78ms)
I press key "Enter" (41ms)
I fill field ".new-todo", "bar" (62ms)
I press key "Enter" (11ms)
I fill field ".new-todo", "baz" (73ms)
I press key "Enter" (8ms)
Given I have some todos
When I mark them all as completed
TodosPage: markAllAsCompleted
I click "label[for="toggle-all"" (32ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed')
44 | I.click(nthTodoCheckbox(nthTodo))
45 | },
46 |
47 | markAllAsCompleted() {
> 48 | I.click('label[for="toggle-all"')
49 | },
50 |
51 | clearCompleted() {
52 | I.click('button.clear-completed')
53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1191ms) I refresh page (645ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (42ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (77ms) I press key "Enter" (49ms) I fill field ".new-todo", "bar" (71ms) I press key "Enter" (10ms) I fill field ".new-todo", "baz" (63ms) I press key "Enter" (6ms) Given I have some completed todos TodosPage: markAllAsCompleted I click "label[for="toggle-all"" (18ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all"" 43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed') 44 | I.click(nthTodoCheckbox(nthTodo)) 45 | }, 46 | 47 | markAllAsCompleted() {
48 | I.click('label[for="toggle-all"') 49 | }, 50 | 51 | clearCompleted() { 52 | I.click('button.clear-completed') 53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
---
- π΄ Persist Todos **Todos survive a page refresh @step-06** (897ms)
> Expected "foo" but got "foo"
```diff
Given I have some todos
I clear cookie (1ms)
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1129ms)
I refresh page (641ms)
I execute script () => sessionStorage.clear() (7ms)
I execute script () => console.error('Boom!') (4ms)
I wait for visible ".new-todo" (38ms)
TodosPage: enterTodos [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}]
I execute script (todoItems) => {
localStorage.setItem('todos-angularjs', JSON.stringify(todoItems));
}, [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}] (7ms)
TodosPage: refresh
I refresh page (656ms)
I save screenshot "initial-todos.png" (177ms)
And I marked the first as completed
TodosPage: markNthAsCompleted 1
I grab attribute from 1 todo item, "class" (26ms)
I click {xpath: .//div/input[ancestor::*[contains(concat(' ', normalize-space(./@class), ' '), ' todo-list ')]//li[count(preceding-sibling::*) = 0]]} (84ms)
When I refresh the page
TodosPage: refresh
I refresh page (605ms)
Then I still see the same todos
TodosPage: seeNumberOfTodos 4
I see number of visible elements ".todo-list li", 4 (42ms)
TodosPage: seeNthTodoEquals 1, "foo"
I grab text from ".todo-list li" (11ms)
################[ Failure ]################
Expected "foo" but got "
foo
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/persist-todos_test.js:27:3)
Text "some text" was not found on page after 5 secpage.waitForFunction: Timeout 5000ms exceeded.
I am on page "http://todomvc.com/examples/angularjs/#/" (1133ms) Given I already have some todos I wait for text "some text" (5005ms)
################[ Failure ]################
Text "some text" was not found on page after 5 sec page.waitForFunction: Timeout 5000ms exceeded. 2345 | } 2346 | } else { 2347 | waiter = contextObject.waitForFunction(text => document.body && document.body.innerText.indexOf(text) > -1, text, { timeout: waitTimeout }); 2348 | } 2349 | return waiter.catch((err) => {
2350 | throw new Error(
Text "${text}" was not found on page after ${waitTimeout / 1000} sec\n${err.message}
); 2351 | }); 2352 | } 2353 | 2354 | /* 2355 | Waits for a network request.
Report | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 2 tests run |
ποΈ Summary | π΄ 1 failed; π’ 0 passed, π‘ 0 skipped |
π Duration | 4889ms |
Expected "foo" but got "foo"
Given I have some todos I clear cookie (7ms) TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1316ms) I refresh page (659ms) I execute script () => sessionStorage.clear() (6ms) I execute script () => console.error('Boom!') (5ms) I wait for visible ".new-todo" (57ms) TodosPage: enterTodos [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}] I execute script (todoItems) => { localStorage.setItem('todos-angularjs', JSON.stringify(todoItems)); }, [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}] (6ms) TodosPage: refresh I refresh page (712ms) I save screenshot "initial-todos.png" (164ms) And I marked the first as completed TodosPage: markNthAsCompleted 1 I grab attribute from 1 todo item, "class" (28ms) I click {xpath: .//div/input[ancestor::*[contains(concat(' ', normalize-space(./@class), ' '), ' todo-list ')]//li[count(preceding-sibling::*) = 0]]} (80ms) When I refresh the page TodosPage: refresh I refresh page (622ms) Then I still see the same todos TodosPage: seeNumberOfTodos 4 I see number of visible elements ".todo-list li", 4 (47ms) TodosPage: seeNthTodoEquals 1, "foo" I grab text from ".todo-list li" (12ms)
################[ Failure ]################
Expected "foo" but got "
foo
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
![](https://testomatio-artifacts.ams3.digitaloceanspaces.com/undefined/9e15e0bb-fbe3-4052-a0c6-f16fbf2d6b20-Todos_survive_a_page_refresh_%40step-06.failed.png)
Report | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 32 tests run |
ποΈ Summary | π΄ 12 failed; π’ 9 passed; π‘ 0 skipped |
π Duration | 62999ms |
[[object Object]]
Expected "Todo with umlauts " but got "Todo with umlauts "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1162ms) I refresh page (649ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (35ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with umlauts Àâü" I fill field ".new-todo", "Todo with umlauts Àâü" (344ms) I press key "Enter" (29ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with umlauts Àâü" I grab text from ".todo-list li" (14ms)
################[ Failure ]################
Expected "Todo with umlauts Àâü" but got "
Todo with umlauts Àâü
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
[[object Object]]
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1128ms) I refresh page (644ms) I execute script () => sessionStorage.clear() (6ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (44ms) When I enter {Todo Text} TodosPage: enterTodo "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I fill field ".new-todo", "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" (2120ms) I press key "Enter" (58ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" I grab text from ".todo-list li" (11ms)
################[ Failure ]################
Expected "Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo" but got "
Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong TooooooooooooooooooooooooooooooooooooooooDooooooooooooooo
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
[[object Object]]
Expected "Todo with html code " but got "Todo with html code "
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1136ms) I refresh page (635ms) I execute script () => sessionStorage.clear() (3ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (31ms) When I enter {Todo Text} TodosPage: enterTodo "Todo with html code <script>alert("hello")</script>" I fill field ".new-todo", "Todo with html code <script>alert("hello")</script>" (778ms) I press key "Enter" (39ms) Then I see {Result} TodosPage: seeNthTodoEquals 1, "Todo with html code <script>alert("hello")</script>" I grab text from ".todo-list li" (10ms)
################[ Failure ]################
Expected "Todo with html code " but got "
Todo with html code <script>alert("hello")</script>
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "Todo with lots of whitespace around" but got "Todo with lots of whitespace around"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1143ms) I refresh page (610ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (2ms) I wait for visible ".new-todo" (26ms) Given I have an empty todo list When I enter a todo with whitespace around the text TodosPage: enterTodo " Todo with lots of whitespace around " I fill field ".new-todo", " Todo with lots of whitespace around " (735ms) I press key "Enter" (42ms) Then I see the trimmed text of the todo in the list TodosPage: seeNthTodoEquals 1, "Todo with lots of whitespace around" I grab text from ".todo-list li" (12ms)
################[ Failure ]################
Expected "Todo with lots of whitespace around" but got "
Todo with lots of whitespace around
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
Expected "first" but got "first"
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1065ms) I refresh page (649ms) I execute script () => sessionStorage.clear() (4ms) I execute script () => console.error('Boom!') (2ms) I wait for visible ".new-todo" (41ms) Given I added some todos TodosPage: enterTodo "last" I fill field ".new-todo", "first" (105ms) I press key "Enter" (48ms) I fill field ".new-todo", "second" (118ms) I press key "Enter" (10ms) I fill field ".new-todo", "last" (77ms) I press key "Enter" (7ms) When I look at my todo list Then I see the todos in the order in which I added them TodosPage: seeNthTodoEquals 1, "first" I grab text from ".todo-list li" (8ms)
################[ Failure ]################
Expected "first" but got "
first
"
true
84 | let todos = await I.grabTextFrom('.todo-list li') 85 | if (typeof todos === 'string') { 86 | todos = [todos] 87 | } 88 |
89 | assert(todos[nthTodo - 1] === 1,
Expected "${todo}" but got "${todos[nthTodo - 1]}"
) 90 | return todos 91 | }, 92 | 93 | seeNumberOfTodos(numberOfTodos) { 94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.
I.createUserAndLogIn is not a function
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1053ms) I refresh page (641ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (29ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (73ms) I press key "Enter" (48ms) I fill field ".new-todo", "bar" (73ms) I press key "Enter" (14ms) I fill field ".new-todo", "baz" (68ms) I press key "Enter" (8ms)
################[ Failure ]################
I.createUserAndLogIn is not a function 7 | TodosPage.enterTodo('bar') 8 | TodosPage.enterTodo('baz') 9 |}) 10 | 11 |Scenario('Unapproved user cant chat with unapproved user', async ({I}) => {
12 | I.createUserAndLogIn(); 13 | const username = globalConf.users.getCurrentUser().username; 14 | await I.getUserId(username); 15 | 16 | I.logOut(); 17 |
at Test.
- ![](https://testomatio-artifacts.ams3.digitaloceanspaces.com/undefined/5a1d476c-be92-49b8-8e6d-12e169d53a97-Unapproved_user_cant_chat_with_unapproved_user.failed.png)
---
- π΄ Edit/Delete Todos @step-06 **Edited todo is saved on blur** (362ms)
> Expected "boom" but got "boom"
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1083ms)
I refresh page (664ms)
I execute script () => sessionStorage.clear() (7ms)
I execute script () => console.error('Boom!') (4ms)
I wait for visible ".new-todo" (48ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (82ms)
I press key "Enter" (28ms)
I fill field ".new-todo", "bar" (63ms)
I press key "Enter" (7ms)
I fill field ".new-todo", "baz" (61ms)
I press key "Enter" (8ms)
Given I have some todos
When I edit the first todo
TodosPage: editNthTodo 1, "boom"
I double click 1 todo item (95ms)
I fill field 1nth todo input, "boom" (89ms)
I press key "Enter" (7ms)
Then I see that the todo text has been changed
TodosPage: seeNthTodoEquals 1, "boom"
I grab text from ".todo-list li" (17ms)
################[ Failure ]################
Expected "boom" but got "
boom
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/edit-todos_test.js:32:5)
Cannot read property 'page' of undefined
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1177ms) I refresh page (946ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (3ms) I wait for visible ".new-todo" (31ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (63ms) I press key "Enter" (51ms) I fill field ".new-todo", "bar" (57ms) I press key "Enter" (7ms) I fill field ".new-todo", "baz" (68ms) I press key "Enter" (8ms) Given I have some todos When I delete the first todo TodosPage: deleteNthTodo 1 I hover ".todo-list li:nth-child(1)"0
################[ Failure ]################
Cannot read property 'page' of undefined 70 | I.pressKey('Enter') 71 | }, 72 | 73 | deleteNthTodo(nthTodo) { 74 | // Use a custom helper function to hover over an todo item
75 | I.hover(
.todo-list li:nth-child(${nthTodo})
) 76 | I.click(nthTTodoDeleteButton(nthTodo)) 77 | }, 78 | 79 | refresh() { 80 | I.refreshPage()
at Object.deleteNthTodo (./todomvc-tests/pages/todos.page.js:75:11)
- ![](https://testomatio-artifacts.ams3.digitaloceanspaces.com/undefined/4b0d3e06-6be0-4c2b-a968-1fb7dc632f4a-Delete_todos.failed.png)
---
- π΄ Mark as completed/not completed @step-06 **Mark all todos as completed** (177ms)
> page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
```diff
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1177ms)
I refresh page (666ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (8ms)
I wait for visible ".new-todo" (31ms)
TodosPage: enterTodo "baz"
I fill field ".new-todo", "foo" (81ms)
I press key "Enter" (28ms)
I fill field ".new-todo", "bar" (74ms)
I press key "Enter" (6ms)
I fill field ".new-todo", "baz" (78ms)
I press key "Enter" (9ms)
Given I have some todos
When I mark them all as completed
TodosPage: markAllAsCompleted
I click "label[for="toggle-all"" (32ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed')
44 | I.click(nthTodoCheckbox(nthTodo))
45 | },
46 |
47 | markAllAsCompleted() {
> 48 | I.click('label[for="toggle-all"')
49 | },
50 |
51 | clearCompleted() {
52 | I.click('button.clear-completed')
53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all""
TodosPage: goto I am on page "http://todomvc.com/examples/angularjs/#/" (1119ms) I refresh page (642ms) I execute script () => sessionStorage.clear() (5ms) I execute script () => console.error('Boom!') (4ms) I wait for visible ".new-todo" (38ms) TodosPage: enterTodo "baz" I fill field ".new-todo", "foo" (74ms) I press key "Enter" (32ms) I fill field ".new-todo", "bar" (70ms) I press key "Enter" (10ms) I fill field ".new-todo", "baz" (73ms) I press key "Enter" (9ms) Given I have some completed todos TodosPage: markAllAsCompleted I click "label[for="toggle-all"" (25ms)
################[ Failure ]################
page.$$: Unexpected token "" while parsing selector "label[for="toggle-all"" 43 | assert(classNames.indexOf('completed') >= 0, 'Expected todo to be marked as completed') 44 | I.click(nthTodoCheckbox(nthTodo)) 45 | }, 46 | 47 | markAllAsCompleted() {
48 | I.click('label[for="toggle-all"') 49 | }, 50 | 51 | clearCompleted() { 52 | I.click('button.clear-completed') 53 | },
at Object.markAllAsCompleted (./todomvc-tests/pages/todos.page.js:48:11)
- ![](https://testomatio-artifacts.ams3.digitaloceanspaces.com/undefined/b6cea24c-648f-4079-a9f9-3f765c413d0c-Clear_completed_todos.failed.png)
---
- π΄ Persist Todos **Todos survive a page refresh @step-06** (886ms)
> Expected "foo" but got "foo"
```diff
Given I have some todos
I clear cookie (1ms)
TodosPage: goto
I am on page "http://todomvc.com/examples/angularjs/#/" (1139ms)
I refresh page (651ms)
I execute script () => sessionStorage.clear() (5ms)
I execute script () => console.error('Boom!') (4ms)
I wait for visible ".new-todo" (44ms)
TodosPage: enterTodos [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}]
I execute script (todoItems) => {
localStorage.setItem('todos-angularjs', JSON.stringify(todoItems));
}, [{"title":"foo","completed":false},{"title":"bar","completed":false},{"title":"baz","completed":false},{"title":"boom","completed":true}] (8ms)
TodosPage: refresh
I refresh page (645ms)
I save screenshot "initial-todos.png" (156ms)
And I marked the first as completed
TodosPage: markNthAsCompleted 1
I grab attribute from 1 todo item, "class" (28ms)
I click {xpath: .//div/input[ancestor::*[contains(concat(' ', normalize-space(./@class), ' '), ' todo-list ')]//li[count(preceding-sibling::*) = 0]]} (40ms)
When I refresh the page
TodosPage: refresh
I refresh page (626ms)
Then I still see the same todos
TodosPage: seeNumberOfTodos 4
I see number of visible elements ".todo-list li", 4 (44ms)
TodosPage: seeNthTodoEquals 1, "foo"
I grab text from ".todo-list li" (9ms)
################[ Failure ]################
Expected "foo" but got "
foo
"
+ expected - actual
- false
+ true
84 | let todos = await I.grabTextFrom('.todo-list li')
85 | if (typeof todos === 'string') {
86 | todos = [todos]
87 | }
88 |
> 89 | assert(todos[nthTodo - 1] === 1, `Expected "${todo}" but got "${todos[nthTodo - 1]}"`)
90 | return todos
91 | },
92 |
93 | seeNumberOfTodos(numberOfTodos) {
94 | I.seeNumberOfVisibleElements('.todo-list li', numberOfTodos)
at Object.seeNthTodoEquals (todomvc-tests/pages/todos.page.js:89:9)
at async Test.<anonymous> (todomvc-tests/persist-todos_test.js:27:3)
Text "some text" was not found on page after 5 secpage.waitForFunction: Timeout 5000ms exceeded.
I am on page "http://todomvc.com/examples/angularjs/#/" (1069ms) Given I already have some todos I wait for text "some text" (5005ms)
################[ Failure ]################
Text "some text" was not found on page after 5 sec page.waitForFunction: Timeout 5000ms exceeded. 2345 | } 2346 | } else { 2347 | waiter = contextObject.waitForFunction(text => document.body && document.body.innerText.indexOf(text) > -1, text, { timeout: waitTimeout }); 2348 | } 2349 | return waiter.catch((err) => {
2350 | throw new Error(
Text "${text}" was not found on page after ${waitTimeout / 1000} sec\n${err.message}
); 2351 | }); 2352 | } 2353 | 2354 | /* 2355 | Waits for a network request.
Report | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 5 tests run |
ποΈ Summary | π΄ 3 failed; π’ 2 passed; π‘ 0 skipped |
π Duration | 111ms |
Report | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 5 tests run |
ποΈ Summary | π΄ 3 failed; π’ 2 passed; π‘ 0 skipped |
π Duration | 108ms |
Report | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 5 tests run |
ποΈ Summary | π΄ 3 failed; π’ 2 passed; π‘ 0 skipped |
π Duration | 108ms |
Report | π’ PASSED π’ |
---|---|
βοΈ Tests | 3 tests run |
ποΈ Summary | π΄ 0 failed; π’ 3 passed; π‘ 0 skipped |
π Duration | 101ms |
Report | π’ PASSED π’ |
---|---|
βοΈ Tests | 3 tests run |
ποΈ Summary | π΄ 0 failed; π’ 3 passed; π‘ 0 skipped |
π Duration | 98ms |
Report | π’ PASSED π’ |
---|---|
βοΈ Tests | 3 tests run |
ποΈ Summary | π΄ 0 failed; π’ 3 passed; π‘ 0 skipped |
π Duration | 93ms |
Report | π’ PASSED π’ |
---|---|
βοΈ Tests | 3 tests run |
ποΈ Summary | π΄ 0 failed; π’ 3 passed; π‘ 0 skipped |
π Duration | 92ms |
Report | π΄ FAILED π΄ |
---|---|
βοΈ Tests | 710 tests run |
ποΈ Summary | π΄ 13 failed; π’ 697 passed; π‘ 0 skipped |
π Duration | 220ms |
Expected nil to be truthy.
Failure: test_analytics_is_not_accessible_without_Enterprise_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/api/analytics_controller_test.rb:20: Expected nil to be truthy.
################[ Failure ]################ 17 | get api_analytics_counters_path(project) 18 | echo @response.body 19 | json = JSON.parse @response.body, symbolize_names: true 20 > assert json[:error] 21 | end 22 | 23 | test 'load counters' do
---
- π΄ Api::BranchesControllerTest **branches is not accessible without Enterprise subscription** (0.08151141199778067ms)
> Expected nil to be truthy.
```diff
Failure:
test_branches_is_not_accessible_without_Enterprise_subscription(Minitest::Result)
/home/davert/projects/testomatio/backend/test/integration/api/branches_controller_test.rb:18:
Expected nil to be truthy.
################[ Failure ]################
15 | get api_branches_path(project)
16 | echo @response.body
17 | json = JSON.parse @response.body, symbolize_names: true
18 > assert json[:error]
19 | end
20 |
21 | test 'should return all branches' do
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_not_active_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:92: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 89 | 90 | member2 = User.create name: 'dummy member', password: 'password', password_confirmation: 'password', email: 'member@user.com' 91 | 92 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! member2 } 93 | end 94 | 95 | test 'can invite if trial is enabled' do
---
- π΄ CompanyTest **notify if custom subscription set** (2.169010192999849ms)
> Expected: 2...
```diff
Failure:
test_should_notify_if_custom_subscription_set(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/company_test.rb:125:
Expected: 2
Actual: 4
################[ Failure ]################
122 | @company.save
123 |
124 | echo @company.active_users.pluck(:name)
125 > _(@company.active_users.count).must_equal 2
126 | echo @company.removed_users.pluck(:name)
127 | _(@company.removed_users.count).must_equal 2
128 |
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_new_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:74: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 71 | test 'can not invite new user' do 72 | @company.users_limit = 0 73 | 74 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! } 75 | end 76 | 77 | test 'can invite active user' do
---
- π΄ Dispatch::ReportControllerTest **add test to report** (0.49369561899948167ms)
> Expected: 3...
```diff
Failure:
test_add_test_to_report(Minitest::Result)
/home/davert/projects/testomatio/backend/test/controllers/dispatch/report_controller_test.rb:91:
Expected: 3
Actual: 4
################[ Failure ]################
88 | }
89 | assert_response :bad_request
90 | echo @response.body
91 > _(run.testruns.count).must_equal 3
92 | end
93 |
94 | test 'create automated report with test runs' do
Expected false to be truthy.
Failure: test_should_sign_in_registering_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/oauth_test.rb:235: Expected false to be truthy.
################[ Failure ]################ 232 | _(user.name).must_equal 'davert' 233 | assert user.avatar.attached? 234 | assert user.isactive? 235 > assert TrialService.new(user).active? 236 | assert flash[:success] 237 | (flash[:success]).mustinclude 'Welcome to Testomat.io' 238 | (flash[:success]).must_include 'trial'
---
- π΄ ProjectTest **it should not have subscription if user have no trial** (0.0822177810005087ms)
> Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
```diff
Failure:
test_it_should_not_have_subscription_if_user_have_no_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:17:
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################
14 | test 'it should not have subscription if user have no trial' do
15 | p.user = developer_record
16 | p.save
17 > assert_not p.subscription
18 | end
19 |
20 | test 'it should have subscription if user has trial' do
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
Failure: test_it_should_not_have_any_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:11: Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################ 8 | let(:p) { Project.create title: 'test1' } 9 | 10 | test 'it should not have any subscription' do 11 > assert_not p.subscription 12 | end 13 | 14 | test 'it should not have subscription if user have no trial' do
---
- π΄ ProjectTest **it should have subscription if user has trial** (0.09006803500233218ms)
> Expected nil to be truthy.
```diff
Failure:
test_it_should_have_subscription_if_user_has_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:25:
Expected nil to be truthy.
################[ Failure ]################
22 | p.save
23 | TrialService.new(p.user).start
24 | assert p.subscription
25 > assert p.subscription.trial
26 | end
27 |
28 | test 'it should unlock project of same user after deleting one' do
--- expected...
Failure: test_it_should_have_subscription_from_a_company(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:41: --- expected +++ actual @@ -1 +1 @@ -#<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> +#<Subscription id: 1, product_id: nil, title: "Professional", description: "For small and medium-sized businesses", price_monthly: 5, price_yearly: 10, features: ["Unlimited users", "Unlimited projects", "Test runs", "Notifications", "CI integrations"], users_limit: nil, created_at: "2022-12-01 00:56:25.535480000 +0000", updated_at: "2022-12-01 00:56:25.535480000 +0000", stripe_monthly_product_id: "price_1InguIG1zSfCnE1yU9yFnexH", stripe_yearly_product_id: "price_1InguIG1zSfCnE1yGrw9rRyn">
################[ Failure ]################ 38 | p.user = developer_record 39 | p.save 40 | assert p.subscription 41 > assert_equal p.subscription, Subscription.first 42 | end 43 | 44 | test 'should not fail if lang is nil' do
---
- π΄ SubscriptionServiceTest **users over limit are removed on unsubscribe** (1.486200021001423ms)
> Expected: 1...
```diff
Failure:
test_users_over_limit_are_removed_on_unsubscribe(Minitest::Result)
/home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:106:
Expected: 1
Actual: 2
################[ Failure ]################
103 |
104 | base_subscription_service.deactivate!
105 |
106 > assert_equal 1, company.active_users.count
107 | assert_equal company.owner.id, company.active_users.first.id
108 | end
109 |
Expected false to be truthy.
Failure: test_should_deactivate_users_and_reinvite(Minitest::Result) /home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:73: Expected false to be truthy.
################[ Failure ]################ 70 | company.deactivate_extra_users 71 | echo company.activeusers.pluck(:email) 72 | 73 > assert user2.permissions.count.zero? 74 | 75 | (company.active_users.length).must_equal 3 76 |
---
π΄ FAILED π΄ | |
---|---|
Tests | βοΈ 710 tests run |
Summary | ποΈ π΄ 13 failed; π’ 697 passed; π‘ 0 skipped |
Duration | π 213ms |
Expected nil to be truthy.
Failure: test_analytics_is_not_accessible_without_Enterprise_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/api/analytics_controller_test.rb:20: Expected nil to be truthy.
################[ Failure ]################ 17 | get api_analytics_counters_path(project) 18 | echo @response.body 19 | json = JSON.parse @response.body, symbolize_names: true 20 > assert json[:error] 21 | end 22 | 23 | test 'load counters' do
---
##### #{statusEmoji('failed')} Api::BranchesControllerTest **branches is not accessible without Enterprise subscription** (0.08151141199778067ms)
> Expected nil to be truthy.
```diff
Failure:
test_branches_is_not_accessible_without_Enterprise_subscription(Minitest::Result)
/home/davert/projects/testomatio/backend/test/integration/api/branches_controller_test.rb:18:
Expected nil to be truthy.
################[ Failure ]################
15 | get api_branches_path(project)
16 | echo @response.body
17 | json = JSON.parse @response.body, symbolize_names: true
18 > assert json[:error]
19 | end
20 |
21 | test 'should return all branches' do
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_not_active_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:92: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 89 | 90 | member2 = User.create name: 'dummy member', password: 'password', password_confirmation: 'password', email: 'member@user.com' 91 | 92 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! member2 } 93 | end 94 | 95 | test 'can invite if trial is enabled' do
---
##### #{statusEmoji('failed')} CompanyTest **notify if custom subscription set** (2.169010192999849ms)
> Expected: 2...
```diff
Failure:
test_should_notify_if_custom_subscription_set(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/company_test.rb:125:
Expected: 2
Actual: 4
################[ Failure ]################
122 | @company.save
123 |
124 | echo @company.active_users.pluck(:name)
125 > _(@company.active_users.count).must_equal 2
126 | echo @company.removed_users.pluck(:name)
127 | _(@company.removed_users.count).must_equal 2
128 |
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_new_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:74: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 71 | test 'can not invite new user' do 72 | @company.users_limit = 0 73 | 74 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! } 75 | end 76 | 77 | test 'can invite active user' do
---
##### #{statusEmoji('failed')} Dispatch::ReportControllerTest **add test to report** (0.49369561899948167ms)
> Expected: 3...
```diff
Failure:
test_add_test_to_report(Minitest::Result)
/home/davert/projects/testomatio/backend/test/controllers/dispatch/report_controller_test.rb:91:
Expected: 3
Actual: 4
################[ Failure ]################
88 | }
89 | assert_response :bad_request
90 | echo @response.body
91 > _(run.testruns.count).must_equal 3
92 | end
93 |
94 | test 'create automated report with test runs' do
Expected false to be truthy.
Failure: test_should_sign_in_registering_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/oauth_test.rb:235: Expected false to be truthy.
################[ Failure ]################ 232 | _(user.name).must_equal 'davert' 233 | assert user.avatar.attached? 234 | assert user.isactive? 235 > assert TrialService.new(user).active? 236 | assert flash[:success] 237 | (flash[:success]).mustinclude 'Welcome to Testomat.io' 238 | (flash[:success]).must_include 'trial'
---
##### #{statusEmoji('failed')} ProjectTest **it should not have subscription if user have no trial** (0.0822177810005087ms)
> Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
```diff
Failure:
test_it_should_not_have_subscription_if_user_have_no_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:17:
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################
14 | test 'it should not have subscription if user have no trial' do
15 | p.user = developer_record
16 | p.save
17 > assert_not p.subscription
18 | end
19 |
20 | test 'it should have subscription if user has trial' do
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
Failure: test_it_should_not_have_any_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:11: Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################ 8 | let(:p) { Project.create title: 'test1' } 9 | 10 | test 'it should not have any subscription' do 11 > assert_not p.subscription 12 | end 13 | 14 | test 'it should not have subscription if user have no trial' do
---
##### #{statusEmoji('failed')} ProjectTest **it should have subscription if user has trial** (0.09006803500233218ms)
> Expected nil to be truthy.
```diff
Failure:
test_it_should_have_subscription_if_user_has_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:25:
Expected nil to be truthy.
################[ Failure ]################
22 | p.save
23 | TrialService.new(p.user).start
24 | assert p.subscription
25 > assert p.subscription.trial
26 | end
27 |
28 | test 'it should unlock project of same user after deleting one' do
--- expected...
Failure: test_it_should_have_subscription_from_a_company(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:41: --- expected +++ actual @@ -1 +1 @@ -#<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> +#<Subscription id: 1, product_id: nil, title: "Professional", description: "For small and medium-sized businesses", price_monthly: 5, price_yearly: 10, features: ["Unlimited users", "Unlimited projects", "Test runs", "Notifications", "CI integrations"], users_limit: nil, created_at: "2022-12-01 00:56:25.535480000 +0000", updated_at: "2022-12-01 00:56:25.535480000 +0000", stripe_monthly_product_id: "price_1InguIG1zSfCnE1yU9yFnexH", stripe_yearly_product_id: "price_1InguIG1zSfCnE1yGrw9rRyn">
################[ Failure ]################ 38 | p.user = developer_record 39 | p.save 40 | assert p.subscription 41 > assert_equal p.subscription, Subscription.first 42 | end 43 | 44 | test 'should not fail if lang is nil' do
---
##### #{statusEmoji('failed')} SubscriptionServiceTest **users over limit are removed on unsubscribe** (1.486200021001423ms)
> Expected: 1...
```diff
Failure:
test_users_over_limit_are_removed_on_unsubscribe(Minitest::Result)
/home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:106:
Expected: 1
Actual: 2
################[ Failure ]################
103 |
104 | base_subscription_service.deactivate!
105 |
106 > assert_equal 1, company.active_users.count
107 | assert_equal company.owner.id, company.active_users.first.id
108 | end
109 |
Expected false to be truthy.
Failure: test_should_deactivate_users_and_reinvite(Minitest::Result) /home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:73: Expected false to be truthy.
################[ Failure ]################ 70 | company.deactivate_extra_users 71 | echo company.activeusers.pluck(:email) 72 | 73 > assert user2.permissions.count.zero? 74 | 75 | (company.active_users.length).must_equal 3 76 |
---
π΄ FAILED π΄ | |
---|---|
Tests | βοΈ 710 tests run |
Summary | ποΈ π΄ 13 failed; π’ 697 passed; π‘ 0 skipped |
Duration | π 0.185s |
Expected nil to be truthy.
Failure: test_analytics_is_not_accessible_without_Enterprise_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/api/analytics_controller_test.rb:20: Expected nil to be truthy.
################[ Failure ]################ 17 | get api_analytics_counters_path(project) 18 | echo @response.body 19 | json = JSON.parse @response.body, symbolize_names: true 20 > assert json[:error] 21 | end 22 | 23 | test 'load counters' do
---
##### #{statusEmoji('failed')} Api::BranchesControllerTest **branches is not accessible without Enterprise subscription** (0.08151141199778067ms)
> Expected nil to be truthy.
```diff
Failure:
test_branches_is_not_accessible_without_Enterprise_subscription(Minitest::Result)
/home/davert/projects/testomatio/backend/test/integration/api/branches_controller_test.rb:18:
Expected nil to be truthy.
################[ Failure ]################
15 | get api_branches_path(project)
16 | echo @response.body
17 | json = JSON.parse @response.body, symbolize_names: true
18 > assert json[:error]
19 | end
20 |
21 | test 'should return all branches' do
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_not_active_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:92: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 89 | 90 | member2 = User.create name: 'dummy member', password: 'password', password_confirmation: 'password', email: 'member@user.com' 91 | 92 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! member2 } 93 | end 94 | 95 | test 'can invite if trial is enabled' do
---
##### #{statusEmoji('failed')} CompanyTest **notify if custom subscription set** (2.169010192999849ms)
> Expected: 2...
```diff
Failure:
test_should_notify_if_custom_subscription_set(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/company_test.rb:125:
Expected: 2
Actual: 4
################[ Failure ]################
122 | @company.save
123 |
124 | echo @company.active_users.pluck(:name)
125 > _(@company.active_users.count).must_equal 2
126 | echo @company.removed_users.pluck(:name)
127 | _(@company.removed_users.count).must_equal 2
128 |
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_new_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:74: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 71 | test 'can not invite new user' do 72 | @company.users_limit = 0 73 | 74 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! } 75 | end 76 | 77 | test 'can invite active user' do
---
##### #{statusEmoji('failed')} Dispatch::ReportControllerTest **add test to report** (0.49369561899948167ms)
> Expected: 3...
```diff
Failure:
test_add_test_to_report(Minitest::Result)
/home/davert/projects/testomatio/backend/test/controllers/dispatch/report_controller_test.rb:91:
Expected: 3
Actual: 4
################[ Failure ]################
88 | }
89 | assert_response :bad_request
90 | echo @response.body
91 > _(run.testruns.count).must_equal 3
92 | end
93 |
94 | test 'create automated report with test runs' do
Expected false to be truthy.
Failure: test_should_sign_in_registering_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/oauth_test.rb:235: Expected false to be truthy.
################[ Failure ]################ 232 | _(user.name).must_equal 'davert' 233 | assert user.avatar.attached? 234 | assert user.isactive? 235 > assert TrialService.new(user).active? 236 | assert flash[:success] 237 | (flash[:success]).mustinclude 'Welcome to Testomat.io' 238 | (flash[:success]).must_include 'trial'
---
##### #{statusEmoji('failed')} ProjectTest **it should not have subscription if user have no trial** (0.0822177810005087ms)
> Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
```diff
Failure:
test_it_should_not_have_subscription_if_user_have_no_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:17:
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################
14 | test 'it should not have subscription if user have no trial' do
15 | p.user = developer_record
16 | p.save
17 > assert_not p.subscription
18 | end
19 |
20 | test 'it should have subscription if user has trial' do
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
Failure: test_it_should_not_have_any_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:11: Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################ 8 | let(:p) { Project.create title: 'test1' } 9 | 10 | test 'it should not have any subscription' do 11 > assert_not p.subscription 12 | end 13 | 14 | test 'it should not have subscription if user have no trial' do
---
##### #{statusEmoji('failed')} ProjectTest **it should have subscription if user has trial** (0.09006803500233218ms)
> Expected nil to be truthy.
```diff
Failure:
test_it_should_have_subscription_if_user_has_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:25:
Expected nil to be truthy.
################[ Failure ]################
22 | p.save
23 | TrialService.new(p.user).start
24 | assert p.subscription
25 > assert p.subscription.trial
26 | end
27 |
28 | test 'it should unlock project of same user after deleting one' do
--- expected...
Failure: test_it_should_have_subscription_from_a_company(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:41: --- expected +++ actual @@ -1 +1 @@ -#<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> +#<Subscription id: 1, product_id: nil, title: "Professional", description: "For small and medium-sized businesses", price_monthly: 5, price_yearly: 10, features: ["Unlimited users", "Unlimited projects", "Test runs", "Notifications", "CI integrations"], users_limit: nil, created_at: "2022-12-01 00:56:25.535480000 +0000", updated_at: "2022-12-01 00:56:25.535480000 +0000", stripe_monthly_product_id: "price_1InguIG1zSfCnE1yU9yFnexH", stripe_yearly_product_id: "price_1InguIG1zSfCnE1yGrw9rRyn">
################[ Failure ]################ 38 | p.user = developer_record 39 | p.save 40 | assert p.subscription 41 > assert_equal p.subscription, Subscription.first 42 | end 43 | 44 | test 'should not fail if lang is nil' do
---
##### #{statusEmoji('failed')} SubscriptionServiceTest **users over limit are removed on unsubscribe** (1.486200021001423ms)
> Expected: 1...
```diff
Failure:
test_users_over_limit_are_removed_on_unsubscribe(Minitest::Result)
/home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:106:
Expected: 1
Actual: 2
################[ Failure ]################
103 |
104 | base_subscription_service.deactivate!
105 |
106 > assert_equal 1, company.active_users.count
107 | assert_equal company.owner.id, company.active_users.first.id
108 | end
109 |
Expected false to be truthy.
Failure: test_should_deactivate_users_and_reinvite(Minitest::Result) /home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:73: Expected false to be truthy.
################[ Failure ]################ 70 | company.deactivate_extra_users 71 | echo company.activeusers.pluck(:email) 72 | 73 > assert user2.permissions.count.zero? 74 | 75 | (company.active_users.length).must_equal 3 76 |
---
π΄ FAILED π΄ | |
---|---|
Tests | βοΈ 710 tests run |
Summary | ποΈ π΄ 13 failed; π’ 697 passed; π‘ 0 skipped |
Duration | π 0.193s |
Expected nil to be truthy.
Failure: test_analytics_is_not_accessible_without_Enterprise_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/api/analytics_controller_test.rb:20: Expected nil to be truthy.
################[ Failure ]################ 17 | get api_analytics_counters_path(project) 18 | echo @response.body 19 | json = JSON.parse @response.body, symbolize_names: true 20 > assert json[:error] 21 | end 22 | 23 | test 'load counters' do
---
##### π΄ Api::BranchesControllerTest **branches is not accessible without Enterprise subscription** (0.08151141199778067ms)
> Expected nil to be truthy.
```diff
Failure:
test_branches_is_not_accessible_without_Enterprise_subscription(Minitest::Result)
/home/davert/projects/testomatio/backend/test/integration/api/branches_controller_test.rb:18:
Expected nil to be truthy.
################[ Failure ]################
15 | get api_branches_path(project)
16 | echo @response.body
17 | json = JSON.parse @response.body, symbolize_names: true
18 > assert json[:error]
19 | end
20 |
21 | test 'should return all branches' do
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_not_active_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:92: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 89 | 90 | member2 = User.create name: 'dummy member', password: 'password', password_confirmation: 'password', email: 'member@user.com' 91 | 92 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! member2 } 93 | end 94 | 95 | test 'can invite if trial is enabled' do
---
##### π΄ CompanyTest **notify if custom subscription set** (2.169010192999849ms)
> Expected: 2...
```diff
Failure:
test_should_notify_if_custom_subscription_set(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/company_test.rb:125:
Expected: 2
Actual: 4
################[ Failure ]################
122 | @company.save
123 |
124 | echo @company.active_users.pluck(:name)
125 > _(@company.active_users.count).must_equal 2
126 | echo @company.removed_users.pluck(:name)
127 | _(@company.removed_users.count).must_equal 2
128 |
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_new_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:74: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 71 | test 'can not invite new user' do 72 | @company.users_limit = 0 73 | 74 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! } 75 | end 76 | 77 | test 'can invite active user' do
---
##### π΄ Dispatch::ReportControllerTest **add test to report** (0.49369561899948167ms)
> Expected: 3...
```diff
Failure:
test_add_test_to_report(Minitest::Result)
/home/davert/projects/testomatio/backend/test/controllers/dispatch/report_controller_test.rb:91:
Expected: 3
Actual: 4
################[ Failure ]################
88 | }
89 | assert_response :bad_request
90 | echo @response.body
91 > _(run.testruns.count).must_equal 3
92 | end
93 |
94 | test 'create automated report with test runs' do
Expected false to be truthy.
Failure: test_should_sign_in_registering_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/oauth_test.rb:235: Expected false to be truthy.
################[ Failure ]################ 232 | _(user.name).must_equal 'davert' 233 | assert user.avatar.attached? 234 | assert user.isactive? 235 > assert TrialService.new(user).active? 236 | assert flash[:success] 237 | (flash[:success]).mustinclude 'Welcome to Testomat.io' 238 | (flash[:success]).must_include 'trial'
---
##### π΄ ProjectTest **it should not have subscription if user have no trial** (0.0822177810005087ms)
> Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
```diff
Failure:
test_it_should_not_have_subscription_if_user_have_no_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:17:
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################
14 | test 'it should not have subscription if user have no trial' do
15 | p.user = developer_record
16 | p.save
17 > assert_not p.subscription
18 | end
19 |
20 | test 'it should have subscription if user has trial' do
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
Failure: test_it_should_not_have_any_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:11: Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################ 8 | let(:p) { Project.create title: 'test1' } 9 | 10 | test 'it should not have any subscription' do 11 > assert_not p.subscription 12 | end 13 | 14 | test 'it should not have subscription if user have no trial' do
---
##### π΄ ProjectTest **it should have subscription if user has trial** (0.09006803500233218ms)
> Expected nil to be truthy.
```diff
Failure:
test_it_should_have_subscription_if_user_has_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:25:
Expected nil to be truthy.
################[ Failure ]################
22 | p.save
23 | TrialService.new(p.user).start
24 | assert p.subscription
25 > assert p.subscription.trial
26 | end
27 |
28 | test 'it should unlock project of same user after deleting one' do
--- expected...
Failure: test_it_should_have_subscription_from_a_company(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:41: --- expected +++ actual @@ -1 +1 @@ -#<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> +#<Subscription id: 1, product_id: nil, title: "Professional", description: "For small and medium-sized businesses", price_monthly: 5, price_yearly: 10, features: ["Unlimited users", "Unlimited projects", "Test runs", "Notifications", "CI integrations"], users_limit: nil, created_at: "2022-12-01 00:56:25.535480000 +0000", updated_at: "2022-12-01 00:56:25.535480000 +0000", stripe_monthly_product_id: "price_1InguIG1zSfCnE1yU9yFnexH", stripe_yearly_product_id: "price_1InguIG1zSfCnE1yGrw9rRyn">
################[ Failure ]################ 38 | p.user = developer_record 39 | p.save 40 | assert p.subscription 41 > assert_equal p.subscription, Subscription.first 42 | end 43 | 44 | test 'should not fail if lang is nil' do
---
##### π΄ SubscriptionServiceTest **users over limit are removed on unsubscribe** (1.486200021001423ms)
> Expected: 1...
```diff
Failure:
test_users_over_limit_are_removed_on_unsubscribe(Minitest::Result)
/home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:106:
Expected: 1
Actual: 2
################[ Failure ]################
103 |
104 | base_subscription_service.deactivate!
105 |
106 > assert_equal 1, company.active_users.count
107 | assert_equal company.owner.id, company.active_users.first.id
108 | end
109 |
Expected false to be truthy.
Failure: test_should_deactivate_users_and_reinvite(Minitest::Result) /home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:73: Expected false to be truthy.
################[ Failure ]################ 70 | company.deactivate_extra_users 71 | echo company.activeusers.pluck(:email) 72 | 73 > assert user2.permissions.count.zero? 74 | 75 | (company.active_users.length).must_equal 3 76 |
---
π΄ FAILED π΄ | |
---|---|
Tests | βοΈ 710 tests run |
Summary | ποΈ π΄ 13 failed; π’ 697 passed; π‘ 0 skipped |
Duration | π 0.205s |
Expected nil to be truthy.
Failure: test_analytics_is_not_accessible_without_Enterprise_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/api/analytics_controller_test.rb:20: Expected nil to be truthy.
################[ Failure ]################ 17 | get api_analytics_counters_path(project) 18 | echo @response.body 19 | json = JSON.parse @response.body, symbolize_names: true 20 > assert json[:error] 21 | end 22 | 23 | test 'load counters' do
---
#### π΄ Api::BranchesControllerTest **branches is not accessible without Enterprise subscription** (0.08151141199778067ms)
> Expected nil to be truthy.
```diff
Failure:
test_branches_is_not_accessible_without_Enterprise_subscription(Minitest::Result)
/home/davert/projects/testomatio/backend/test/integration/api/branches_controller_test.rb:18:
Expected nil to be truthy.
################[ Failure ]################
15 | get api_branches_path(project)
16 | echo @response.body
17 | json = JSON.parse @response.body, symbolize_names: true
18 > assert json[:error]
19 | end
20 |
21 | test 'should return all branches' do
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_not_active_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:92: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 89 | 90 | member2 = User.create name: 'dummy member', password: 'password', password_confirmation: 'password', email: 'member@user.com' 91 | 92 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! member2 } 93 | end 94 | 95 | test 'can invite if trial is enabled' do
---
#### π΄ CompanyTest **notify if custom subscription set** (2.169010192999849ms)
> Expected: 2...
```diff
Failure:
test_should_notify_if_custom_subscription_set(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/company_test.rb:125:
Expected: 2
Actual: 4
################[ Failure ]################
122 | @company.save
123 |
124 | echo @company.active_users.pluck(:name)
125 > _(@company.active_users.count).must_equal 2
126 | echo @company.removed_users.pluck(:name)
127 | _(@company.removed_users.count).must_equal 2
128 |
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_new_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:74: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 71 | test 'can not invite new user' do 72 | @company.users_limit = 0 73 | 74 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! } 75 | end 76 | 77 | test 'can invite active user' do
---
#### π΄ Dispatch::ReportControllerTest **add test to report** (0.49369561899948167ms)
> Expected: 3...
```diff
Failure:
test_add_test_to_report(Minitest::Result)
/home/davert/projects/testomatio/backend/test/controllers/dispatch/report_controller_test.rb:91:
Expected: 3
Actual: 4
################[ Failure ]################
88 | }
89 | assert_response :bad_request
90 | echo @response.body
91 > _(run.testruns.count).must_equal 3
92 | end
93 |
94 | test 'create automated report with test runs' do
Expected false to be truthy.
Failure: test_should_sign_in_registering_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/oauth_test.rb:235: Expected false to be truthy.
################[ Failure ]################ 232 | _(user.name).must_equal 'davert' 233 | assert user.avatar.attached? 234 | assert user.isactive? 235 > assert TrialService.new(user).active? 236 | assert flash[:success] 237 | (flash[:success]).mustinclude 'Welcome to Testomat.io' 238 | (flash[:success]).must_include 'trial'
---
#### π΄ ProjectTest **it should not have subscription if user have no trial** (0.0822177810005087ms)
> Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
```diff
Failure:
test_it_should_not_have_subscription_if_user_have_no_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:17:
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################
14 | test 'it should not have subscription if user have no trial' do
15 | p.user = developer_record
16 | p.save
17 > assert_not p.subscription
18 | end
19 |
20 | test 'it should have subscription if user has trial' do
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
Failure: test_it_should_not_have_any_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:11: Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################ 8 | let(:p) { Project.create title: 'test1' } 9 | 10 | test 'it should not have any subscription' do 11 > assert_not p.subscription 12 | end 13 | 14 | test 'it should not have subscription if user have no trial' do
---
#### π΄ ProjectTest **it should have subscription if user has trial** (0.09006803500233218ms)
> Expected nil to be truthy.
```diff
Failure:
test_it_should_have_subscription_if_user_has_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:25:
Expected nil to be truthy.
################[ Failure ]################
22 | p.save
23 | TrialService.new(p.user).start
24 | assert p.subscription
25 > assert p.subscription.trial
26 | end
27 |
28 | test 'it should unlock project of same user after deleting one' do
--- expected...
Failure: test_it_should_have_subscription_from_a_company(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:41: --- expected +++ actual @@ -1 +1 @@ -#<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> +#<Subscription id: 1, product_id: nil, title: "Professional", description: "For small and medium-sized businesses", price_monthly: 5, price_yearly: 10, features: ["Unlimited users", "Unlimited projects", "Test runs", "Notifications", "CI integrations"], users_limit: nil, created_at: "2022-12-01 00:56:25.535480000 +0000", updated_at: "2022-12-01 00:56:25.535480000 +0000", stripe_monthly_product_id: "price_1InguIG1zSfCnE1yU9yFnexH", stripe_yearly_product_id: "price_1InguIG1zSfCnE1yGrw9rRyn">
################[ Failure ]################ 38 | p.user = developer_record 39 | p.save 40 | assert p.subscription 41 > assert_equal p.subscription, Subscription.first 42 | end 43 | 44 | test 'should not fail if lang is nil' do
---
#### π΄ SubscriptionServiceTest **users over limit are removed on unsubscribe** (1.486200021001423ms)
> Expected: 1...
```diff
Failure:
test_users_over_limit_are_removed_on_unsubscribe(Minitest::Result)
/home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:106:
Expected: 1
Actual: 2
################[ Failure ]################
103 |
104 | base_subscription_service.deactivate!
105 |
106 > assert_equal 1, company.active_users.count
107 | assert_equal company.owner.id, company.active_users.first.id
108 | end
109 |
Expected false to be truthy.
Failure: test_should_deactivate_users_and_reinvite(Minitest::Result) /home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:73: Expected false to be truthy.
################[ Failure ]################ 70 | company.deactivate_extra_users 71 | echo company.activeusers.pluck(:email) 72 | 73 > assert user2.permissions.count.zero? 74 | 75 | (company.active_users.length).must_equal 3 76 |
---
π΄ FAILED π΄ | |
---|---|
Tests | βοΈ 710 tests run |
Summary | π΄ 13 failed; π’ 697 passed; π‘ 0 skipped |
Duration | π 0.204s |
Testomat.io Report | π Run 424cde2c |
Expected nil to be truthy.
Failure: test_analytics_is_not_accessible_without_Enterprise_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/api/analytics_controller_test.rb:20: Expected nil to be truthy.
################[ Failure ]################ 17 | get api_analytics_counters_path(project) 18 | echo @response.body 19 | json = JSON.parse @response.body, symbolize_names: true 20 > assert json[:error] 21 | end 22 | 23 | test 'load counters' do
---
#### π΄ Api::BranchesControllerTest **branches is not accessible without Enterprise subscription** (0.08151141199778067ms)
> Expected nil to be truthy.
```diff
Failure:
test_branches_is_not_accessible_without_Enterprise_subscription(Minitest::Result)
/home/davert/projects/testomatio/backend/test/integration/api/branches_controller_test.rb:18:
Expected nil to be truthy.
################[ Failure ]################
15 | get api_branches_path(project)
16 | echo @response.body
17 | json = JSON.parse @response.body, symbolize_names: true
18 > assert json[:error]
19 | end
20 |
21 | test 'should return all branches' do
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_not_active_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:92: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 89 | 90 | member2 = User.create name: 'dummy member', password: 'password', password_confirmation: 'password', email: 'member@user.com' 91 | 92 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! member2 } 93 | end 94 | 95 | test 'can invite if trial is enabled' do
---
#### π΄ CompanyTest **notify if custom subscription set** (2.169010192999849ms)
> Expected: 2...
```diff
Failure:
test_should_notify_if_custom_subscription_set(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/company_test.rb:125:
Expected: 2
Actual: 4
################[ Failure ]################
122 | @company.save
123 |
124 | echo @company.active_users.pluck(:name)
125 > _(@company.active_users.count).must_equal 2
126 | echo @company.removed_users.pluck(:name)
127 | _(@company.removed_users.count).must_equal 2
128 |
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_new_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:74: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 71 | test 'can not invite new user' do 72 | @company.users_limit = 0 73 | 74 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! } 75 | end 76 | 77 | test 'can invite active user' do
---
#### π΄ Dispatch::ReportControllerTest **add test to report** (0.49369561899948167ms)
> Expected: 3...
```diff
Failure:
test_add_test_to_report(Minitest::Result)
/home/davert/projects/testomatio/backend/test/controllers/dispatch/report_controller_test.rb:91:
Expected: 3
Actual: 4
################[ Failure ]################
88 | }
89 | assert_response :bad_request
90 | echo @response.body
91 > _(run.testruns.count).must_equal 3
92 | end
93 |
94 | test 'create automated report with test runs' do
Expected false to be truthy.
Failure: test_should_sign_in_registering_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/oauth_test.rb:235: Expected false to be truthy.
################[ Failure ]################ 232 | _(user.name).must_equal 'davert' 233 | assert user.avatar.attached? 234 | assert user.isactive? 235 > assert TrialService.new(user).active? 236 | assert flash[:success] 237 | (flash[:success]).mustinclude 'Welcome to Testomat.io' 238 | (flash[:success]).must_include 'trial'
---
#### π΄ ProjectTest **it should not have subscription if user have no trial** (0.0822177810005087ms)
> Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
```diff
Failure:
test_it_should_not_have_subscription_if_user_have_no_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:17:
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################
14 | test 'it should not have subscription if user have no trial' do
15 | p.user = developer_record
16 | p.save
17 > assert_not p.subscription
18 | end
19 |
20 | test 'it should have subscription if user has trial' do
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
Failure: test_it_should_not_have_any_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:11: Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################ 8 | let(:p) { Project.create title: 'test1' } 9 | 10 | test 'it should not have any subscription' do 11 > assert_not p.subscription 12 | end 13 | 14 | test 'it should not have subscription if user have no trial' do
---
#### π΄ ProjectTest **it should have subscription if user has trial** (0.09006803500233218ms)
> Expected nil to be truthy.
```diff
Failure:
test_it_should_have_subscription_if_user_has_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:25:
Expected nil to be truthy.
################[ Failure ]################
22 | p.save
23 | TrialService.new(p.user).start
24 | assert p.subscription
25 > assert p.subscription.trial
26 | end
27 |
28 | test 'it should unlock project of same user after deleting one' do
--- expected...
Failure: test_it_should_have_subscription_from_a_company(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:41: --- expected +++ actual @@ -1 +1 @@ -#<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> +#<Subscription id: 1, product_id: nil, title: "Professional", description: "For small and medium-sized businesses", price_monthly: 5, price_yearly: 10, features: ["Unlimited users", "Unlimited projects", "Test runs", "Notifications", "CI integrations"], users_limit: nil, created_at: "2022-12-01 00:56:25.535480000 +0000", updated_at: "2022-12-01 00:56:25.535480000 +0000", stripe_monthly_product_id: "price_1InguIG1zSfCnE1yU9yFnexH", stripe_yearly_product_id: "price_1InguIG1zSfCnE1yGrw9rRyn">
################[ Failure ]################ 38 | p.user = developer_record 39 | p.save 40 | assert p.subscription 41 > assert_equal p.subscription, Subscription.first 42 | end 43 | 44 | test 'should not fail if lang is nil' do
---
#### π΄ SubscriptionServiceTest **users over limit are removed on unsubscribe** (1.486200021001423ms)
> Expected: 1...
```diff
Failure:
test_users_over_limit_are_removed_on_unsubscribe(Minitest::Result)
/home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:106:
Expected: 1
Actual: 2
################[ Failure ]################
103 |
104 | base_subscription_service.deactivate!
105 |
106 > assert_equal 1, company.active_users.count
107 | assert_equal company.owner.id, company.active_users.first.id
108 | end
109 |
Expected false to be truthy.
Failure: test_should_deactivate_users_and_reinvite(Minitest::Result) /home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:73: Expected false to be truthy.
################[ Failure ]################ 70 | company.deactivate_extra_users 71 | echo company.activeusers.pluck(:email) 72 | 73 > assert user2.permissions.count.zero? 74 | 75 | (company.active_users.length).must_equal 3 76 |
---
π΄ FAILED π΄ | |
---|---|
Tests | βοΈ 710 tests run |
Summary | π΄ 13 failed; π’ 697 passed; π‘ 0 skipped |
Duration | π 0.202s |
Testomat.io Report | π Run #f30e943d |
Expected nil to be truthy.
Failure: test_analytics_is_not_accessible_without_Enterprise_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/api/analytics_controller_test.rb:20: Expected nil to be truthy.
################[ Failure ]################ 17 | get api_analytics_counters_path(project) 18 | echo @response.body 19 | json = JSON.parse @response.body, symbolize_names: true 20 > assert json[:error] 21 | end 22 | 23 | test 'load counters' do
---
#### π΄ Api::BranchesControllerTest **branches is not accessible without Enterprise subscription**
> Expected nil to be truthy.
```diff
Failure:
test_branches_is_not_accessible_without_Enterprise_subscription(Minitest::Result)
/home/davert/projects/testomatio/backend/test/integration/api/branches_controller_test.rb:18:
Expected nil to be truthy.
################[ Failure ]################
15 | get api_branches_path(project)
16 | echo @response.body
17 | json = JSON.parse @response.body, symbolize_names: true
18 > assert json[:error]
19 | end
20 |
21 | test 'should return all branches' do
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_not_active_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:92: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 89 | 90 | member2 = User.create name: 'dummy member', password: 'password', password_confirmation: 'password', email: 'member@user.com' 91 | 92 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! member2 } 93 | end 94 | 95 | test 'can invite if trial is enabled' do
---
#### π΄ CompanyTest **notify if custom subscription set**
> Expected: 2...
```diff
Failure:
test_should_notify_if_custom_subscription_set(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/company_test.rb:125:
Expected: 2
Actual: 4
################[ Failure ]################
122 | @company.save
123 |
124 | echo @company.active_users.pluck(:name)
125 > _(@company.active_users.count).must_equal 2
126 | echo @company.removed_users.pluck(:name)
127 | _(@company.removed_users.count).must_equal 2
128 |
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_new_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:74: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 71 | test 'can not invite new user' do 72 | @company.users_limit = 0 73 | 74 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! } 75 | end 76 | 77 | test 'can invite active user' do
---
#### π΄ Dispatch::ReportControllerTest **add test to report**
> Expected: 3...
```diff
Failure:
test_add_test_to_report(Minitest::Result)
/home/davert/projects/testomatio/backend/test/controllers/dispatch/report_controller_test.rb:91:
Expected: 3
Actual: 4
################[ Failure ]################
88 | }
89 | assert_response :bad_request
90 | echo @response.body
91 > _(run.testruns.count).must_equal 3
92 | end
93 |
94 | test 'create automated report with test runs' do
Expected false to be truthy.
Failure: test_should_sign_in_registering_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/oauth_test.rb:235: Expected false to be truthy.
################[ Failure ]################ 232 | _(user.name).must_equal 'davert' 233 | assert user.avatar.attached? 234 | assert user.isactive? 235 > assert TrialService.new(user).active? 236 | assert flash[:success] 237 | (flash[:success]).mustinclude 'Welcome to Testomat.io' 238 | (flash[:success]).must_include 'trial'
---
#### π΄ ProjectTest **it should not have subscription if user have no trial**
> Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
```diff
Failure:
test_it_should_not_have_subscription_if_user_have_no_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:17:
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################
14 | test 'it should not have subscription if user have no trial' do
15 | p.user = developer_record
16 | p.save
17 > assert_not p.subscription
18 | end
19 |
20 | test 'it should have subscription if user has trial' do
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
Failure: test_it_should_not_have_any_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:11: Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################ 8 | let(:p) { Project.create title: 'test1' } 9 | 10 | test 'it should not have any subscription' do 11 > assert_not p.subscription 12 | end 13 | 14 | test 'it should not have subscription if user have no trial' do
---
#### π΄ ProjectTest **it should have subscription if user has trial**
> Expected nil to be truthy.
```diff
Failure:
test_it_should_have_subscription_if_user_has_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:25:
Expected nil to be truthy.
################[ Failure ]################
22 | p.save
23 | TrialService.new(p.user).start
24 | assert p.subscription
25 > assert p.subscription.trial
26 | end
27 |
28 | test 'it should unlock project of same user after deleting one' do
--- expected...
Failure: test_it_should_have_subscription_from_a_company(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:41: --- expected +++ actual @@ -1 +1 @@ -#<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> +#<Subscription id: 1, product_id: nil, title: "Professional", description: "For small and medium-sized businesses", price_monthly: 5, price_yearly: 10, features: ["Unlimited users", "Unlimited projects", "Test runs", "Notifications", "CI integrations"], users_limit: nil, created_at: "2022-12-01 00:56:25.535480000 +0000", updated_at: "2022-12-01 00:56:25.535480000 +0000", stripe_monthly_product_id: "price_1InguIG1zSfCnE1yU9yFnexH", stripe_yearly_product_id: "price_1InguIG1zSfCnE1yGrw9rRyn">
################[ Failure ]################ 38 | p.user = developer_record 39 | p.save 40 | assert p.subscription 41 > assert_equal p.subscription, Subscription.first 42 | end 43 | 44 | test 'should not fail if lang is nil' do
---
#### π΄ SubscriptionServiceTest **users over limit are removed on unsubscribe**
> Expected: 1...
```diff
Failure:
test_users_over_limit_are_removed_on_unsubscribe(Minitest::Result)
/home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:106:
Expected: 1
Actual: 2
################[ Failure ]################
103 |
104 | base_subscription_service.deactivate!
105 |
106 > assert_equal 1, company.active_users.count
107 | assert_equal company.owner.id, company.active_users.first.id
108 | end
109 |
Expected false to be truthy.
Failure: test_should_deactivate_users_and_reinvite(Minitest::Result) /home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:73: Expected false to be truthy.
################[ Failure ]################ 70 | company.deactivate_extra_users 71 | echo company.activeusers.pluck(:email) 72 | 73 > assert user2.permissions.count.zero? 74 | 75 | (company.active_users.length).must_equal 3 76 |
---
### Slowest Tests
* π’ ImportSpreadsheetServiceTest import testrail example project (225.2781139309991ms)
* π’ ImportSpreadsheetServiceTest import testrail project with steps duplicated column, merged to one and splitted rows (153.1975715339977ms)
* π’ ImportSpreadsheetServiceTest import zephyr project as bdd (140.43093283300186ms)
* π’ ImportSpreadsheetServiceTest import zephir X l s project (139.49491482699887ms)
* π’ ImportSpreadsheetServiceTest import zip file with attachments (63.05442242799836ms)
π΄ FAILED π΄ | |
---|---|
Tests | βοΈ 710 tests run |
Summary | π΄ 13 failed; π’ 697 passed; π‘ 0 skipped |
Duration | π 0.194s |
Testomat.io Report | π Run #c855bfb4 |
Expected nil to be truthy.
Failure: test_analytics_is_not_accessible_without_Enterprise_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/api/analytics_controller_test.rb:20: Expected nil to be truthy.
################[ Failure ]################ 17 | get api_analytics_counters_path(project) 18 | echo @response.body 19 | json = JSON.parse @response.body, symbolize_names: true 20 > assert json[:error] 21 | end 22 | 23 | test 'load counters' do
---
#### π΄ undefined
> Expected nil to be truthy.
```diff
Failure:
test_branches_is_not_accessible_without_Enterprise_subscription(Minitest::Result)
/home/davert/projects/testomatio/backend/test/integration/api/branches_controller_test.rb:18:
Expected nil to be truthy.
################[ Failure ]################
15 | get api_branches_path(project)
16 | echo @response.body
17 | json = JSON.parse @response.body, symbolize_names: true
18 > assert json[:error]
19 | end
20 |
21 | test 'should return all branches' do
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_not_active_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:92: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 89 | 90 | member2 = User.create name: 'dummy member', password: 'password', password_confirmation: 'password', email: 'member@user.com' 91 | 92 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! member2 } 93 | end 94 | 95 | test 'can invite if trial is enabled' do
---
#### π΄ undefined
> Expected: 2...
```diff
Failure:
test_should_notify_if_custom_subscription_set(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/company_test.rb:125:
Expected: 2
Actual: 4
################[ Failure ]################
122 | @company.save
123 |
124 | echo @company.active_users.pluck(:name)
125 > _(@company.active_users.count).must_equal 2
126 | echo @company.removed_users.pluck(:name)
127 | _(@company.removed_users.count).must_equal 2
128 |
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_new_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:74: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 71 | test 'can not invite new user' do 72 | @company.users_limit = 0 73 | 74 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! } 75 | end 76 | 77 | test 'can invite active user' do
---
#### π΄ undefined
> Expected: 3...
```diff
Failure:
test_add_test_to_report(Minitest::Result)
/home/davert/projects/testomatio/backend/test/controllers/dispatch/report_controller_test.rb:91:
Expected: 3
Actual: 4
################[ Failure ]################
88 | }
89 | assert_response :bad_request
90 | echo @response.body
91 > _(run.testruns.count).must_equal 3
92 | end
93 |
94 | test 'create automated report with test runs' do
Expected false to be truthy.
Failure: test_should_sign_in_registering_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/oauth_test.rb:235: Expected false to be truthy.
################[ Failure ]################ 232 | _(user.name).must_equal 'davert' 233 | assert user.avatar.attached? 234 | assert user.isactive? 235 > assert TrialService.new(user).active? 236 | assert flash[:success] 237 | (flash[:success]).mustinclude 'Welcome to Testomat.io' 238 | (flash[:success]).must_include 'trial'
---
#### π΄ undefined
> Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
```diff
Failure:
test_it_should_not_have_subscription_if_user_have_no_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:17:
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################
14 | test 'it should not have subscription if user have no trial' do
15 | p.user = developer_record
16 | p.save
17 > assert_not p.subscription
18 | end
19 |
20 | test 'it should have subscription if user has trial' do
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
Failure: test_it_should_not_have_any_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:11: Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################ 8 | let(:p) { Project.create title: 'test1' } 9 | 10 | test 'it should not have any subscription' do 11 > assert_not p.subscription 12 | end 13 | 14 | test 'it should not have subscription if user have no trial' do
---
#### π΄ undefined
> Expected nil to be truthy.
```diff
Failure:
test_it_should_have_subscription_if_user_has_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:25:
Expected nil to be truthy.
################[ Failure ]################
22 | p.save
23 | TrialService.new(p.user).start
24 | assert p.subscription
25 > assert p.subscription.trial
26 | end
27 |
28 | test 'it should unlock project of same user after deleting one' do
--- expected...
Failure: test_it_should_have_subscription_from_a_company(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:41: --- expected +++ actual @@ -1 +1 @@ -#<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> +#<Subscription id: 1, product_id: nil, title: "Professional", description: "For small and medium-sized businesses", price_monthly: 5, price_yearly: 10, features: ["Unlimited users", "Unlimited projects", "Test runs", "Notifications", "CI integrations"], users_limit: nil, created_at: "2022-12-01 00:56:25.535480000 +0000", updated_at: "2022-12-01 00:56:25.535480000 +0000", stripe_monthly_product_id: "price_1InguIG1zSfCnE1yU9yFnexH", stripe_yearly_product_id: "price_1InguIG1zSfCnE1yGrw9rRyn">
################[ Failure ]################ 38 | p.user = developer_record 39 | p.save 40 | assert p.subscription 41 > assert_equal p.subscription, Subscription.first 42 | end 43 | 44 | test 'should not fail if lang is nil' do
---
#### π΄ undefined
> Expected: 1...
```diff
Failure:
test_users_over_limit_are_removed_on_unsubscribe(Minitest::Result)
/home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:106:
Expected: 1
Actual: 2
################[ Failure ]################
103 |
104 | base_subscription_service.deactivate!
105 |
106 > assert_equal 1, company.active_users.count
107 | assert_equal company.owner.id, company.active_users.first.id
108 | end
109 |
Expected false to be truthy.
Failure: test_should_deactivate_users_and_reinvite(Minitest::Result) /home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:73: Expected false to be truthy.
################[ Failure ]################ 70 | company.deactivate_extra_users 71 | echo company.activeusers.pluck(:email) 72 | 73 > assert user2.permissions.count.zero? 74 | 75 | (company.active_users.length).must_equal 3 76 |
---
### Slowest Tests
* π’ undefined (225.2781139309991ms)
* π’ undefined (153.1975715339977ms)
* π’ undefined (140.43093283300186ms)
* π’ undefined (139.49491482699887ms)
* π’ undefined (63.05442242799836ms)
π΄ FAILED π΄ | |
---|---|
Tests | βοΈ 710 tests run |
Summary | π΄ 13 failed; π’ 697 passed; π‘ 0 skipped |
Duration | π 0.189s |
Testomat.io Report | π Run #99a3c472 |
Expected nil to be truthy.
Failure: test_analytics_is_not_accessible_without_Enterprise_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/api/analytics_controller_test.rb:20: Expected nil to be truthy.
################[ Failure ]################ 17 | get api_analytics_counters_path(project) 18 | echo @response.body 19 | json = JSON.parse @response.body, symbolize_names: true 20 > assert json[:error] 21 | end 22 | 23 | test 'load counters' do
---
#### π΄ Api::BranchesControllerTest: **branches is not accessible without Enterprise subscription**
> Expected nil to be truthy.
```diff
Failure:
test_branches_is_not_accessible_without_Enterprise_subscription(Minitest::Result)
/home/davert/projects/testomatio/backend/test/integration/api/branches_controller_test.rb:18:
Expected nil to be truthy.
################[ Failure ]################
15 | get api_branches_path(project)
16 | echo @response.body
17 | json = JSON.parse @response.body, symbolize_names: true
18 > assert json[:error]
19 | end
20 |
21 | test 'should return all branches' do
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_not_active_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:92: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 89 | 90 | member2 = User.create name: 'dummy member', password: 'password', password_confirmation: 'password', email: 'member@user.com' 91 | 92 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! member2 } 93 | end 94 | 95 | test 'can invite if trial is enabled' do
---
#### π΄ CompanyTest: **notify if custom subscription set**
> Expected: 2...
```diff
Failure:
test_should_notify_if_custom_subscription_set(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/company_test.rb:125:
Expected: 2
Actual: 4
################[ Failure ]################
122 | @company.save
123 |
124 | echo @company.active_users.pluck(:name)
125 > _(@company.active_users.count).must_equal 2
126 | echo @company.removed_users.pluck(:name)
127 | _(@company.removed_users.count).must_equal 2
128 |
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_new_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:74: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 71 | test 'can not invite new user' do 72 | @company.users_limit = 0 73 | 74 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! } 75 | end 76 | 77 | test 'can invite active user' do
---
#### π΄ Dispatch::ReportControllerTest: **add test to report**
> Expected: 3...
```diff
Failure:
test_add_test_to_report(Minitest::Result)
/home/davert/projects/testomatio/backend/test/controllers/dispatch/report_controller_test.rb:91:
Expected: 3
Actual: 4
################[ Failure ]################
88 | }
89 | assert_response :bad_request
90 | echo @response.body
91 > _(run.testruns.count).must_equal 3
92 | end
93 |
94 | test 'create automated report with test runs' do
Expected false to be truthy.
Failure: test_should_sign_in_registering_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/oauth_test.rb:235: Expected false to be truthy.
################[ Failure ]################ 232 | _(user.name).must_equal 'davert' 233 | assert user.avatar.attached? 234 | assert user.isactive? 235 > assert TrialService.new(user).active? 236 | assert flash[:success] 237 | (flash[:success]).mustinclude 'Welcome to Testomat.io' 238 | (flash[:success]).must_include 'trial'
---
#### π΄ ProjectTest: **it should not have subscription if user have no trial**
> Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
```diff
Failure:
test_it_should_not_have_subscription_if_user_have_no_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:17:
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################
14 | test 'it should not have subscription if user have no trial' do
15 | p.user = developer_record
16 | p.save
17 > assert_not p.subscription
18 | end
19 |
20 | test 'it should have subscription if user has trial' do
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
Failure: test_it_should_not_have_any_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:11: Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################ 8 | let(:p) { Project.create title: 'test1' } 9 | 10 | test 'it should not have any subscription' do 11 > assert_not p.subscription 12 | end 13 | 14 | test 'it should not have subscription if user have no trial' do
---
#### π΄ ProjectTest: **it should have subscription if user has trial**
> Expected nil to be truthy.
```diff
Failure:
test_it_should_have_subscription_if_user_has_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:25:
Expected nil to be truthy.
################[ Failure ]################
22 | p.save
23 | TrialService.new(p.user).start
24 | assert p.subscription
25 > assert p.subscription.trial
26 | end
27 |
28 | test 'it should unlock project of same user after deleting one' do
--- expected...
Failure: test_it_should_have_subscription_from_a_company(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:41: --- expected +++ actual @@ -1 +1 @@ -#<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> +#<Subscription id: 1, product_id: nil, title: "Professional", description: "For small and medium-sized businesses", price_monthly: 5, price_yearly: 10, features: ["Unlimited users", "Unlimited projects", "Test runs", "Notifications", "CI integrations"], users_limit: nil, created_at: "2022-12-01 00:56:25.535480000 +0000", updated_at: "2022-12-01 00:56:25.535480000 +0000", stripe_monthly_product_id: "price_1InguIG1zSfCnE1yU9yFnexH", stripe_yearly_product_id: "price_1InguIG1zSfCnE1yGrw9rRyn">
################[ Failure ]################ 38 | p.user = developer_record 39 | p.save 40 | assert p.subscription 41 > assert_equal p.subscription, Subscription.first 42 | end 43 | 44 | test 'should not fail if lang is nil' do
---
#### π΄ SubscriptionServiceTest: **users over limit are removed on unsubscribe**
> Expected: 1...
```diff
Failure:
test_users_over_limit_are_removed_on_unsubscribe(Minitest::Result)
/home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:106:
Expected: 1
Actual: 2
################[ Failure ]################
103 |
104 | base_subscription_service.deactivate!
105 |
106 > assert_equal 1, company.active_users.count
107 | assert_equal company.owner.id, company.active_users.first.id
108 | end
109 |
Expected false to be truthy.
Failure: test_should_deactivate_users_and_reinvite(Minitest::Result) /home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:73: Expected false to be truthy.
################[ Failure ]################ 70 | company.deactivate_extra_users 71 | echo company.activeusers.pluck(:email) 72 | 73 > assert user2.permissions.count.zero? 74 | 75 | (company.active_users.length).must_equal 3 76 |
---
### Slowest Tests
* π’ ImportSpreadsheetServiceTest: **import testrail example project** (225.2781139309991ms)
* π’ ImportSpreadsheetServiceTest: **import testrail project with steps duplicated column, merged to one and splitted rows** (153.1975715339977ms)
* π’ ImportSpreadsheetServiceTest: **import zephyr project as bdd** (140.43093283300186ms)
* π’ ImportSpreadsheetServiceTest: **import zephir X l s project** (139.49491482699887ms)
* π’ ImportSpreadsheetServiceTest: **import zip file with attachments** (63.05442242799836ms)
π΄ FAILED π΄ | |
---|---|
Tests | βοΈ 710 tests run |
Summary | π΄ 13 failed; π’ 697 passed; π‘ 0 skipped |
Duration | π 0.199s |
Testomat.io Report | π Run #87895034 |
Expected nil to be truthy.
Failure: test_analytics_is_not_accessible_without_Enterprise_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/api/analytics_controller_test.rb:20: Expected nil to be truthy.
################[ Failure ]################ 17 | get api_analytics_counters_path(project) 18 | echo @response.body 19 | json = JSON.parse @response.body, symbolize_names: true 20 > assert json[:error] 21 | end 22 | 23 | test 'load counters' do
---
#### π΄ Api::BranchesControllerTest: **branches is not accessible without Enterprise subscription**
> Expected nil to be truthy.
```diff
Failure:
test_branches_is_not_accessible_without_Enterprise_subscription(Minitest::Result)
/home/davert/projects/testomatio/backend/test/integration/api/branches_controller_test.rb:18:
Expected nil to be truthy.
################[ Failure ]################
15 | get api_branches_path(project)
16 | echo @response.body
17 | json = JSON.parse @response.body, symbolize_names: true
18 > assert json[:error]
19 | end
20 |
21 | test 'should return all branches' do
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_not_active_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:92: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 89 | 90 | member2 = User.create name: 'dummy member', password: 'password', password_confirmation: 'password', email: 'member@user.com' 91 | 92 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! member2 } 93 | end 94 | 95 | test 'can invite if trial is enabled' do
---
#### π΄ CompanyTest: **notify if custom subscription set**
> Expected: 2...
```diff
Failure:
test_should_notify_if_custom_subscription_set(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/company_test.rb:125:
Expected: 2
Actual: 4
################[ Failure ]################
122 | @company.save
123 |
124 | echo @company.active_users.pluck(:name)
125 > _(@company.active_users.count).must_equal 2
126 | echo @company.removed_users.pluck(:name)
127 | _(@company.removed_users.count).must_equal 2
128 |
Exceptions::LimitReachedError expected but nothing was raised.
Failure: test_can_not_invite_new_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/company_test.rb:74: Exceptions::LimitReachedError expected but nothing was raised.
################[ Failure ]################ 71 | test 'can not invite new user' do 72 | @company.users_limit = 0 73 | 74 > assert_raises(Exceptions::LimitReachedError) { @company.can_invite! } 75 | end 76 | 77 | test 'can invite active user' do
---
#### π΄ Dispatch::ReportControllerTest: **add test to report**
> Expected: 3...
```diff
Failure:
test_add_test_to_report(Minitest::Result)
/home/davert/projects/testomatio/backend/test/controllers/dispatch/report_controller_test.rb:91:
Expected: 3
Actual: 4
################[ Failure ]################
88 | }
89 | assert_response :bad_request
90 | echo @response.body
91 > _(run.testruns.count).must_equal 3
92 | end
93 |
94 | test 'create automated report with test runs' do
Expected false to be truthy.
Failure: test_should_sign_in_registering_user(Minitest::Result) /home/davert/projects/testomatio/backend/test/integration/oauth_test.rb:235: Expected false to be truthy.
################[ Failure ]################ 232 | _(user.name).must_equal 'davert' 233 | assert user.avatar.attached? 234 | assert user.isactive? 235 > assert TrialService.new(user).active? 236 | assert flash[:success] 237 | (flash[:success]).mustinclude 'Welcome to Testomat.io' 238 | (flash[:success]).must_include 'trial'
---
#### π΄ ProjectTest: **it should not have subscription if user have no trial**
> Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
```diff
Failure:
test_it_should_not_have_subscription_if_user_have_no_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:17:
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################
14 | test 'it should not have subscription if user have no trial' do
15 | p.user = developer_record
16 | p.save
17 > assert_not p.subscription
18 | end
19 |
20 | test 'it should have subscription if user has trial' do
Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
Failure: test_it_should_not_have_any_subscription(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:11: Expected #<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> to be nil or false
################[ Failure ]################ 8 | let(:p) { Project.create title: 'test1' } 9 | 10 | test 'it should not have any subscription' do 11 > assert_not p.subscription 12 | end 13 | 14 | test 'it should not have subscription if user have no trial' do
---
#### π΄ ProjectTest: **it should have subscription if user has trial**
> Expected nil to be truthy.
```diff
Failure:
test_it_should_have_subscription_if_user_has_trial(Minitest::Result)
/home/davert/projects/testomatio/backend/test/models/project_test.rb:25:
Expected nil to be truthy.
################[ Failure ]################
22 | p.save
23 | TrialService.new(p.user).start
24 | assert p.subscription
25 > assert p.subscription.trial
26 | end
27 |
28 | test 'it should unlock project of same user after deleting one' do
--- expected...
Failure: test_it_should_have_subscription_from_a_company(Minitest::Result) /home/davert/projects/testomatio/backend/test/models/project_test.rb:41: --- expected +++ actual @@ -1 +1 @@ -#<Subscription id: nil, product_id: nil, title: "enterprise", description: nil, price_monthly: nil, price_yearly: nil, features: nil, users_limit: nil, created_at: nil, updated_at: nil, stripe_monthly_product_id: nil, stripe_yearly_product_id: nil> +#<Subscription id: 1, product_id: nil, title: "Professional", description: "For small and medium-sized businesses", price_monthly: 5, price_yearly: 10, features: ["Unlimited users", "Unlimited projects", "Test runs", "Notifications", "CI integrations"], users_limit: nil, created_at: "2022-12-01 00:56:25.535480000 +0000", updated_at: "2022-12-01 00:56:25.535480000 +0000", stripe_monthly_product_id: "price_1InguIG1zSfCnE1yU9yFnexH", stripe_yearly_product_id: "price_1InguIG1zSfCnE1yGrw9rRyn">
################[ Failure ]################ 38 | p.user = developer_record 39 | p.save 40 | assert p.subscription 41 > assert_equal p.subscription, Subscription.first 42 | end 43 | 44 | test 'should not fail if lang is nil' do
---
#### π΄ SubscriptionServiceTest: **users over limit are removed on unsubscribe**
> Expected: 1...
```diff
Failure:
test_users_over_limit_are_removed_on_unsubscribe(Minitest::Result)
/home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:106:
Expected: 1
Actual: 2
################[ Failure ]################
103 |
104 | base_subscription_service.deactivate!
105 |
106 > assert_equal 1, company.active_users.count
107 | assert_equal company.owner.id, company.active_users.first.id
108 | end
109 |
Expected false to be truthy.
Failure: test_should_deactivate_users_and_reinvite(Minitest::Result) /home/davert/projects/testomatio/backend/test/services/subscription_service_test.rb:73: Expected false to be truthy.
################[ Failure ]################ 70 | company.deactivate_extra_users 71 | echo company.activeusers.pluck(:email) 72 | 73 > assert user2.permissions.count.zero? 74 | 75 | (company.active_users.length).must_equal 3 76 |
---
### π’ Slowest Tests
* ImportSpreadsheetServiceTest: **import testrail example project** (225.2781139309991ms)
* ImportSpreadsheetServiceTest: **import testrail project with steps duplicated column, merged to one and splitted rows** (153.1975715339977ms)
* ImportSpreadsheetServiceTest: **import zephyr project as bdd** (140.43093283300186ms)
* ImportSpreadsheetServiceTest: **import zephir X l s project** (139.49491482699887ms)
* ImportSpreadsheetServiceTest: **import zip file with attachments** (63.05442242799836ms)
asdsad
π Linked to Test 'ut erat curabitur gravida nisi at nibh in hac' in Testomat.io