Skip to content

Commit

Permalink
fixed overlapping edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Aayush Badoni authored and Aayush Badoni committed Mar 7, 2024
1 parent b1affee commit c0a7ce7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
git+https://github.com/PyAr/RunestoneComponents.git@master#runestone
pytest==6.2.4
playwright==1.13.1
playwright==1.11.2
pytest-playwright==0.1.1
pytest-html==3.1.1
pytest-vcr==1.0.2
28 changes: 0 additions & 28 deletions tests/test_TWP45.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,6 @@ def test_l45_1(page):

# Test the src attribute from image matches the Facebook URL
assert img_src == "https://graph.facebook.com/ACDC/picture?type=large"

@pytest.mark.vcr()
def test_reddit_activity(page):
# Go to TWP45_2 page
page.goto("lectures/TWP45/TWP45_2.html")

# Run the exercise
page.click("#ac_l45_2 >> *css=button >> text=Save & Run")

# Wait for the output iframe to load
page.wait_for_load_state("networkidle")

# Select the output iframe
iframe = page.query_selector(
'//*[@id="ac_l45_2"]/div/div[5]/iframe').content_frame()

# Get the Reddit titles and number of comments
titles = iframe.query_selector_all(".reddit-title")
num_comments = iframe.query_selector_all(".reddit-comments")

# Check if there are any visible Reddit titles and number of comments
assert len(titles) > 0, "No Reddit titles found. CORS issue detected."
assert len(num_comments) > 0, "No number of comments found. CORS issue detected."

# Check for any JavaScript errors in the console
console_errors = page.evaluate("() => window.errors")
assert not console_errors, f"JavaScript errors found: {console_errors}"


@pytest.mark.vcr()
def test_l45_3(page):
Expand Down

0 comments on commit c0a7ce7

Please sign in to comment.