{"id":26138255,"url":"https://github.com/onecommons/unfurl-gui","last_synced_at":"2025-04-14T00:07:41.757Z","repository":{"id":37858930,"uuid":"304721514","full_name":"onecommons/unfurl-gui","owner":"onecommons","description":"vue + apollo + gitlab-ui","archived":false,"fork":false,"pushed_at":"2024-11-08T03:57:01.000Z","size":32448,"stargazers_count":5,"open_issues_count":21,"forks_count":0,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-11-08T04:31:16.615Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onecommons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-16T19:32:04.000Z","updated_at":"2024-05-24T13:48:33.000Z","dependencies_parsed_at":"2023-09-22T03:29:30.312Z","dependency_job_id":"3b289911-2747-4098-b263-45893d86b7d8","html_url":"https://github.com/onecommons/unfurl-gui","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onecommons%2Funfurl-gui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onecommons%2Funfurl-gui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onecommons%2Funfurl-gui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onecommons%2Funfurl-gui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onecommons","download_url":"https://codeload.github.com/onecommons/unfurl-gui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242956553,"owners_count":20212454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-11T01:56:22.078Z","updated_at":"2025-03-11T01:56:22.718Z","avatar_url":"https://github.com/onecommons.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[//]: # (README.md is generated by ./scripts/src/generate-readme.js, do not edit directly)\n[//]: # (Edit files under ./.readme/ to change the contents of this README)\n\n**Node LTS is recommended**\n\n# Notes\n\n`src/gitlab-oc` is a symlink to `packages/oc-pages`.   The oc-pages package is also used in the gitlab-oc repo, so take care when making changes and make sure the code stays portable between gitlab-oc and unfurl-gui.  When importing modules from inside oc-pages/ to other locations inside the src/ directory, use the appropriate aliases to prevent resolver errors on gitlab-oc.  Check `vue.config.js` to see what the current aliases resolve to.\n\nSee Apollo boilerplate added with `vue add apollo`... see https://apollo.vuejs.org/\n\nNeed to run `yarn run apollo:start` first to start the apollo graphql server (runs on port 4000).\n\nsee https://gitlab-org.gitlab.io/gitlab-ui/ and https://gitlab-org.gitlab.io/gitlab-svgs/\n\ngitlab-ui wraps https://bootstrap-vue.org/ which wraps bootstrap 4\n\nIt also depends on https://portal-vue.linusb.org/ which we could use to build a vs-code like minimap of a view using http://asvd.github.io/syncscroll/ or similar.\n\n\n# Fixture/spec generation\n\nMost integration tests hosted in this repository are based off of completed deployments or deployment drafts.\n\nThe easiest way to generate fixtures is to fill out a blueprint on [unfurl.cloud](https://unfurl.cloud) and export the deployment via Unfurl cli.\n\n1. Navigate to https://unfurl.cloud/home#clone-instructions or `https://unfurl.cloud/\u003cyour-username\u003e/dashboard#clone-instructions`\n2. Copy and execute the command line snippet for \"Clone this Unfurl project if you haven't already\"\n3. Run `unfurl export --format deployment --file  \u003cpath-to-unfurl-gui\u003e/cypress/fixtures/generated/deployments/v2/\u003cexport-name\u003e.json \u003cpath-to-ensemble-yaml\u003e`\n\n\n# Jest patch/dryrun test\n\nThe test titled `ufsv-patch` mimics the workflow of a user filling out a deployment blueprint and triggering a dryrun deployment.\n\n## Required envvars and params\n**SPEC_GLOBS:** Whitespace separated globs indicating which deployments to be run. Spec are found in `cypress/fixtures/generated/deployments/v2` by default, but a different path will be searched depending on `TEST_VERSIONS`.\n\n**GOOGLE_APPLICATION_CREDENTIALS:** Even dryrun tests fail when this variable is missing.\n\n**--runInBand:** For now we do **NOT** want to try running tests in parallel.\n\n## Supported envvars\nAll Unfurl environment variables pass through to `unfurl serve` and `unfurl deploy`.\n\n**TEST_VERSIONS:** Which version of specs to run (default: v2)\n\n**CI:** If present, log commands to curl artifacts, write deploy logs to `/tmp/${testName}-ufdryrun.log`.  Outputs will be optimized for this test's companion `.gitlab-ci.yml` workflow.\n\n**PORT:** The port to run `unfurl serve` on (default: 5001)\n\n**OC_URL:** Base url for jest.  Also used for `--cloud-server` (default https://unfurl.cloud)\n\n**OC_NAMESPACE:** Namespace to run tests against; in other words - where the blueprints are located. (default: onecommons/blueprints)\n\n**SAVE_DRYRUN_LOGS:**  Write dry run logs to disk.\n\n\n## Example invocation\n```bash\nenv TF_PLUGIN_CACHE_DIR=/tmp/plugincache/ TF_DATA_DIR=/tmp/.terraform TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE=1 GOOGLE_APPLICATION_CREDENTIALS=/home/onecommons/oc-staging1-6aeb4c6ec6bc.json SPEC_GLOBS='*baserow*' yarn test ufsv-patch -- --runInBand\n```\n\n## Default Unfurl envvars\n```javascript\nconst UNFURL_DEFAULT_ENV = {\n  UNFURL_LOGGING: 'trace',\n  UNFURL_HOME: '',\n  UNFURL_SKIP_SAVE: 'never',\n}\n```\n\n## Test directory structure and outputs:\n- `/tmp/ufsv`: The location of the test dashboard.  Will be used as the working directory for `unfurl serve` and `unfurl deploy`.\n- `/tmp/repos`: The location of `--clone-root` for `unfurl serve`.\n- `/tmp/ufartifacts`: All deployments will be moved here between test runs, so as to not wipe debug information when the next spec is run.  All `ensemble.yaml` files and artifacts will be present here after the suite has finished running.\n- `/tmp/${testName}-ufsv.log`: Pattern for where `unfurl serve` logs will be written. Tip: use `less -r` to view.\n- `/tmp/${testName}-ufdryrun.log`: Pattern for where `unfurl deploy` logs will be written when in CI (otherwise stdio). Tip: use `less -r` to view.\n\n\n# Triggering a test pipeline\n\nA test can be triggered via `curl | bash` as below.  The first parameter to the bash script is the test to run (equivalent to the `$TEST` variable mentioned under [Cypress tests](#cypress-tests)).\n\nExample:\n`curl https://raw.githubusercontent.com/onecommons/unfurl-gui/cy-tests/scripts/trigger-pipeline.sh | bash -s baserow` will trigger the pipeline with `$TEST` set to `baserow`.\n\nIf successful the command will output the pipeline URL.\n\n\n# Cypress tests\n\n Cypress tests can be automatically run through gitlab ci by setting the `$TEST` pipeline variable\n\n| Pattern | Spec | Description |\n| ------- | ---- | ----------- |\n| \u003ccode\u003e$TEST == \"sanity\" \u0026#124;\u0026#124; $TEST == \"visitor\" \u0026#124;\u0026#124; $TEST == \"all\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/00_visitor/\u0026#42;.js\u003c/code\u003e | Sanity checks for signed out users |\n| \u003ccode\u003e$TEST == \"nestedcloud\" \u0026#124;\u0026#124; $TEST == \"all\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/\u0026#42;nestedcloud\u0026#42;.js\u003c/code\u003e | Run nestedcloud tests (must be \u0026lt;namespace\u0026gt;/nestedcloud) |\n| \u003ccode\u003e$TEST == \"nextcloud\" \u0026#124;\u0026#124; $TEST == \"nextcloud_aws\" \u0026#124;\u0026#124; $TEST == \"all\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/aws\u0026#42;nextcloud\u0026#42;.js\u003c/code\u003e | Runs all nextcloud tests on aws |\n| \u003ccode\u003e$TEST == \"nextcloud\" \u0026#124;\u0026#124; $TEST == \"nextcloud_gcp\" \u0026#124;\u0026#124; $TEST == \"all\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/gcp\u0026#42;nextcloud\u0026#42;.js\u003c/code\u003e | Runs all nextcloud tests on gcp |\n| \u003ccode\u003e$TEST == \"nextcloud\" \u0026#124;\u0026#124; $TEST == \"nextcloud_do\" \u0026#124;\u0026#124; $TEST == \"all\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/do\u0026#42;nextcloud\u0026#42;.js\u003c/code\u003e | Runs all nextcloud tests on digital ocean |\n| \u003ccode\u003e$TEST =~ /baserow/ \u0026#124;\u0026#124; $TEST == \"all\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/\u0026#42;baserow\u0026#42;.js\u003c/code\u003e | Runs all baserow tests |\n| \u003ccode\u003e$TEST =~ /minecraft/ \u0026#124;\u0026#124; $TEST == \"all\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/\u0026#42;minecraft\u0026#42;.js\u003c/code\u003e | Runs all minecraft tests |\n| \u003ccode\u003e$TEST == \"container_webapp\" \u0026#124;\u0026#124; $TEST == \"all\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/\u0026#42;container-webapp\u0026#42;.js\u003c/code\u003e | Runs all container-webapp tests |\n| \u003ccode\u003e$TEST == \"container_webapp_gcp\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/gcp__container-webapp\u0026#42;.js\u003c/code\u003e | Runs container-webapp tests for gcp |\n| \u003ccode\u003e$TEST == \"container_webapp_aws\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/aws__container-webapp\u0026#42;.js\u003c/code\u003e | Runs container-webapp tests for aws |\n| \u003ccode\u003e$TEST =~ /ghost/ \u0026#124;\u0026#124; $TEST == \"all\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/\u0026#42;ghost\u0026#42;.js\u003c/code\u003e | Runs all ghost tests |\n| \u003ccode\u003e$TEST =~ /mediawiki/ \u0026#124;\u0026#124; $TEST == \"all\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/\u0026#42;mediawiki\u0026#42;.js\u003c/code\u003e | Runs all mediawiki tests |\n| \u003ccode\u003e$TEST =~ /wordpress/ \u0026#124;\u0026#124; $TEST == \"all\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/\u0026#42;wordpress\u0026#42;.js\u003c/code\u003e | Runs all wordpress tests |\n| \u003ccode\u003e$TEST =~ /k8s/ \u0026#124;\u0026#124; ($TEST == \"all\" \u0026\u0026 $SKIP !~ /k8s/)\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/k8s__wordpress\u0026#42;.js\u003c/code\u003e | Runs all kubernetes tests |\n| \u003ccode\u003e$TEST =~ /uc_dns/ \u0026#124;\u0026#124; $TEST == \"all\"\u003c/code\u003e | \u003ccode\u003e./cypress/e2e/blueprints/aws__nextcloud__only-mail\u0026#42;.js\u003c/code\u003e | Runs aws nextcloud with unfurl cloud dns |\n| \u003ccode\u003e$TEST == \"cloud_redis\"\u003c/code\u003e | \u003ccode\u003ecypress/e2e/blueprints/gcp__nextcloud__memorystore\u0026#42;.js\u003c/code\u003e\u003cbr\u003e\u003ccode\u003ecypress/e2e/blueprints/aws__nextcloud__memorydb\u0026#42;.js\u003c/code\u003e | Runs all cloud redis tests |\n| \u003ccode\u003e$TEST == \"multiple_workflows\" \u0026#124;\u0026#124; $TEST == \"misc\"\u003c/code\u003e | \u003ccode\u003ecypress/e2e/deployments/multiple-workflows\u0026#42;.js\u003c/code\u003e | Tries to run multiple deployments simultaneously |\n| \u003ccode\u003e$TEST == \"smorgasbord\"\u003c/code\u003e | \u003ccode\u003ecypress/e2e/deployments/smorgasbord\u0026#42;.js\u003c/code\u003e | Test inputs in smorgasbord blueprint |\n| \u003ccode\u003e$TEST == \"node_filter\" \u0026#124;\u0026#124; $TEST == \"misc\"\u003c/code\u003e | \u003ccode\u003ecypress/e2e/deployments/node-filter\u0026#42;.js\u003c/code\u003e | Test node filter on baserow |\n| \u003ccode\u003e$TEST == \"clone_draft\" \u0026#124;\u0026#124; $TEST == \"misc\"\u003c/code\u003e | \u003ccode\u003ecypress/e2e/deployments/clone-draft\u0026#42;.js\u003c/code\u003e | Clone and deploy a draft |\n| \u003ccode\u003e$TEST == \"drafts\" \u0026#124;\u0026#124; $TEST == \"misc\"\u003c/code\u003e | \u003ccode\u003ecypress/e2e/deployments/draft\u0026#42;.js\u003c/code\u003e | Try to trigger a state desync with drafts |\n| \u003ccode\u003e$TEST == \"dryrun\"\u003c/code\u003e | \u003ccode\u003ecypress/e2e/blueprints/aws\u0026#42;\u003c/code\u003e\u003cbr\u003e\u003ccode\u003ecypress/e2e/blueprints/az\u0026#42;\u003c/code\u003e | DRYRUN aws and azure |\n| \u003ccode\u003e$TEST == \"dryrun\"\u003c/code\u003e | \u003ccode\u003ecypress/e2e/blueprints/gcp\u0026#42;\u003c/code\u003e\u003cbr\u003e\u003ccode\u003ecypress/e2e/blueprints/do\u0026#42;\u003c/code\u003e | DRYRUN aws and azure |\n| \u003ccode\u003e$TEST == \"shared_volumes\" \u0026#124;\u0026#124; $TEST == \"all\"\u003c/code\u003e | \u003ccode\u003ecypress/e2e/deployments/shared-volume\u0026#42;.js\u003c/code\u003e | Runs all nextcloud shared volume tests\u003cbr\u003eThe test does the following:\u003cbr\u003e1. Deploys nextcloud with a volume\u003cbr\u003e2. Shares the volume\u003cbr\u003e3. Tears down the first deployment\u003cbr\u003e4. Creates a new nextcloud deployment with the shared volume\u003cbr\u003e5. Asserts that admin credentials are the same on the new instance\u003cbr\u003e |\n| \u003ccode\u003e$TEST == \"command\"\u003c/code\u003e | N/A | evals \u003ccode\u003e$CY_COMMAND\u003c/code\u003e\n\n## Running an arbitrary test examples with `$CY_COMMAND`\n\n* Run a single spec by setting `$CY_COMMAND` to : \u003ccode\u003eyarn run integration-test run --namespace onecommons/blueprints -- --browser chrome -s cypress/e2e/deployments/drafts.cy.js\u003c/code\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonecommons%2Funfurl-gui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonecommons%2Funfurl-gui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonecommons%2Funfurl-gui/lists"}