Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Nov 3, 2024
1 parent 4aba58e commit 6dd4082
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ on:
jobs:
bazel:
name: ${{ inputs.name }}
runs-on: ${{ inputs.os == 'macos' && 'macos-13' || inputs.os == 'macos-15' && 'macos-15' || format('{0}-latest', inputs.os) }}
runs-on: ${{ inputs.os == 'macos' && 'macos-13' || format('{0}-latest', inputs.os) }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEL_M2_USER: ${{ secrets.SEL_M2_USER }}
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ jobs:
with:
name: Integration Tests (safari)
browser: safari
os: macos-15
os: macos
cache-key: py-safari
run: |
bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-safari
run: bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-safari
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def test_should_catch_errors_when_executing_initial_script(driver, pages):
driver.execute_async_script("throw Error('you should catch this!');")


@pytest.mark.xfail_safari
def test_should_be_able_to_execute_asynchronous_scripts(driver, pages):
pages.load("ajaxy_page.html")

Expand Down
6 changes: 5 additions & 1 deletion py/test/selenium/webdriver/common/upload_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# under the License.

import os
import textwrap

import pytest

Expand All @@ -30,11 +31,13 @@ def get_local_path():
current_dir = os.path.dirname(os.path.realpath(__file__))

def wrapped(filename):
return os.path.join(current_dir, filename)
full_path = os.path.join(current_dir, filename)
return textwrap.fill(full_path, width=512)

return wrapped


@pytest.mark.xfail_safari
def test_can_upload_file(driver, pages, get_local_path):
pages.load("upload.html")

Expand All @@ -45,6 +48,7 @@ def test_can_upload_file(driver, pages, get_local_path):
WebDriverWait(driver, 10).until(EC.text_to_be_present_in_element((By.CSS_SELECTOR, "body"), "test_file.txt"))


@pytest.mark.xfail_safari
def test_can_upload_two_files(driver, pages, get_local_path):
pages.load("upload.html")
two_file_paths = get_local_path("test_file.txt") + "\n" + get_local_path("test_file2.txt")
Expand Down
1 change: 0 additions & 1 deletion py/test/selenium/webdriver/common/webdriverwait_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ def test_expected_condition_element_to_be_clickable(driver, pages):
assert element.is_displayed() is False


@pytest.mark.xfail_safari
def test_expected_condition_staleness_of(driver, pages):
pages.load("dynamicallyModifiedPage.html")
element = driver.find_element(By.ID, "element-to-remove")
Expand Down

0 comments on commit 6dd4082

Please sign in to comment.