From 29e52e9fd4a435e7e48b54401ec620558e7c96ae Mon Sep 17 00:00:00 2001 From: Sarah Lessner Date: Tue, 24 Sep 2024 15:33:01 -0600 Subject: [PATCH] fix tests --- apps/salesforce-commerce-cloud/package-lock.json | 8 ++++---- apps/salesforce-commerce-cloud/package.json | 2 +- .../src/locations/ConfigScreen.spec.tsx | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/salesforce-commerce-cloud/package-lock.json b/apps/salesforce-commerce-cloud/package-lock.json index 5030fdeb884..30b3ff73d64 100644 --- a/apps/salesforce-commerce-cloud/package-lock.json +++ b/apps/salesforce-commerce-cloud/package-lock.json @@ -18,7 +18,7 @@ "@emotion/react": "^11.13.3", "@tanstack/react-query": "^4.29.7", "@vitejs/plugin-react": "^4.3.1", - "axios": "^1.4.0", + "axios": "^1.7.7", "commerce-sdk": "^2.10.1", "contentful-management": "10.7.0", "react": "17.0.2", @@ -4642,9 +4642,9 @@ } }, "node_modules/axios": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", - "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", diff --git a/apps/salesforce-commerce-cloud/package.json b/apps/salesforce-commerce-cloud/package.json index 847ce4d9d39..de0f6be8b36 100644 --- a/apps/salesforce-commerce-cloud/package.json +++ b/apps/salesforce-commerce-cloud/package.json @@ -13,7 +13,7 @@ "@emotion/react": "^11.13.3", "@tanstack/react-query": "^4.29.7", "@vitejs/plugin-react": "^4.3.1", - "axios": "^1.4.0", + "axios": "^1.7.7", "commerce-sdk": "^2.10.1", "contentful-management": "10.7.0", "react": "17.0.2", diff --git a/apps/salesforce-commerce-cloud/src/locations/ConfigScreen.spec.tsx b/apps/salesforce-commerce-cloud/src/locations/ConfigScreen.spec.tsx index e4da69ce606..c8f218a89fe 100644 --- a/apps/salesforce-commerce-cloud/src/locations/ConfigScreen.spec.tsx +++ b/apps/salesforce-commerce-cloud/src/locations/ConfigScreen.spec.tsx @@ -10,11 +10,11 @@ vi.mock('@contentful/react-apps-toolkit', () => ({ describe('Config Screen component', () => { it('Component text exists', async () => { - const { getByText } = render(); + const { findByText } = render(); // simulate the user clicking the install button await mockSdk.app.onConfigure.mock.calls[0][0](); - expect(getByText('Welcome to your contentful app. This is your config page.')).toBeTruthy(); + expect(findByText(/Welcome to your contentful app. This is your config page./)).toBeTruthy(); }); });