@@ 1826-1846 (lines=21) @@ | ||
1823 | } |
|
1824 | } |
|
1825 | ||
1826 | public function seeOptionIsSelected($selector, $optionText) |
|
1827 | { |
|
1828 | $el = $this->findField($selector); |
|
1829 | if ($el->getTagName() !== 'select') { |
|
1830 | $els = $this->matchCheckables($selector); |
|
1831 | foreach ($els as $k => $el) { |
|
1832 | $els[$k] = $this->findCheckable($el, $optionText, true); |
|
1833 | } |
|
1834 | $this->assertNotEmpty( |
|
1835 | array_filter( |
|
1836 | $els, |
|
1837 | function ($e) { |
|
1838 | return $e && $e->isSelected(); |
|
1839 | } |
|
1840 | ) |
|
1841 | ); |
|
1842 | return; |
|
1843 | } |
|
1844 | $select = new WebDriverSelect($el); |
|
1845 | $this->assertNodesContain($optionText, $select->getAllSelectedOptions(), 'option'); |
|
1846 | } |
|
1847 | ||
1848 | public function dontSeeOptionIsSelected($selector, $optionText) |
|
1849 | { |
|
@@ 1848-1868 (lines=21) @@ | ||
1845 | $this->assertNodesContain($optionText, $select->getAllSelectedOptions(), 'option'); |
|
1846 | } |
|
1847 | ||
1848 | public function dontSeeOptionIsSelected($selector, $optionText) |
|
1849 | { |
|
1850 | $el = $this->findField($selector); |
|
1851 | if ($el->getTagName() !== 'select') { |
|
1852 | $els = $this->matchCheckables($selector); |
|
1853 | foreach ($els as $k => $el) { |
|
1854 | $els[$k] = $this->findCheckable($el, $optionText, true); |
|
1855 | } |
|
1856 | $this->assertEmpty( |
|
1857 | array_filter( |
|
1858 | $els, |
|
1859 | function ($e) { |
|
1860 | return $e && $e->isSelected(); |
|
1861 | } |
|
1862 | ) |
|
1863 | ); |
|
1864 | return; |
|
1865 | } |
|
1866 | $select = new WebDriverSelect($el); |
|
1867 | $this->assertNodesNotContain($optionText, $select->getAllSelectedOptions(), 'option'); |
|
1868 | } |
|
1869 | ||
1870 | public function seeInTitle($title) |
|
1871 | { |