chore: cypress set up tweaks (#31926)
This commit is contained in:
parent
a02a2f5a96
commit
dfb9af36df
|
|
@ -138,7 +138,7 @@ jobs:
|
|||
run: cypress-run-all ${{ env.USE_DASHBOARD }}
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
if: github.event_name == 'workflow_dispatch' && (steps.check.outputs.python || steps.check.outputs.frontend)
|
||||
if: failure()
|
||||
with:
|
||||
path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/screenshots
|
||||
name: cypress-artifact-${{ github.run_id }}-${{ github.job }}
|
||||
|
|
|
|||
|
|
@ -50,12 +50,16 @@ echo_step "1" "Complete" "Applying DB migrations"
|
|||
|
||||
# Create an admin user
|
||||
echo_step "2" "Starting" "Setting up admin user ( admin / $ADMIN_PASSWORD )"
|
||||
superset fab create-admin \
|
||||
--username admin \
|
||||
--firstname Superset \
|
||||
--lastname Admin \
|
||||
--email admin@superset.com \
|
||||
--password "$ADMIN_PASSWORD"
|
||||
if [ "$CYPRESS_CONFIG" == "true" ]; then
|
||||
superset load_test_users
|
||||
else
|
||||
superset fab create-admin \
|
||||
--username admin \
|
||||
--email admin@superset.com \
|
||||
--password "$ADMIN_PASSWORD" \
|
||||
--firstname Superset \
|
||||
--lastname Admin
|
||||
fi
|
||||
echo_step "2" "Complete" "Setting up admin user"
|
||||
# Create default roles and permissions
|
||||
echo_step "3" "Starting" "Setting up roles and perms"
|
||||
|
|
@ -67,7 +71,6 @@ if [ "$SUPERSET_LOAD_EXAMPLES" = "yes" ]; then
|
|||
echo_step "4" "Starting" "Loading examples"
|
||||
# If Cypress run which consumes superset_test_config – load required data for tests
|
||||
if [ "$CYPRESS_CONFIG" == "true" ]; then
|
||||
superset load_test_users
|
||||
superset load_examples --load-test-data
|
||||
else
|
||||
superset load_examples
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import os
|
|||
import subprocess
|
||||
from datetime import datetime
|
||||
|
||||
XVFB_PRE_CMD = "xvfb-run --auto-servernum --server-args='-screen 0, 1024x768x24' "
|
||||
XVFB_PRE_CMD = "xvfb-run --auto-servernum --server-args='-screen 0, 1280x1024x24' "
|
||||
REPO = os.getenv("GITHUB_REPOSITORY") or "apache/superset"
|
||||
GITHUB_EVENT_NAME = os.getenv("GITHUB_EVENT_NAME") or "push"
|
||||
CYPRESS_RECORD_KEY = os.getenv("CYPRESS_RECORD_KEY") or ""
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export default eyesPlugin(
|
|||
defineConfig({
|
||||
chromeWebSecurity: false,
|
||||
defaultCommandTimeout: 8000,
|
||||
numTestsKeptInMemory: 5,
|
||||
numTestsKeptInMemory: 3,
|
||||
// Disabled after realizing this MESSES UP rison encoding in intricate ways
|
||||
experimentalFetchPolyfill: false,
|
||||
experimentalMemoryManagement: true,
|
||||
|
|
@ -58,7 +58,15 @@ export default eyesPlugin(
|
|||
});
|
||||
|
||||
launchOptions.args.push(
|
||||
...['--disable-dev-shm-usage', '--disable-gpu'],
|
||||
'--disable-dev-shm-usage',
|
||||
'--disable-gpu',
|
||||
'--no-sandbox',
|
||||
'--disable-software-rasterizer',
|
||||
'--memory-pressure-off',
|
||||
'--js-flags=--max-old-space-size=4096',
|
||||
'--disable-background-timer-throttling',
|
||||
'--disable-backgrounding-occluded-windows',
|
||||
'--disable-renderer-backgrounding',
|
||||
);
|
||||
}
|
||||
return launchOptions;
|
||||
|
|
|
|||
Loading…
Reference in New Issue