Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Знакомство с тестированием. Ошибка при запуске codecept run functional functional\InterviewCept.php #22

Open
dye491 opened this issue Aug 1, 2016 · 0 comments
Labels

Comments

@dye491
Copy link

dye491 commented Aug 1, 2016

Добрый день,

У меня функциональный тест выполняется с ошибками, вот скриншот вывода команды
codecept run functional functional\InterviewCept.php:

Codeception PHP Testing Framework v2.2.3
Powered by PHPUnit 5.4.8 by Sebastian Bergmann and contributors.

�[1mTests\codeception\frontend.functional Tests (1) �[22m------------
## �[31;1mE�[39;22m �[35;1mInterviewCept:�[39;22m Be sure that the page with the form of "interrogation" works. �[32m(0.21s)�[39m

1) �[35;1mInterviewCept:�[39;22m Be sure that the page with the form of "interrogation" works.
�[37;41;1m Test �[39;49;22m functional\InterviewCept.php
�[37;41;1m                                                                                                                                     �[39;49;22m
�[37;41;1m  [LogicException] A ChoiceFormField can only be created from an input tag with a type of checkbox or radio (given type is hidden).  �[39;49;22m
�[37;41;1m                                                                                                                                     �[39;49;22m
�[33m
Scenario Steps:
�[39m
�[1m 18. $I->selectOption("[name="Interview[sex]"]","1")�[22m
1. $I->fillField("input[name="Interview[name]"]","Иванов")
2. // I am going to отправить форму c корректными данными
3. $I->see("Проверочный код введён неве...",".help-block")
4. // I expect to увидеть ошибки валидации каптчи
5. $I->click("interview-submit")
#1  C:\var\www\codecept\vendor\symfony\dom-crawler\Field\FormField.php:57
#2  Codeception\Lib\InnerBrowser->selectOption
#3  C:\var\www\yii2-tutorial\yii2-app-advanced\tests\codeception\frontend_support_generated\FunctionalTesterActions.php:2140
#4  C:\var\www\yii2-tutorial\yii2-app-advanced\tests\codeception\frontend_pages\InterviewPage.php:30
#5  C:\var\www\yii2-tutorial\yii2-app-advanced\tests\codeception\frontend\functional\InterviewCept.php:38

Time: 830 ms, Memory: 16.75MB

There was 1 error:

---

�[37;41mERRORS!�[0m
�[37;41mTests: 1�[0m�[37;41m, Assertions: 6�[0m�[37;41m, Errors: 1�[0m�[37;41m.�[0m

В чем может быть причина?
Я подозреваю, что из-за того, что в html-коде страницы поля с именами Interview[sex], Interview[planets], Interview[astronauts], Interview[planet] пристутствуют дважды - одно типа hidden, а другое radio или checkbox или dropdown.

Это можно побороть?

@githubjeka githubjeka added the bug label Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants