diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8b746acd..714303ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ include: variables: AUTO_DEVOPS_RELEASE_AUTO: "YEAH" - AUTO_DEVOPS_TEST_DISABLED: "🛑" + # AUTO_DEVOPS_TEST_DISABLED: "🛑" # AUTO_DEVOPS_QUALITY_CHECK_DISABLED: "OMG!" .rule_on_release: &rule_on_release @@ -27,14 +27,18 @@ Register Hasura: extends: .autodevops_register_image dependencies: - Build - # needs: [] - # needs: - # - job: Build + needs: [] environment: name: ${CI_COMMIT_REF_NAME}-dev2 variables: CONTEXT: ./packages/hasura IMAGE_NAME: $CI_REGISTRY_IMAGE/hasura + rules: + - <<: *rule_on_release + when: on_success + - <<: *rule_on_feature_branch + when: on_success + - when: never .on_branches_only: environment: diff --git a/__tests__/__snapshots__/index.test.js.snap b/__tests__/__snapshots__/index.test.js.snap new file mode 100644 index 00000000..15acdbef --- /dev/null +++ b/__tests__/__snapshots__/index.test.js.snap @@ -0,0 +1,24 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders header index content 1`] = ` + + + + + + + Il n'y a aucune publication pour le moment. + + + + + +`; diff --git a/__tests__/index.test.js b/__tests__/index.test.js index a17bfcf6..ae87d28c 100644 --- a/__tests__/index.test.js +++ b/__tests__/index.test.js @@ -5,8 +5,7 @@ import React from "react" import Index from "../src/pages/index" -test("renders header title", () => { - const { getByText } = render() - const headerElement = getByText(/Carnets de bord des produits/) - expect(headerElement).toBeInTheDocument() +test("renders header index content", () => { + const { asFragment } = render() + expect(asFragment()).toMatchSnapshot() }) diff --git a/package.json b/package.json index a75c1f03..808a556f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "next dev", "k8s": "yarn --silent --cwd .k8s", - "test": "jest --ci && yarn k8s test", + "test": "jest --ci", "build": "next build", "start": "next start", "test:dev": "jest --watch",
+ Il n'y a aucune publication pour le moment. +