@@ -89,45 +89,45 @@ def _not(self) -> "PageAssertions":
8989 )
9090
9191 async def to_have_title (
92- self , title_or_reg_exp : Union [Pattern [str ], str ], timeout : float = None
92+ self , titleOrRegExp : Union [Pattern [str ], str ], timeout : float = None
9393 ) -> None :
9494 expected_values = to_expected_text_values (
95- [title_or_reg_exp ], normalize_white_space = True
95+ [titleOrRegExp ], normalize_white_space = True
9696 )
9797 __tracebackhide__ = True
9898 await self ._expect_impl (
9999 "to.have.title" ,
100100 FrameExpectOptions (expectedText = expected_values , timeout = timeout ),
101- title_or_reg_exp ,
101+ titleOrRegExp ,
102102 "Page title expected to be" ,
103103 )
104104
105105 async def not_to_have_title (
106- self , title_or_reg_exp : Union [Pattern [str ], str ], timeout : float = None
106+ self , titleOrRegExp : Union [Pattern [str ], str ], timeout : float = None
107107 ) -> None :
108108 __tracebackhide__ = True
109- await self ._not .to_have_title (title_or_reg_exp , timeout )
109+ await self ._not .to_have_title (titleOrRegExp , timeout )
110110
111111 async def to_have_url (
112- self , url_or_reg_exp : Union [str , Pattern [str ]], timeout : float = None
112+ self , urlOrRegExp : Union [str , Pattern [str ]], timeout : float = None
113113 ) -> None :
114114 __tracebackhide__ = True
115115 base_url = self ._actual_page .context ._options .get ("baseURL" )
116- if isinstance (url_or_reg_exp , str ) and base_url :
117- url_or_reg_exp = urljoin (base_url , url_or_reg_exp )
118- expected_text = to_expected_text_values ([url_or_reg_exp ])
116+ if isinstance (urlOrRegExp , str ) and base_url :
117+ urlOrRegExp = urljoin (base_url , urlOrRegExp )
118+ expected_text = to_expected_text_values ([urlOrRegExp ])
119119 await self ._expect_impl (
120120 "to.have.url" ,
121121 FrameExpectOptions (expectedText = expected_text , timeout = timeout ),
122- url_or_reg_exp ,
122+ urlOrRegExp ,
123123 "Page URL expected to be" ,
124124 )
125125
126126 async def not_to_have_url (
127- self , url_or_reg_exp : Union [Pattern [str ], str ], timeout : float = None
127+ self , urlOrRegExp : Union [Pattern [str ], str ], timeout : float = None
128128 ) -> None :
129129 __tracebackhide__ = True
130- await self ._not .to_have_url (url_or_reg_exp , timeout )
130+ await self ._not .to_have_url (urlOrRegExp , timeout )
131131
132132
133133class LocatorAssertions (AssertionsBase ):
@@ -156,9 +156,9 @@ async def to_contain_text(
156156 Pattern [str ],
157157 str ,
158158 ],
159- use_inner_text : bool = None ,
159+ useInnerText : bool = None ,
160160 timeout : float = None ,
161- ignore_case : bool = None ,
161+ ignoreCase : bool = None ,
162162 ) -> None :
163163 __tracebackhide__ = True
164164 if isinstance (expected , collections .abc .Sequence ) and not isinstance (
@@ -168,13 +168,13 @@ async def to_contain_text(
168168 expected ,
169169 match_substring = True ,
170170 normalize_white_space = True ,
171- ignore_case = ignore_case ,
171+ ignoreCase = ignoreCase ,
172172 )
173173 await self ._expect_impl (
174174 "to.contain.text.array" ,
175175 FrameExpectOptions (
176176 expectedText = expected_text ,
177- useInnerText = use_inner_text ,
177+ useInnerText = useInnerText ,
178178 timeout = timeout ,
179179 ),
180180 expected ,
@@ -185,13 +185,13 @@ async def to_contain_text(
185185 [expected ],
186186 match_substring = True ,
187187 normalize_white_space = True ,
188- ignore_case = ignore_case ,
188+ ignoreCase = ignoreCase ,
189189 )
190190 await self ._expect_impl (
191191 "to.have.text" ,
192192 FrameExpectOptions (
193193 expectedText = expected_text ,
194- useInnerText = use_inner_text ,
194+ useInnerText = useInnerText ,
195195 timeout = timeout ,
196196 ),
197197 expected ,
@@ -207,22 +207,22 @@ async def not_to_contain_text(
207207 Pattern [str ],
208208 str ,
209209 ],
210- use_inner_text : bool = None ,
210+ useInnerText : bool = None ,
211211 timeout : float = None ,
212- ignore_case : bool = None ,
212+ ignoreCase : bool = None ,
213213 ) -> None :
214214 __tracebackhide__ = True
215- await self ._not .to_contain_text (expected , use_inner_text , timeout , ignore_case )
215+ await self ._not .to_contain_text (expected , useInnerText , timeout , ignoreCase )
216216
217217 async def to_have_attribute (
218218 self ,
219219 name : str ,
220220 value : Union [str , Pattern [str ]],
221- ignore_case : bool = None ,
221+ ignoreCase : bool = None ,
222222 timeout : float = None ,
223223 ) -> None :
224224 __tracebackhide__ = True
225- expected_text = to_expected_text_values ([value ], ignore_case = ignore_case )
225+ expected_text = to_expected_text_values ([value ], ignoreCase = ignoreCase )
226226 await self ._expect_impl (
227227 "to.have.attribute.value" ,
228228 FrameExpectOptions (
@@ -236,12 +236,12 @@ async def not_to_have_attribute(
236236 self ,
237237 name : str ,
238238 value : Union [str , Pattern [str ]],
239- ignore_case : bool = None ,
239+ ignoreCase : bool = None ,
240240 timeout : float = None ,
241241 ) -> None :
242242 __tracebackhide__ = True
243243 await self ._not .to_have_attribute (
244- name , value , ignore_case = ignore_case , timeout = timeout
244+ name , value , ignoreCase = ignoreCase , timeout = timeout
245245 )
246246
247247 async def to_have_class (
@@ -440,9 +440,9 @@ async def to_have_text(
440440 Pattern [str ],
441441 str ,
442442 ],
443- use_inner_text : bool = None ,
443+ useInnerText : bool = None ,
444444 timeout : float = None ,
445- ignore_case : bool = None ,
445+ ignoreCase : bool = None ,
446446 ) -> None :
447447 __tracebackhide__ = True
448448 if isinstance (expected , collections .abc .Sequence ) and not isinstance (
@@ -451,27 +451,27 @@ async def to_have_text(
451451 expected_text = to_expected_text_values (
452452 expected ,
453453 normalize_white_space = True ,
454- ignore_case = ignore_case ,
454+ ignoreCase = ignoreCase ,
455455 )
456456 await self ._expect_impl (
457457 "to.have.text.array" ,
458458 FrameExpectOptions (
459459 expectedText = expected_text ,
460- useInnerText = use_inner_text ,
460+ useInnerText = useInnerText ,
461461 timeout = timeout ,
462462 ),
463463 expected ,
464464 "Locator expected to have text" ,
465465 )
466466 else :
467467 expected_text = to_expected_text_values (
468- [expected ], normalize_white_space = True , ignore_case = ignore_case
468+ [expected ], normalize_white_space = True , ignoreCase = ignoreCase
469469 )
470470 await self ._expect_impl (
471471 "to.have.text" ,
472472 FrameExpectOptions (
473473 expectedText = expected_text ,
474- useInnerText = use_inner_text ,
474+ useInnerText = useInnerText ,
475475 timeout = timeout ,
476476 ),
477477 expected ,
@@ -487,12 +487,12 @@ async def not_to_have_text(
487487 Pattern [str ],
488488 str ,
489489 ],
490- use_inner_text : bool = None ,
490+ useInnerText : bool = None ,
491491 timeout : float = None ,
492- ignore_case : bool = None ,
492+ ignoreCase : bool = None ,
493493 ) -> None :
494494 __tracebackhide__ = True
495- await self ._not .to_have_text (expected , use_inner_text , timeout , ignore_case )
495+ await self ._not .to_have_text (expected , useInnerText , timeout , ignoreCase )
496496
497497 async def to_be_attached (
498498 self ,
@@ -754,14 +754,14 @@ def expected_regex(
754754 pattern : Pattern [str ],
755755 match_substring : bool ,
756756 normalize_white_space : bool ,
757- ignore_case : Optional [bool ] = None ,
757+ ignoreCase : Optional [bool ] = None ,
758758) -> ExpectedTextValue :
759759 expected = ExpectedTextValue (
760760 regexSource = pattern .pattern ,
761761 regexFlags = escape_regex_flags (pattern ),
762762 matchSubstring = match_substring ,
763763 normalizeWhiteSpace = normalize_white_space ,
764- ignoreCase = ignore_case ,
764+ ignoreCase = ignoreCase ,
765765 )
766766 if expected ["ignoreCase" ] is None :
767767 del expected ["ignoreCase" ]
@@ -774,7 +774,7 @@ def to_expected_text_values(
774774 ],
775775 match_substring : bool = False ,
776776 normalize_white_space : bool = False ,
777- ignore_case : Optional [bool ] = None ,
777+ ignoreCase : Optional [bool ] = None ,
778778) -> Sequence [ExpectedTextValue ]:
779779 out : List [ExpectedTextValue ] = []
780780 assert isinstance (items , list )
@@ -784,15 +784,13 @@ def to_expected_text_values(
784784 string = item ,
785785 matchSubstring = match_substring ,
786786 normalizeWhiteSpace = normalize_white_space ,
787- ignoreCase = ignore_case ,
787+ ignoreCase = ignoreCase ,
788788 )
789789 if o ["ignoreCase" ] is None :
790790 del o ["ignoreCase" ]
791791 out .append (o )
792792 elif isinstance (item , Pattern ):
793793 out .append (
794- expected_regex (
795- item , match_substring , normalize_white_space , ignore_case
796- )
794+ expected_regex (item , match_substring , normalize_white_space , ignoreCase )
797795 )
798796 return out
0 commit comments