mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-10960] fix workflow (run-e2e-with-env) localhost (#4989)
* [ACS-10960] fix workflow localhost * [ACS-10960] remove pr run part * [ACS-10960] url check * [ACS-10960] remove pull request run for this workflow
This commit is contained in:
@@ -17,13 +17,27 @@ runs:
|
|||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
- name: Set PLAYWRIGHT_E2E_HOST
|
||||||
|
if: inputs.url != ''
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
# Construct the full URL with /aca path (without #/ as tests add that)
|
||||||
|
if [[ "${{ inputs.url }}" != *"/aca"* ]]; then
|
||||||
|
echo "PLAYWRIGHT_E2E_HOST=${{ inputs.url }}/aca" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "PLAYWRIGHT_E2E_HOST=${{ inputs.url }}" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Setup and run with options
|
- name: Setup and run with options
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
OPTIONS: ${{ inputs.options }}
|
OPTIONS: ${{ inputs.options }}
|
||||||
PLAYWRIGHT_BROWSER: ${{ env.PLAYWRIGHT_BROWSER || 'chromium' }}
|
PLAYWRIGHT_BROWSER: ${{ env.PLAYWRIGHT_BROWSER || 'chromium' }}
|
||||||
run: |
|
run: |
|
||||||
npm start > /dev/null &\
|
# Only start local server if using localhost
|
||||||
|
if [[ "${PLAYWRIGHT_E2E_HOST}" == "http://localhost"* ]]; then
|
||||||
|
npm start > /dev/null &
|
||||||
|
fi
|
||||||
|
|
||||||
printf "Waiting for the application to be ready..."
|
printf "Waiting for the application to be ready..."
|
||||||
while ! curl -sf ${PLAYWRIGHT_E2E_HOST} > /dev/null; do
|
while ! curl -sf ${PLAYWRIGHT_E2E_HOST} > /dev/null; do
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ env:
|
|||||||
HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
|
HR_USER_PASSWORD: ${{ secrets.HR_USER_PASSWORD }}
|
||||||
SCREENSHOT_USERNAME: ${{ secrets.SCREENSHOT_USERNAME }}
|
SCREENSHOT_USERNAME: ${{ secrets.SCREENSHOT_USERNAME }}
|
||||||
SCREENSHOT_PASSWORD: ${{ secrets.SCREENSHOT_PASSWORD}}
|
SCREENSHOT_PASSWORD: ${{ secrets.SCREENSHOT_PASSWORD}}
|
||||||
PLAYWRIGHT_E2E_HOST: ${{ inputs.url || secrets.PIPELINE_ENV_URL }}/aca/#/
|
PLAYWRIGHT_E2E_HOST: ${{ inputs.url || secrets.PLAYWRIGHT_E2E_HOST }}
|
||||||
GH_BUILD_NUMBER: ${{ github.run_id }}
|
GH_BUILD_NUMBER: ${{ github.run_id }}
|
||||||
REPORT_PORTAL_URL: ${{ secrets.REPORT_PORTAL_URL }}
|
REPORT_PORTAL_URL: ${{ secrets.REPORT_PORTAL_URL }}
|
||||||
REPORT_PORTAL_TOKEN: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
REPORT_PORTAL_TOKEN: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ export function favoritesTests(username: string) {
|
|||||||
|
|
||||||
await favoritePage.pagination.openMaxItemsMenu();
|
await favoritePage.pagination.openMaxItemsMenu();
|
||||||
await favoritePage.pagination.clickMenuItem('50');
|
await favoritePage.pagination.clickMenuItem('50');
|
||||||
|
await favoritePage.dataTable.spinnerWaitForReload();
|
||||||
expect(await favoritePage.pagination.getMaxItems()).toContain('50');
|
expect(await favoritePage.pagination.getMaxItems()).toContain('50');
|
||||||
expect(await favoritePage.pagination.getTotalPages()).toContain('of 2');
|
expect(await favoritePage.pagination.getTotalPages()).toContain('of 2');
|
||||||
|
|
||||||
@@ -61,6 +62,7 @@ export function favoritesTests(username: string) {
|
|||||||
|
|
||||||
await favoritePage.pagination.openMaxItemsMenu();
|
await favoritePage.pagination.openMaxItemsMenu();
|
||||||
await favoritePage.pagination.clickMenuItem('100');
|
await favoritePage.pagination.clickMenuItem('100');
|
||||||
|
await favoritePage.dataTable.spinnerWaitForReload();
|
||||||
expect(await favoritePage.pagination.getMaxItems()).toContain('100');
|
expect(await favoritePage.pagination.getMaxItems()).toContain('100');
|
||||||
expect(await favoritePage.pagination.getTotalPages()).toContain('of 1');
|
expect(await favoritePage.pagination.getTotalPages()).toContain('of 1');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user