diff --git a/.circleci/config.yml b/.circleci/config.yml index e63c70bd8cf1dfaea10b9e90fccec87afce53c4e..813d5cc9eb5af1eac29013fcad19f96b252aab20 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1169,6 +1169,16 @@ workflows: requires: - fe-deps + - fe-tests-cypress: + matrix: + parameters: + edition: ["ee", "oss"] + name: e2e-tests-smoketest-<< matrix.edition >> + requires: + - build-uberjar-<< matrix.edition >> + cypress-group: "smoketest-<< matrix.edition >>" + source-folder: frontend/test/metabase/scenarios/smoketest + - fe-tests-cypress: matrix: parameters: diff --git a/.github/workflows/uberjar.yml b/.github/workflows/uberjar.yml index d8f0b3763ce61d380167d662ad36a545957b3c3f..eaa5a4dc4864be5a2f1756e1bd1a8361d3b89e96 100644 --- a/.github/workflows/uberjar.yml +++ b/.github/workflows/uberjar.yml @@ -103,44 +103,3 @@ jobs: - name: Check API health run: curl -s localhost:3000/api/health - - smoke: - runs-on: ubuntu-20.04 - timeout-minutes: 30 - needs: build - steps: - - uses: actions/checkout@v2 - - name: Prepare Node.js - uses: actions/setup-node@v1 - with: - node-version: 14.x - - name: Prepare JDK 8 - uses: actions/setup-java@v1 - with: - java-version: 8 - - name: Install Clojure CLI - run: | - curl -O https://download.clojure.org/install/linux-install-1.10.1.708.sh && - sudo bash ./linux-install-1.10.1.708.sh - - name: Check versions - run: | - echo "Node.js `node --version`" - echo "yarn `yarn --version`" - java -version - echo "Clojure `clojure -e "(println (clojure-version))"`" - - name: Get yarn cache - uses: actions/cache@v2 - with: - path: ~/.cache/yarn - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - - - run: ./bin/build version - - - uses: actions/download-artifact@v2 - name: Retrieve uberjar artifact - with: - name: metabase-oss-uberjar - - run: yarn run test-cypress-smoketest - name: Run Cypress smoketest - env: - TERM: xterm \ No newline at end of file diff --git a/frontend/test/__runner__/run_cypress_tests.js b/frontend/test/__runner__/run_cypress_tests.js index 5713d768b2089f92b9cf9fe7d0e8a9bfb7644a2e..b7412711e58e304e972a0ad5e2f53d18b429f37e 100644 --- a/frontend/test/__runner__/run_cypress_tests.js +++ b/frontend/test/__runner__/run_cypress_tests.js @@ -75,10 +75,10 @@ const init = async () => { }; const specsConfig = isSpecFlag && { testFiles }; const ignoreConfig = - // if we're not running specific tests, avoid including db and smoketests + // if we're not running specific tests, avoid including db tests folderConfig || specsConfig ? null - : { ignoreTestFiles: "**/metabase-{smoketest,db}/**" }; + : { ignoreTestFiles: "**/metabase-db/**" }; const config = { ...baseConfig, diff --git a/frontend/test/metabase-smoketest/README.md b/frontend/test/metabase/scenarios/smoketest/README.md similarity index 74% rename from frontend/test/metabase-smoketest/README.md rename to frontend/test/metabase/scenarios/smoketest/README.md index 6eddab15c1e1ab3ff9a3de59f758c905e48a4f9f..34bee510df01dddcf113847b34fe66b42e6cff2b 100644 --- a/frontend/test/metabase-smoketest/README.md +++ b/frontend/test/metabase/scenarios/smoketest/README.md @@ -1,6 +1,6 @@ # Metabase Smoketests -These files exist to ensure that we can always do the things we expect with Metabase. :) +These files exist to ensure that we can always do the things we expect with Metabase. :) ## Running @@ -11,7 +11,7 @@ From the root of the repository: - If you already have built Metabase with `./bin/build`, just run this to run all the tests. ```shell -yarn run test-cypress-no-build --folder frontend/test/metabase-smoketest +yarn run test-cypress-no-build --folder frontend/test/metabase/scenarios/smoketest ``` -- Active development, add `--open` \ No newline at end of file +- Active development, add `--open` diff --git a/frontend/test/metabase-smoketest/admin.cy.spec.js b/frontend/test/metabase/scenarios/smoketest/admin.cy.spec.js similarity index 100% rename from frontend/test/metabase-smoketest/admin.cy.spec.js rename to frontend/test/metabase/scenarios/smoketest/admin.cy.spec.js diff --git a/frontend/test/metabase-smoketest/admin_setup.cy.spec.js b/frontend/test/metabase/scenarios/smoketest/admin_setup.cy.spec.js similarity index 100% rename from frontend/test/metabase-smoketest/admin_setup.cy.spec.js rename to frontend/test/metabase/scenarios/smoketest/admin_setup.cy.spec.js diff --git a/frontend/test/metabase-smoketest/user.cy.spec.js b/frontend/test/metabase/scenarios/smoketest/user.cy.spec.js similarity index 100% rename from frontend/test/metabase-smoketest/user.cy.spec.js rename to frontend/test/metabase/scenarios/smoketest/user.cy.spec.js diff --git a/package.json b/package.json index 08ff1a159566742c5307e3222b1893fe2479a8a9..a555df4938651137df13adee09ebbf6b605c051f 100644 --- a/package.json +++ b/package.json @@ -198,11 +198,10 @@ "ci": "yarn ci-frontend && yarn ci-backend", "ci-frontend": "yarn lint && yarn test", "ci-backend": "lein docstring-checker && lein bikeshed && lein eastwood && lein test", - "test-cypress": "yarn build && ./bin/build-for-test && yarn test-cypress-no-build && yarn test-cypress-smoketest", + "test-cypress": "yarn build && ./bin/build-for-test && yarn test-cypress-no-build", "test-cypress-open": "./bin/build-for-test && yarn test-cypress-no-build --open", "test-cypress-open-no-backend": "E2E_HOST='http://localhost:3000' yarn test-cypress-no-build --open", "test-cypress-no-build": "yarn && CONFIG_FILE=frontend/test/__support__/e2e/cypress.json babel-node ./frontend/test/__runner__/run_cypress_tests.js", - "test-cypress-smoketest": "yarn test-cypress-no-build --folder frontend/test/metabase-smoketest", "prepare": "husky install" }, "lint-staged": {