Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .github/workflows/job-test-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,29 @@ jobs:
- name: Wait for Application to be Ready
run: |
echo "Waiting for application to be ready at ${{ env.url }} "
max_attempts=10
max_attempts=15
attempt=1

while [ $attempt -le $max_attempts ]; do
echo "Attempt $attempt: Checking if application is ready..."
if curl -f -s "${{ env.url }}" > /dev/null; then
echo "Application is ready!"
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "${{ env.url }}" || echo "000")
if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 400 ]; then
echo "Application is ready! (HTTP $HTTP_STATUS)"
break
fi

if [ $attempt -eq $max_attempts ]; then
echo "Application is not ready after $max_attempts attempts"
echo "Application is not ready after $max_attempts attempts (last HTTP status: $HTTP_STATUS)"
exit 1
fi

echo "Application not ready, waiting 30 seconds..."
echo "Application not ready (HTTP $HTTP_STATUS), waiting 30 seconds..."
sleep 30
attempt=$((attempt + 1))
done

echo "Waiting additional 30 seconds for application to fully initialize..."
sleep 30

- name: Validate Use Case and Test Suite
run: |
Expand Down Expand Up @@ -142,9 +146,9 @@ jobs:
working-directory: tests/e2e-test
continue-on-error: true

- name: Sleep for 30 seconds
- name: Sleep for 60 seconds
if: ${{ steps.test1.outcome == 'failure' }}
run: sleep 30s
run: sleep 60s
shell: bash
Comment on lines +149 to 152

- name: Run tests(2)
Expand All @@ -167,9 +171,9 @@ jobs:
working-directory: tests/e2e-test
continue-on-error: true

- name: Sleep for 60 seconds
- name: Sleep for 90 seconds
if: ${{ steps.test2.outcome == 'failure' }}
run: sleep 60s
run: sleep 90s
shell: bash

- name: Run tests(3)
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e-test/pages/HomePage.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self, page):
self.page = page

def home_page_load(self):
self.page.locator("//span[normalize-space()='Satisfied']").wait_for(state="visible")
self.page.locator("//span[normalize-space()='Satisfied']").wait_for(state="visible", timeout=180000)

def validate_response_text(self, question):
logger.info(f"🔍 DEBUG: validate_response_text called for question: '{question}'")
Expand Down Expand Up @@ -89,7 +89,7 @@ def show_chat_history(self):
self.page.wait_for_load_state('networkidle')
self.page.wait_for_timeout(2000)
try:
expect(self.page.locator(self.CHAT_HISTORY_NAME)).to_be_visible(timeout=9000)
expect(self.page.locator(self.CHAT_HISTORY_NAME)).to_be_visible(timeout=60000)
except AssertionError:
raise AssertionError("Chat history name was not visible on the page within the expected time.")

Expand Down