`seeNumberOfElements()` doesn't count <input>s with Bootstrap's `.custom-control-input` class
還沒有人認領這個 Issue。
評估
研究方向
使用 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
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Codeception/module-webdriver 的其他 Issue
-
難度 5/5 一週以上 新手友好度 35/100
Codeception/module-webdriver#151 · 1 則留言 ·
-
難度 4/5 3-5 天 新手友好度 25/100
Codeception/module-webdriver#135 ·
-
難度 2/5 1-3 小時 新手友好度 38/100
Codeception/module-webdriver#130 ·
-
難度 3/5 1-2 天 新手友好度 35/100
Codeception/module-webdriver#128 ·
-
難度 2/5 1-3 小時 新手友好度 45/100
Codeception/module-webdriver#126 ·
查看 Codeception/module-webdriver 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
doctrine/collections#554 · 1 個 reaction ·
-
documentation
難度 2/5 1-2 天 新手友好度 72/100
components-web-app/docs#97 ·
-
難度 1/5 1-3 小時 新手友好度 88/100
WordPress/Documentation-Issue-Tracker#2513 · 2 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 72/100
bagisto/b2b-ecommerce#55 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
octobercms/october#6132 ·