diff --git a/.circleci/config.yml b/.circleci/config.yml index d53f859cd70..7144f6bf335 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ commands: steps: - node/install: install-yarn: true - node-version: "20.8.1" + node-version: "20.9.0" generate-checksums: steps: - run: @@ -171,7 +171,7 @@ jobs: deploy-nightly-beta: executor: name: node/default - tag: "20.8.1" + tag: "20.9.0" resource_class: small steps: @@ -221,7 +221,7 @@ jobs: parallelism: 8 executor: name: node/default - tag: "20.8.1" + tag: "20.9.0" resource_class: large steps: - checkout @@ -241,7 +241,7 @@ jobs: update-metaphysics: executor: name: node/default - tag: "20.8.1" + tag: "20.9.0" resource_class: medium steps: - checkout @@ -256,7 +256,7 @@ jobs: check-code: executor: name: node/default - tag: "20.8.1" + tag: "20.9.0" resource_class: small steps: - checkout @@ -295,7 +295,7 @@ jobs: build-test-js: executor: name: node/default - tag: "20.8.1" + tag: "20.9.0" resource_class: medium steps: - checkout diff --git a/.nvmrc b/.nvmrc index 6569dfa4f32..f3f52b42d3d 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.8.1 +20.9.0 diff --git a/.tool-versions b/.tool-versions index 3b974aff191..af88c164dd0 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,3 @@ -nodejs 20.8.1 +nodejs 20.9.0 ruby 2.7.8 java zulu-11.58.15 diff --git a/src/app/Scenes/Inbox/Components/Conversations/Messages.tests.tsx b/src/app/Scenes/Inbox/Components/Conversations/Messages.tests.tsx index 0931ecdb066..e9b46a2931a 100644 --- a/src/app/Scenes/Inbox/Components/Conversations/Messages.tests.tsx +++ b/src/app/Scenes/Inbox/Components/Conversations/Messages.tests.tsx @@ -1,5 +1,6 @@ -import { Flex, Text } from "@artsy/palette-mobile" +import { Text } from "@artsy/palette-mobile" import { MessagesTestsQuery } from "__generated__/MessagesTestsQuery.graphql" +import { ToastComponent } from "app/Components/Toast/ToastComponent" import { extractText } from "app/utils/tests/extractText" import { renderWithWrappersLEGACY } from "app/utils/tests/renderWithWrappers" import { RefreshControl } from "react-native" @@ -26,12 +27,14 @@ jest.mock("@react-native-community/netinfo", () => { let env: ReturnType beforeEach(() => { - jest.useFakeTimers({ - legacyFakeTimers: true, - }) + jest.useFakeTimers({ legacyFakeTimers: true }) env = createMockEnvironment() }) +afterEach(() => { + jest.useRealTimers() +}) + const onRefresh = jest.fn() const TestRenderer = () => ( @@ -129,8 +132,7 @@ describe("messages with order updates", () => { expect(extractText(tree.root)).toMatch("You sent an offer for") }) - it("shows the toast message and fades out after 5 seconds", () => { - jest.useFakeTimers({ legacyFakeTimers: true }) + it("shows a toast message", () => { const tree = withConversationItems(getWrapper, { events: [ { @@ -147,11 +149,8 @@ describe("messages with order updates", () => { "To be covered by the Artsy Guarantee, always communicate and pay through the Artsy platform." ) - const toast = tree.root.findAllByType(Flex)[0] - jest.advanceTimersByTime(5000) - expect(toast.props.opacity).toBe(1) - jest.advanceTimersByTime(900000) // this number is weird, but i guess once Toast is moved to reanimated, this should be easier to use a much smaller number? - expect(toast.props.opacity).toBe(0) + const toast = tree.root.findAllByType(ToastComponent)[0] + expect(toast).toBeDefined() }) it("sorts interleaved items by date", () => {