Skip to content

Commit

Permalink
Enforce the server host and port
Browse files Browse the repository at this point in the history
  • Loading branch information
yijie-yang committed Oct 10, 2024
1 parent d6a384d commit fd7379b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: |
cd src/server
scripts/setup_local_dev.sh
nohup model-explorer &
nohup model-explorer --host=127.0.0.1 --port=8081 &
- name: Install dependencies
run: |
Expand All @@ -41,5 +41,5 @@ jobs:
- name: Run tests
run: |
PWDEBUG=1 pytest -v ci/playwright_test.py
pytest -v ci/playwright_test.py
5 changes: 2 additions & 3 deletions ci/playwright_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
import time
from playwright.sync_api import Page, expect
from PIL import Image, ImageChops
import tempfile

LOCAL_SERVER = "http://localhost:8080/"
LOCAL_SERVER = "http://127.0.0.1:8081//"
TEST_FILES_DIR = "src/server/test/"
EXPECTED_SCREENSHOT_DIR = "src/server/screenshots/"


def matched_images(actual_image_path, expected_image_path, threshold: int = 0):
def matched_images(actual_image_path, expected_image_path, threshold: int = 10):
actual_image = Image.open(actual_image_path).convert("L")
expected_image = Image.open(expected_image_path).convert("L")

Expand Down
Binary file modified src/.DS_Store
Binary file not shown.

0 comments on commit fd7379b

Please sign in to comment.