diff --git a/test/deploy/onboarding/roles/configure/tasks/main.yml b/test/deploy/onboarding/roles/configure/tasks/main.yml new file mode 100644 index 000000000..c3c8bf45f --- /dev/null +++ b/test/deploy/onboarding/roles/configure/tasks/main.yml @@ -0,0 +1,36 @@ +--- +- debug: + msg: Tests E2E + +- name: Clone the Onboarding tests repository + git: + repo: https://github.com/newrelic/onboarding-e2e-tests.git + dest: /opt/onboarding-e2e-tests + +- name: Write Permissions for repo + shell: "mkdir -p /opt/onboarding-e2e-tests && chmod 755 /opt/onboarding-e2e-tests" + +- name: Trigger Onboarding tests + shell: "cd /opt/onboarding-e2e-tests && pwd" + +- name: Create env file + shell: "touch /opt/onboarding-e2e-tests/.env" + +- name: Store values in env file + shell: | + echo "ENV_SECRET_EMAIL='example@newrelic.com' \nENV_SECRET_PASSWORD='example'" >> /opt/onboarding-e2e-tests/.env + +- name: npm install + shell: "npm install" + args: + chdir: /opt/onboarding-e2e-tests + +- name: Install Playwright + shell: "npx playwright@1.32.0 install --with-deps chromium" + args: + chdir: /opt/onboarding-e2e-tests + +- name: Test playwright scripts + shell: "npx playwright test" + args: + chdir: /opt/onboarding-e2e-tests