mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
use angular serve for e2e (#3085)
* use angular serve for e2e
* generate default .env file
* try to wait for base url
* Revert "try to wait for base url"
This reverts commit 48f55c604d
.
* try to sleep a bit
* try waiting for url
* bump timeout
* try different approach
* different timeout attempt
* restore sleep
* do not install global libs on ci
This commit is contained in:
4
.github/actions/before-e2e/action.yml
vendored
4
.github/actions/before-e2e/action.yml
vendored
@@ -46,10 +46,8 @@ runs:
|
|||||||
- name: Replace variables in app.config.json
|
- name: Replace variables in app.config.json
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
npm install -g envsub
|
|
||||||
APP_CONFIG_FILE_PATH="${{ inputs.to }}/app.config.json"
|
APP_CONFIG_FILE_PATH="${{ inputs.to }}/app.config.json"
|
||||||
EXTRA_ENV_SETTINGS=""
|
npx envsub --all $APP_CONFIG_FILE_PATH $APP_CONFIG_FILE_PATH || exit 1
|
||||||
envsub $EXTRA_ENV_SETTINGS --all $APP_CONFIG_FILE_PATH $APP_CONFIG_FILE_PATH || exit 1
|
|
||||||
echo -n " \_ Validating replaced config file ... ";
|
echo -n " \_ Validating replaced config file ... ";
|
||||||
$(npm bin)/ajv validate -s ./node_modules/@alfresco/adf-core/app.config.schema.json -d $APP_CONFIG_FILE_PATH --errors=text --verbose || exit 4
|
$(npm bin)/ajv validate -s ./node_modules/@alfresco/adf-core/app.config.schema.json -d $APP_CONFIG_FILE_PATH --errors=text --verbose || exit 4
|
||||||
if grep -E -q '\$\{[A-Z0-9_]*\}' $APP_CONFIG_FILE_PATH; then
|
if grep -E -q '\$\{[A-Z0-9_]*\}' $APP_CONFIG_FILE_PATH; then
|
||||||
|
23
.github/actions/run-e2e/action.yml
vendored
23
.github/actions/run-e2e/action.yml
vendored
@@ -19,10 +19,31 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
./node_modules/.bin/tsc -p "./e2e/$E2E_TSCONFIG" || exit 1;
|
./node_modules/.bin/tsc -p "./e2e/$E2E_TSCONFIG" || exit 1;
|
||||||
npx http-server -c-1 $CONTENT_CE_DIST_PATH -p 4200 > /dev/null &\
|
# npx http-server -c-1 $CONTENT_CE_DIST_PATH -p 4200 > /dev/null &\
|
||||||
|
|
||||||
|
{
|
||||||
|
echo "APP_CONFIG_ECM_HOST={protocol}//{hostname}{:port}"
|
||||||
|
echo "APP_CONFIG_PLUGIN_FOLDER_RULES=true"
|
||||||
|
echo "APP_CONFIG_PLUGIN_AOS=true"
|
||||||
|
echo "APP_CONFIG_PLUGIN_CONTENT_SERVICE=true"
|
||||||
|
echo "APP_CONFIG_ENABLE_MOBILE_APP_SWITCH=false"
|
||||||
|
echo "APP_CONFIG_PROVIDER=ECM"
|
||||||
|
echo "APP_CONFIG_AUTH_TYPE=BASIC"
|
||||||
|
echo "APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco"
|
||||||
|
echo "APP_CONFIG_OAUTH2_CLIENTID=alfresco"
|
||||||
|
echo "APP_CONFIG_SESSION_TIME_FOR_OPEN_APP_DIALOG_DISPLAY_IN_HOURS=12"
|
||||||
|
echo "APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true"
|
||||||
|
echo "APP_CONFIG_OAUTH2_SILENT_LOGIN=true"
|
||||||
|
echo "APP_CONFIG_OAUTH2_REDIRECT_LOGOUT=/"
|
||||||
|
echo "APP_CONFIG_OAUTH2_REDIRECT_LOGIN=/"
|
||||||
|
echo "APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI={protocol}//{hostname}{:port}/assets/silent-refresh.html"
|
||||||
|
} >> .env
|
||||||
|
|
||||||
|
npm start > /dev/null &\
|
||||||
|
|
||||||
if [ ${{ inputs.test-runner }} == "playwright" ]; then
|
if [ ${{ inputs.test-runner }} == "playwright" ]; then
|
||||||
echo "Running playwright tests with options ${{ inputs.options }}"
|
echo "Running playwright tests with options ${{ inputs.options }}"
|
||||||
|
sleep 60
|
||||||
npx playwright test --config ${{ inputs.options }}
|
npx playwright test --config ${{ inputs.options }}
|
||||||
else
|
else
|
||||||
echo "Running protractor tests with options ${{ inputs.options }}"
|
echo "Running protractor tests with options ${{ inputs.options }}"
|
||||||
|
15
README.md
15
README.md
@@ -18,6 +18,21 @@ APP_CONFIG_ECM_HOST="<URL>"
|
|||||||
APP_CONFIG_PLUGIN_AOS=false
|
APP_CONFIG_PLUGIN_AOS=false
|
||||||
APP_CONFIG_PLUGIN_CONTENT_SERVICE=true
|
APP_CONFIG_PLUGIN_CONTENT_SERVICE=true
|
||||||
APP_CONFIG_PLUGIN_FOLDER_RULES=true
|
APP_CONFIG_PLUGIN_FOLDER_RULES=true
|
||||||
|
APP_CONFIG_ENABLE_MOBILE_APP_SWITCH=false
|
||||||
|
APP_CONFIG_PROVIDER=ECM
|
||||||
|
APP_CONFIG_AUTH_TYPE=BASIC
|
||||||
|
APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco
|
||||||
|
APP_CONFIG_OAUTH2_CLIENTID=alfresco
|
||||||
|
APP_CONFIG_PLUGIN_AOS=true
|
||||||
|
APP_CONFIG_PLUGIN_CONTENT_SERVICE=true
|
||||||
|
APP_CONFIG_PLUGIN_FOLDER_RULES=true
|
||||||
|
APP_CONFIG_ENABLE_MOBILE_APP_SWITCH=true
|
||||||
|
APP_CONFIG_SESSION_TIME_FOR_OPEN_APP_DIALOG_DISPLAY_IN_HOURS="12"
|
||||||
|
APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true
|
||||||
|
APP_CONFIG_OAUTH2_SILENT_LOGIN=true
|
||||||
|
APP_CONFIG_OAUTH2_REDIRECT_LOGOUT=/
|
||||||
|
APP_CONFIG_OAUTH2_REDIRECT_LOGIN=/
|
||||||
|
APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI="{protocol}//{hostname}{:port}/assets/silent-refresh.html"
|
||||||
```
|
```
|
||||||
|
|
||||||
Where `<URL>` is the address of the ACS.
|
Where `<URL>` is the address of the ACS.
|
||||||
|
Reference in New Issue
Block a user