@jobber/components-native 0.89.3-JOB-139056-70a36ef.0 → 0.89.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.89.3-JOB-139056-70a36ef.0+70a36efd2",
3
+ "version": "0.89.4",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -94,5 +94,5 @@
94
94
  "react-native-safe-area-context": "^5.4.0",
95
95
  "react-native-svg": ">=12.0.0"
96
96
  },
97
- "gitHead": "70a36efd2974f1fc021143eb45c9331a3fa8842b"
97
+ "gitHead": "adc76ab79cbad1b62fa1d3ff35020f061b390292"
98
98
  }
@@ -51,24 +51,24 @@ describe("ThemeContext", () => {
51
51
  expect(result.current.tokens).toEqual(expectedLightTokens);
52
52
  });
53
53
 
54
- it("updates the theme and tokens", () => {
54
+ it("updates the theme and tokens", async () => {
55
55
  const { result } = renderHook(useAtlantisTheme, {
56
56
  wrapper: (props: AtlantisThemeContextProviderProps) => (
57
57
  <Wrapper {...props} />
58
58
  ),
59
59
  });
60
60
 
61
- act(() => result.current.setTheme("dark"));
61
+ await act(async () => result.current.setTheme("dark"));
62
62
  expect(result.current.theme).toBe("dark");
63
63
  expect(result.current.tokens).toEqual(expectedDarkTokens);
64
64
 
65
- act(() => result.current.setTheme("light"));
65
+ await act(async () => result.current.setTheme("light"));
66
66
  expect(result.current.theme).toBe("light");
67
67
  expect(result.current.tokens).toEqual(expectedLightTokens);
68
68
  });
69
69
 
70
70
  describe("when theme is forced for provider", () => {
71
- it("ignores updates to the global theme", () => {
71
+ it("ignores updates to the global theme", async () => {
72
72
  const { result } = renderHook(useAtlantisTheme, {
73
73
  wrapper: (props: AtlantisThemeContextProviderProps) => (
74
74
  <WrapperWithOverride {...props} dangerouslyOverrideTheme="light" />
@@ -76,7 +76,7 @@ describe("ThemeContext", () => {
76
76
  });
77
77
 
78
78
  // Update the global theme
79
- act(() => result.current.setTheme("dark"));
79
+ await act(async () => result.current.setTheme("dark"));
80
80
 
81
81
  // This hook shouldn't be affected by it because it's set to the light theme
82
82
  expect(result.current.theme).toBe("light");
@@ -111,7 +111,7 @@ async function renderAndOpenContentOverlay(
111
111
  ) {
112
112
  const rendered = renderContentOverlay(defaultOptions);
113
113
 
114
- act(() => {
114
+ await act(async () => {
115
115
  fireEvent.press(rendered.getByLabelText(defaultOptions.buttonLabel));
116
116
  });
117
117
 
@@ -144,7 +144,7 @@ describe("when the close button is clicked on an open content overlay", () => {
144
144
  };
145
145
  const contentOverlayScreen = await renderAndOpenContentOverlay(options);
146
146
 
147
- act(() => {
147
+ await act(async () => {
148
148
  fireEvent.press(
149
149
  contentOverlayScreen.getByTestId("ATL-Overlay-CloseButton"),
150
150
  );
@@ -165,7 +165,7 @@ describe("when the close button is clicked on an open content overlay with a def
165
165
  };
166
166
  const contentOverlayScreen = await renderAndOpenContentOverlay(options);
167
167
 
168
- act(() => {
168
+ await act(async () => {
169
169
  fireEvent.press(
170
170
  contentOverlayScreen.getByTestId("ATL-Overlay-CloseButton"),
171
171
  );
@@ -301,7 +301,7 @@ describe("when the close button is clicked on an open content overlay with a def
301
301
  };
302
302
  const contentOverlayScreen = await renderAndOpenContentOverlay(options);
303
303
 
304
- act(() => {
304
+ await act(async () => {
305
305
  fireEvent.press(
306
306
  contentOverlayScreen.getByTestId("ATL-Overlay-CloseButton"),
307
307
  );
@@ -8,19 +8,19 @@ const keyboardEvent: Partial<KeyboardEvent> = {
8
8
  };
9
9
 
10
10
  describe("when the user is typing", () => {
11
- it("sets the isKeyboardVisible to true", () => {
11
+ it("sets the isKeyboardVisible to true", async () => {
12
12
  const { result } = renderHook(() => useKeyboardVisibility());
13
13
 
14
- act(() => {
14
+ await act(async () => {
15
15
  DeviceEventEmitter.emit("keyboardDidShow", keyboardEvent);
16
16
  });
17
17
 
18
18
  expect(result.current.isKeyboardVisible).toBe(true);
19
19
  });
20
- it("the keyboardDidShow event emits the keyboard height", () => {
20
+ it("the keyboardDidShow event emits the keyboard height", async () => {
21
21
  const { result } = renderHook(() => useKeyboardVisibility());
22
22
 
23
- act(() => {
23
+ await act(async () => {
24
24
  DeviceEventEmitter.emit("keyboardDidShow", keyboardEvent);
25
25
  });
26
26
 
@@ -31,10 +31,10 @@ describe("when the user is typing", () => {
31
31
  });
32
32
 
33
33
  describe("when the user not typing", () => {
34
- it("sets the isKeyboardVisible to false", () => {
34
+ it("sets the isKeyboardVisible to false", async () => {
35
35
  const { result } = renderHook(() => useKeyboardVisibility());
36
36
 
37
- act(() => {
37
+ await act(async () => {
38
38
  DeviceEventEmitter.emit("keyboardDidHide");
39
39
  });
40
40
 
@@ -39,11 +39,11 @@ const basicRenderTestWithValue = () => {
39
39
  const removeLabel = `Remove ${bottomSheetOptionsSuffix}`;
40
40
  let tree: RenderAPI;
41
41
 
42
- beforeEach(() => {
42
+ beforeEach(async () => {
43
43
  tree = renderBottomSheet(
44
44
  bottomSheetOptionsSuffix as BottomSheetOptionsSuffix,
45
45
  );
46
- act(() => {
46
+ await act(async () => {
47
47
  bottomSheetRef.current?.open();
48
48
  });
49
49
  });
@@ -46,7 +46,7 @@ describe("Glimmer", () => {
46
46
  );
47
47
  });
48
48
 
49
- it("renders sets the correct width", () => {
49
+ it("renders sets the correct width", async () => {
50
50
  jest.useFakeTimers();
51
51
 
52
52
  // Spy on Animated.timing to verify the animation configuration
@@ -54,7 +54,7 @@ describe("Glimmer", () => {
54
54
 
55
55
  render(<Glimmer />);
56
56
 
57
- act(() => {
57
+ await act(async () => {
58
58
  fireEvent(screen.getByTestId(GLIMMER_TEST_ID), "onLayout", {
59
59
  nativeEvent: { layout: { width: 300 } },
60
60
  });