diff --git a/.github/workflows/build-and-test-pr.yml b/.github/workflows/build-and-test-pr.yml index c34c224243cf..f366c97c7962 100644 --- a/.github/workflows/build-and-test-pr.yml +++ b/.github/workflows/build-and-test-pr.yml @@ -19,51 +19,6 @@ jobs: head_branch: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }} base_branch: ${{ github.event.pull_request.base.ref || github.event.merge_group.base_ref }} - # LLD - build-desktop: - name: "Build Desktop" - needs: determine-affected - if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name == github.repository }} - uses: LedgerHQ/ledger-live/.github/workflows/build-desktop-reusable.yml@develop - secrets: inherit - - test-desktop: - name: "Test Desktop" - needs: determine-affected - if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name == github.repository}} - uses: LedgerHQ/ledger-live/.github/workflows/test-desktop-reusable.yml@develop - secrets: inherit - - # LLM - build-mobile: - name: "Build Mobile" - needs: determine-affected - if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && github.event.pull_request.head.repo.full_name == github.repository}} - uses: LedgerHQ/ledger-live/.github/workflows/build-mobile-reusable.yml@develop - secrets: inherit - - test-mobile: - name: "Test Mobile" - needs: determine-affected - if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && github.event.pull_request.head.repo.full_name == github.repository}} - uses: LedgerHQ/ledger-live/.github/workflows/test-mobile-reusable.yml@develop - secrets: inherit - - test-mobile-e2e: - name: "Test Mobile E2E" - needs: determine-affected - if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && github.event.pull_request.head.repo.full_name == github.repository}} - uses: LedgerHQ/ledger-live/.github/workflows/test-mobile-e2e-reusable.yml@develop - secrets: inherit - - # Tests - test-libraries: - name: "Test Libraries" - needs: determine-affected - if: ${{contains(needs.determine-affected.outputs.paths, 'libs') && github.event.pull_request.head.repo.full_name == github.repository}} - uses: LedgerHQ/ledger-live/.github/workflows/test-libs-reusable.yml@develop - secrets: inherit - test-design-system: name: "Test Design System" needs: determine-affected @@ -71,33 +26,12 @@ jobs: uses: LedgerHQ/ledger-live/.github/workflows/test-design-system-reusable.yml@fix/test-ds-workflow secrets: inherit - test-web-tools: - name: "Test Web Tools" - needs: determine-affected - if: ${{contains(needs.determine-affected.outputs.paths, 'apps/web-tools') && github.event.pull_request.head.repo.full_name == github.repository}} - uses: LedgerHQ/ledger-live/.github/workflows/test-web-tools-reusable.yml@develop - secrets: inherit - - test-cli: - name: "Test CLI" - needs: determine-affected - if: ${{contains(needs.determine-affected.outputs.paths, 'apps/cli') && github.event.pull_request.head.repo.full_name == github.repository}} - uses: LedgerHQ/ledger-live/.github/workflows/test-cli-reusable.yml@develop - secrets: inherit # Final Check required ok: name: "OK" needs: - - build-desktop - - test-desktop - - build-mobile - - test-mobile - - test-mobile-e2e - - test-libraries - test-design-system - - test-web-tools - - test-cli runs-on: ubuntu-22.04 if: always() && !cancelled() steps: diff --git a/.github/workflows/test-design-system-reusable.yml b/.github/workflows/test-design-system-reusable.yml index b2548c28ffee..c3b31e5745d6 100644 --- a/.github/workflows/test-design-system-reusable.yml +++ b/.github/workflows/test-design-system-reusable.yml @@ -57,7 +57,7 @@ jobs: run: pnpm i --filter="./libs/ui/**" - name: Build and Test affected libraries id: test-ui - run: pnpm run test --continue --filter="./libs/ui/**" --filter="!./apps/ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" + run: pnpm run test --filter="./libs/ui/**" --filter="!./apps/ledger-live*...[${{ inputs.since_branch && format('origin/{0}', inputs.since_branch) || 'HEAD^1' }}]" --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo" shell: bash - name: (On Failure) Upload react-ui test results uses: actions/upload-artifact@v4 diff --git a/libs/ui/examples/webpack.js/webpack.config.js b/libs/ui/examples/webpack.js/webpack.config.js index ace11ccad436..9d2d9861099c 100644 --- a/libs/ui/examples/webpack.js/webpack.config.js +++ b/libs/ui/examples/webpack.js/webpack.config.js @@ -3,7 +3,7 @@ const HtmlWebpackPlugin = require("html-webpack-plugin"); const ReactRefreshWebpackPlugin = require("@pmmmwh/react-refresh-webpack-plugin"); const isDevelopment = process.env.NODE_ENV !== "production"; - +console.log("test") module.exports = { mode: isDevelopment ? "development" : "production", entry: "./src/index.js", diff --git a/libs/ui/package.json b/libs/ui/package.json index b26df997643b..6eb8de4dac31 100644 --- a/libs/ui/package.json +++ b/libs/ui/package.json @@ -10,13 +10,15 @@ "@ledgerhq/ui-shared": "workspace:^", "@playwright/test": "~1.40.0", "concurrently": "^8.0.0", + "cross-env": "^7.0.3", "json": "^11.0.0", "lint-staged": "^14.0.0" }, "scripts": { "pretest:react": "playwright install", - "test:react": "node tests/react.script webpack.js && node tests/react.script next.js", - "pretest:react:update-snapshots": "playwright install", - "test:react:update-snapshots": "env UPDATE_SNAPSHOTS=1 node tests/react.script webpack.js && env UPDATE_SNAPSHOTS=1 node tests/react.script next.js" + "clean": "pnpm -F ./examples/webpack.js -F ./examples/next.js clean:full", + "test:react": "pnpm clean && pnpm i && pnpm build-next && pnpm e2e", + "build-next": "pnpm -w -F ./examples/webpack.js build", + "e2e": "cross-env UPDATE_SNAPSHOTS=1 pnpm concurrently -s=first -k \"pnpm -w -F ./examples/webpack.js serve\" \"playwright test $([ \"$UPDATE_SNAPSHOTS\" = 1 ] && echo \"--update-snapshots\")\"" } } diff --git a/libs/ui/packages/native/src/components/Cards/BannerCard/index.tsx b/libs/ui/packages/native/src/components/Cards/BannerCard/index.tsx index 511499166f5d..2580e5c3f8ad 100644 --- a/libs/ui/packages/native/src/components/Cards/BannerCard/index.tsx +++ b/libs/ui/packages/native/src/components/Cards/BannerCard/index.tsx @@ -18,7 +18,6 @@ type CloseProps = { onPressDismiss?: () => void; }; -console.log("hello"); export const Container = styled(TouchableOpacity)` background: ${(p) => p.theme.colors.opacityDefault.c05}; flex-direction: row; diff --git a/libs/ui/tests/react.spec.js-snapshots/dark-darwin.png b/libs/ui/tests/react.spec.js-snapshots/dark-darwin.png index c788d27a2d0a..d63711253db1 100644 Binary files a/libs/ui/tests/react.spec.js-snapshots/dark-darwin.png and b/libs/ui/tests/react.spec.js-snapshots/dark-darwin.png differ diff --git a/libs/ui/tests/react.spec.js-snapshots/light-darwin.png b/libs/ui/tests/react.spec.js-snapshots/light-darwin.png index cf65bd5aa2b4..5672b059bcdb 100644 Binary files a/libs/ui/tests/react.spec.js-snapshots/light-darwin.png and b/libs/ui/tests/react.spec.js-snapshots/light-darwin.png differ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d157542b424a..ff93094563b9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6230,6 +6230,9 @@ importers: concurrently: specifier: ^8.0.0 version: 8.2.2 + cross-env: + specifier: ^7.0.3 + version: 7.0.3 json: specifier: ^11.0.0 version: 11.0.0