piral-forms 1.8.0-beta.7667 → 1.8.0-beta.7668

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": "piral-forms",
3
- "version": "1.8.0-beta.7667",
3
+ "version": "1.8.0-beta.7668",
4
4
  "description": "Plugin for providing advanced form support in Piral.",
5
5
  "keywords": [
6
6
  "piral",
@@ -52,9 +52,9 @@
52
52
  "@types/history": "^4.7.8",
53
53
  "@types/react": "^18.0.0",
54
54
  "@types/react-router-dom": "^5.1.6",
55
- "piral-core": "1.8.0-beta.7667",
55
+ "piral-core": "1.8.0-beta.7668",
56
56
  "react": "^18.0.0",
57
57
  "react-router-dom": "^5.2.0"
58
58
  },
59
- "gitHead": "658a8503fdf62c503e4d7cbe86cb3f6da0b2d76d"
59
+ "gitHead": "1b32d52d4d57363bed8af9105dd41a0635075721"
60
60
  }
@@ -31,7 +31,7 @@ describe('Forms Actions Module', () => {
31
31
  }));
32
32
  const ctx = createActions(state, createListener());
33
33
  updateFormState(ctx, 'a', { name: 'Foo', active: true }, { name: 'Bar' });
34
- expect((state.getState())).toEqual({
34
+ expect(state.getState()).toEqual({
35
35
  foo: 5,
36
36
  forms: {
37
37
  a: {
@@ -53,7 +53,7 @@ describe('Forms Actions Module', () => {
53
53
  }));
54
54
  const ctx = createActions(state, createListener());
55
55
  updateFormState(ctx, 'a', { name: 'Foo', active: true }, {});
56
- expect((state.getState())).toEqual({
56
+ expect(state.getState()).toEqual({
57
57
  foo: 5,
58
58
  forms: {
59
59
  a: {
@@ -75,7 +75,7 @@ describe('Forms Actions Module', () => {
75
75
  }));
76
76
  const ctx = createActions(state, createListener());
77
77
  updateFormState(ctx, 'a', { name: 'Foo', active: true }, { name: 'bazeol' });
78
- expect((state.getState())).toEqual({
78
+ expect(state.getState()).toEqual({
79
79
  foo: 5,
80
80
  forms: {
81
81
  a: {
@@ -97,7 +97,7 @@ describe('Forms Actions Module', () => {
97
97
  }));
98
98
  const ctx = createActions(state, createListener());
99
99
  updateFormState(ctx, 'a', { name: 'Foo' }, { active: false });
100
- expect((state.getState())).toEqual({
100
+ expect(state.getState()).toEqual({
101
101
  foo: 5,
102
102
  forms: {},
103
103
  });
@@ -114,7 +114,7 @@ describe('Forms Actions Module', () => {
114
114
  }));
115
115
  const ctx = createActions(state, createListener());
116
116
  updateFormState(ctx, 'a', { name: 'Foo', submitting: true }, { active: false });
117
- expect((state.getState())).toEqual({
117
+ expect(state.getState()).toEqual({
118
118
  foo: 5,
119
119
  forms: {
120
120
  a: {
@@ -137,7 +137,7 @@ describe('Forms Actions Module', () => {
137
137
  }));
138
138
  const ctx = createActions(state, createListener());
139
139
  updateFormState(ctx, 'a', { name: 'Foo', changed: true }, { submitting: false, active: '' });
140
- expect((state.getState())).toEqual({
140
+ expect(state.getState()).toEqual({
141
141
  foo: 5,
142
142
  forms: {
143
143
  a: {
@@ -161,7 +161,7 @@ describe('Forms Actions Module', () => {
161
161
  }));
162
162
  const ctx = createActions(state, createListener());
163
163
  updateFormState(ctx, 'a', { name: 'Foo', changed: false, active: '' }, { submitting: false });
164
- expect((state.getState())).toEqual({
164
+ expect(state.getState()).toEqual({
165
165
  foo: 5,
166
166
  forms: {},
167
167
  });
@@ -22,7 +22,7 @@ const mockState = {
22
22
  };
23
23
 
24
24
  vitest.mock('react', async () => ({
25
- ...(await vitest.importActual('react') as any),
25
+ ...((await vitest.importActual('react')) as any),
26
26
  useMemo: (cb) => cb(),
27
27
  }));
28
28
 
@@ -48,7 +48,7 @@ describe('withForm Module', () => {
48
48
  (usePromise as any).usePromise = usedPromise;
49
49
  const Component: any = withForm(StubComponent, options);
50
50
  const node = mountWithRouter(<Component />);
51
- expect(node.getAllByRole("error").length).toBe(1);
51
+ expect(node.getAllByRole('error').length).toBe(1);
52
52
  });
53
53
 
54
54
  it('shows data component if nothing is loading and data is available', () => {
@@ -65,7 +65,7 @@ describe('withForm Module', () => {
65
65
  (usePromise as any).usePromise = usedPromise;
66
66
  const Component: any = withForm(StubComponent, options);
67
67
  const node = mountWithRouter(<Component />);
68
- expect(node.getAllByRole("component").length).toBe(1);
68
+ expect(node.getAllByRole('component').length).toBe(1);
69
69
  });
70
70
 
71
71
  it('shows loading component if it is loading', () => {
@@ -82,7 +82,7 @@ describe('withForm Module', () => {
82
82
  (usePromise as any).usePromise = usedPromise;
83
83
  const Component: any = withForm(StubComponent, options);
84
84
  const node = mountWithRouter(<Component />);
85
- expect(node.getAllByRole("loader").length).toBe(1);
85
+ expect(node.getAllByRole('loader').length).toBe(1);
86
86
  });
87
87
 
88
88
  it('calls load data if its there', () => {