-
Notifications
You must be signed in to change notification settings - Fork 53
Vimeo fix #1900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
djamg
wants to merge
16
commits into
main
Choose a base branch
from
vimeo-fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Vimeo fix #1900
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
12d3c96
Modified regex in embedvideo.js to accommodate 'h' parameter
djamg a0aafbf
Allowed vimeo subdomain
djamg eab1da0
Used named patterns instead of numbers
djamg 4943b06
updated regex
djamg 8bf5efe
Merge branch 'main' into vimeo-fix
djamg c70083c
Update embedvideo.js
djamg 2285ccb
Merge branch 'main' into vimeo-fix
djamg f368fcf
Merge branch 'main' into vimeo-fix
djamg 240c4cc
Added playwright test for livestream url
djamg 14096fa
Simplify regex
310cd46
Merge branch 'vimeo-fix' of https://github.com/hasgeek/funnel into vi…
973c96b
Fix pytestmark
djamg eb10a7a
Enable pytest socket to all the tests using live_server fixture
djamg 722ed0c
Added private vimeo link
djamg bfaa605
Updated from main
djamg c69865c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
"""Test livestream urls.""" | ||
|
||
from playwright.sync_api import Page, expect | ||
|
||
from funnel import models | ||
|
||
from ...conftest import scoped_session | ||
|
||
VETINARI_EMAIL = 'vetinari@example.org' | ||
VETINARI_PASSWORD = 've@pwd3289' # nosec | ||
|
||
|
||
def wait_until_recaptcha_loaded(page: Page) -> None: | ||
page.wait_for_selector( | ||
'#form-passwordlogin > div.g-recaptcha > div > div.grecaptcha-logo > iframe', | ||
timeout=10000, | ||
) | ||
|
||
|
||
def test_login_add_livestream( | ||
db_session: scoped_session, | ||
live_server, | ||
user_vetinari, | ||
project_expo2010: models.Project, | ||
page: Page, | ||
): | ||
user_vetinari.add_email(VETINARI_EMAIL) | ||
user_vetinari.password = VETINARI_PASSWORD | ||
db_session.commit() | ||
page.goto(live_server.url) | ||
page.get_by_role("link", name="Login").click() | ||
wait_until_recaptcha_loaded(page) | ||
page.wait_for_selector('input[name=username]').fill(VETINARI_EMAIL) | ||
page.click('#use-password-login') | ||
page.wait_for_selector('input[name=password]').fill(VETINARI_PASSWORD) | ||
page.click('#login-btn') | ||
assert ( | ||
page.wait_for_selector('.alert__text').inner_text() == "You are now logged in" | ||
) | ||
page.goto(project_expo2010.absolute_url) | ||
page.get_by_label("Update livestream URLs").click() | ||
page.get_by_label("Livestream URLs. One per line").click() | ||
page.get_by_label("Livestream URLs. One per line").fill( | ||
"https://www.youtube.com/watch?v=dQw4w9WgXcQ\nhttps://vimeo.com/336892869\nhttps://player.vimeo.com/video/860038461?h=87fb31038b" | ||
) | ||
page.get_by_role("button", name="Save changes").click() | ||
expect( | ||
page.frame_locator( | ||
"internal:role=tabpanel[name=\"Livestream\"i] >> iframe" | ||
).get_by_label("YouTube Video Player") | ||
).to_contain_text("Rick Astley - Never Gonna Give You Up (Official Music Video)") | ||
page.get_by_role("tab", name="Livestream 2").click() | ||
expect( | ||
page.frame_locator( | ||
"internal:role=tabpanel[name=\"Livestream\"i] >> iframe" | ||
).get_by_role("banner") | ||
).to_contain_text("Rick Astley - Never Gonna Give You Up (Video)") | ||
page.get_by_role("tab", name="Livestream 3").click() | ||
expect( | ||
page.frame_locator( | ||
"internal:role=tabpanel[name=\"Livestream\"i] >> iframe" | ||
).get_by_role("banner") | ||
).to_contain_text( | ||
"Practical SLSA for developers and application security professionals" | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.