Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`seeNumberOfElements()` doesn't count <input>s with Bootstrap's `.custom-control-input` class

オープン
#22 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
php
領域
testing

調査の方向性

seeNumberOfElements() を使用して Bootstrap のカスタムラジオの例を再現し、seeNumberOfElementsInDOM() と比較します。次に、これらのメソッドの実装と、関連する acceptance.suite.yml の設定を見つけます。.custom-control-input 要素に対する意図した可視性の動作が定義され、通常の要素数を壊さずに回帰テストでカバーされていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Next problem with Bootstrap custom radio button after https://github.com/Codeception/module-webdriver/issues/21

seeNumberOfElements() doesn't count those radiobuttons:

<input type="radio" class="custom-control-input">

This is probably because of z-index:-1 in Bootstrap's CSS:

.custom-control-input{position:absolute;left:0;z-index:-1;width:1rem;height:1.22rem;opacity:0}

Background: When using Bootstrap's custom radiobuttons, the standard browser widget is replaced by some other widget (SVG?) for nicer graphics.

I'm filing this here mainly to see if somebody else encounters it. A possible solution could be to set a configuration parameter in acceptance.suite.yml to switch the concerned methods' behavior to be compatible with Bootstrap.

In my case I can't look at the page's source code (what I'm guessing that e.g. seeNumberOfElementsInDOM() is doing), since I'm showing/hiding some radiobuttons with JavaScript, and I need to assert their visibility. My workaround: Count the labels instead:

$I->seeNumberOfElements(['css' => 'div#foobar label'], 7);
主要言語
PHP
スター
39
フォーク
25
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Codeception/module-webdriver のほかの issue

Codeception/module-webdriver の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。