Skip to content

Commit

Permalink
Small styling adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
elacuesta committed Dec 19, 2020
1 parent 294ba01 commit 01027cc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/test_playwright_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scrapy.utils.test import get_crawler

from scrapy_playwright.handler import ScrapyPlaywrightDownloadHandler
from scrapy_playwright.page import PageCoroutine
from scrapy_playwright.page import PageCoroutine as PageCoro

from tests.mockserver import PostMockServer, StaticMockServer

Expand Down Expand Up @@ -82,7 +82,7 @@ async def test_page_coroutine_navigation(self):
url=server.urljoin("/index.html"),
meta={
"playwright": True,
"playwright_page_coroutines": [PageCoroutine("click", "a.lorem_ipsum")],
"playwright_page_coroutines": [PageCoro("click", "a.lorem_ipsum")],
},
)
resp = await handler._download_request(req, Spider("foo"))
Expand Down Expand Up @@ -111,11 +111,11 @@ async def test_page_coroutine_infinite_scroll(self):
meta={
"playwright": True,
"playwright_page_coroutines": [
PageCoroutine("waitForSelector", selector="div.quote"),
PageCoroutine("evaluate", expression="window.scrollBy(0, document.body.scrollHeight)"),
PageCoroutine("waitForSelector", selector="div.quote:nth-child(11)"),
PageCoroutine("evaluate", expression="window.scrollBy(0, document.body.scrollHeight)"),
PageCoroutine("waitForSelector", selector="div.quote:nth-child(21)"),
PageCoro("waitForSelector", selector="div.quote"),
PageCoro("evaluate", "window.scrollBy(0, document.body.scrollHeight)"),
PageCoro("waitForSelector", selector="div.quote:nth-child(11)"),
PageCoro("evaluate", "window.scrollBy(0, document.body.scrollHeight)"),
PageCoro("waitForSelector", selector="div.quote:nth-child(21)"),
],
},
)
Expand Down Expand Up @@ -144,7 +144,7 @@ async def test_page_coroutine_screenshot(self):
meta={
"playwright": True,
"playwright_page_coroutines": {
"png": PageCoroutine("screenshot", path=png_file.name, type="png"),
"png": PageCoro("screenshot", path=png_file.name, type="png"),
},
},
)
Expand Down Expand Up @@ -176,7 +176,7 @@ async def test_page_coroutine_pdf(self):
meta={
"playwright": True,
"playwright_page_coroutines": {
"pdf": PageCoroutine("pdf", path=pdf_file.name),
"pdf": PageCoro("pdf", path=pdf_file.name),
},
},
)
Expand Down

0 comments on commit 01027cc

Please sign in to comment.