(self, page)
| 299 | return post.date.weekday() == 4 |
| 300 | |
| 301 | def login(self, page) -> None: |
| 302 | page.goto(self.LOGIN_URL, wait_until="domcontentloaded") |
| 303 | _find_first(page, self.USER_SELECTORS).fill(os.environ["FOOJAY_USER"]) |
| 304 | _find_first(page, self.PASSWORD_SELECTORS).fill(os.environ["FOOJAY_PASSWORD"]) |
| 305 | _find_first(page, self.SUBMIT_SELECTORS).click() |
| 306 | try: |
| 307 | page.wait_for_url("**/wp-admin/**", timeout=90000) |
| 308 | except Exception: # noqa: BLE001 |
| 309 | page.wait_for_selector("#wpadminbar", timeout=30000) |
| 310 | |
| 311 | def submit_draft(self, page, ctx: AdapterContext) -> dict[str, Any]: |
| 312 | # Land on wp-admin so wpApiSettings (which carries the nonce) is in scope. |
no test coverage detected