Skip to content

Commit f8932ea

Browse files
author
Maciej Warszawski
committed
fix missing notification for empty namespaces
1 parent 42ffe3b commit f8932ea

File tree

3 files changed

+207
-195
lines changed

3 files changed

+207
-195
lines changed
Lines changed: 189 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -1,180 +1,189 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
2-
3-
exports[`Namespace synchronizer should categorize resources to missing or modified 1`] = `
4-
Object {
5-
"addMissing": [MockFunction] {
6-
"calls": Array [
7-
Array [
8-
"a",
9-
Object {
10-
"message-c2": "c2",
11-
},
12-
],
13-
Array [
14-
"b",
15-
Object {
16-
"message-b2": "b2",
17-
"message-g2": "g2",
18-
},
19-
],
20-
Array [
21-
"c",
22-
Object {
23-
"message-h2": "h2",
24-
},
25-
],
26-
],
27-
},
28-
"getLanguages": [MockFunction],
29-
"getNamespace": [MockFunction] {
30-
"calls": Array [
31-
Array [
32-
"a",
33-
],
34-
Array [
35-
"b",
36-
],
37-
Array [
38-
"c",
39-
],
40-
],
41-
},
42-
"getNamespaceForLanguage": [MockFunction],
43-
"pullNamespace": [MockFunction],
44-
"updateModified": [MockFunction] {
45-
"calls": Array [
46-
Array [
47-
"a",
48-
Object {
49-
"message-a1": "a2",
50-
},
51-
],
52-
Array [
53-
"b",
54-
Object {
55-
"message-f1": "f2",
56-
},
57-
],
58-
Array [
59-
"c",
60-
Object {
61-
"message-d1": "d2",
62-
"message-i1": "i1",
63-
},
64-
],
65-
],
66-
},
67-
}
68-
`;
69-
70-
exports[`Namespace synchronizer should change language after request namespaces 1`] = `
71-
Object {
72-
"addMissing": [MockFunction],
73-
"getLanguages": [MockFunction],
74-
"getNamespace": [MockFunction] {
75-
"calls": Array [
76-
Array [
77-
"a",
78-
],
79-
],
80-
},
81-
"getNamespaceForLanguage": [MockFunction] {
82-
"calls": Array [
83-
Array [
84-
"a",
85-
"pl",
86-
],
87-
],
88-
},
89-
"pullNamespace": [MockFunction],
90-
"updateModified": [MockFunction],
91-
}
92-
`;
93-
94-
exports[`Namespace synchronizer should change language after request namespaces 2`] = `
95-
[MockFunction] {
96-
"calls": Array [
97-
Array [
98-
Object {
99-
"namespace": "a",
100-
"resource": Object {
101-
"message-a1": "a1",
102-
"message-c1": "c1",
103-
},
104-
},
105-
],
106-
Array [
107-
Object {
108-
"namespace": "a",
109-
"resource": Object {
110-
"message-a1": "a1 - pl",
111-
"message-c1": "c1 - pl",
112-
},
113-
},
114-
],
115-
],
116-
}
117-
`;
118-
119-
exports[`Namespace synchronizer should change language without request namespaces 1`] = `
120-
Object {
121-
"addMissing": [MockFunction],
122-
"getLanguages": [MockFunction],
123-
"getNamespace": [MockFunction],
124-
"getNamespaceForLanguage": [MockFunction],
125-
"pullNamespace": [MockFunction],
126-
"updateModified": [MockFunction],
127-
}
128-
`;
129-
130-
exports[`Namespace synchronizer should refresh namespaces 1`] = `
131-
Object {
132-
"addMissing": [MockFunction],
133-
"getLanguages": [MockFunction],
134-
"getNamespace": [MockFunction] {
135-
"calls": Array [
136-
Array [
137-
"a",
138-
],
139-
],
140-
},
141-
"getNamespaceForLanguage": [MockFunction],
142-
"pullNamespace": [MockFunction] {
143-
"calls": Array [
144-
Array [
145-
"a",
146-
"pl",
147-
Object {
148-
"updatedAfter": 2000-01-01T00:00:00.000Z,
149-
},
150-
],
151-
],
152-
},
153-
"updateModified": [MockFunction],
154-
}
155-
`;
156-
157-
exports[`Namespace synchronizer should refresh namespaces 2`] = `
158-
[MockFunction] {
159-
"calls": Array [
160-
Array [
161-
Object {
162-
"namespace": "a",
163-
"resource": Object {
164-
"message-a1": "a1",
165-
"message-c1": "c1",
166-
},
167-
},
168-
],
169-
Array [
170-
Object {
171-
"namespace": "a",
172-
"resource": Object {
173-
"message-a1": "a1 - pl - {\\"updatedAfter\\":\\"2000-01-01T00:00:00.000Z\\"}",
174-
"message-c1": "c1 - pl - {\\"updatedAfter\\":\\"2000-01-01T00:00:00.000Z\\"}",
175-
},
176-
},
177-
],
178-
],
179-
}
180-
`;
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Namespace synchronizer should categorize resources to missing or modified 1`] = `
4+
Object {
5+
"addMissing": [MockFunction] {
6+
"calls": Array [
7+
Array [
8+
"a",
9+
Object {
10+
"message-c2": "c2",
11+
},
12+
],
13+
Array [
14+
"b",
15+
Object {
16+
"message-b2": "b2",
17+
"message-g2": "g2",
18+
},
19+
],
20+
Array [
21+
"c",
22+
Object {
23+
"message-h2": "h2",
24+
},
25+
],
26+
Array [
27+
"d",
28+
Object {
29+
"message-j1": "j1",
30+
},
31+
],
32+
],
33+
},
34+
"getLanguages": [MockFunction],
35+
"getNamespace": [MockFunction] {
36+
"calls": Array [
37+
Array [
38+
"a",
39+
],
40+
Array [
41+
"b",
42+
],
43+
Array [
44+
"c",
45+
],
46+
Array [
47+
"d",
48+
],
49+
],
50+
},
51+
"getNamespaceForLanguage": [MockFunction],
52+
"pullNamespace": [MockFunction],
53+
"updateModified": [MockFunction] {
54+
"calls": Array [
55+
Array [
56+
"a",
57+
Object {
58+
"message-a1": "a2",
59+
},
60+
],
61+
Array [
62+
"b",
63+
Object {
64+
"message-f1": "f2",
65+
},
66+
],
67+
Array [
68+
"c",
69+
Object {
70+
"message-d1": "d2",
71+
"message-i1": "i1",
72+
},
73+
],
74+
],
75+
},
76+
}
77+
`;
78+
79+
exports[`Namespace synchronizer should change language after request namespaces 1`] = `
80+
Object {
81+
"addMissing": [MockFunction],
82+
"getLanguages": [MockFunction],
83+
"getNamespace": [MockFunction] {
84+
"calls": Array [
85+
Array [
86+
"a",
87+
],
88+
],
89+
},
90+
"getNamespaceForLanguage": [MockFunction] {
91+
"calls": Array [
92+
Array [
93+
"a",
94+
"pl",
95+
],
96+
],
97+
},
98+
"pullNamespace": [MockFunction],
99+
"updateModified": [MockFunction],
100+
}
101+
`;
102+
103+
exports[`Namespace synchronizer should change language after request namespaces 2`] = `
104+
[MockFunction] {
105+
"calls": Array [
106+
Array [
107+
Object {
108+
"namespace": "a",
109+
"resource": Object {
110+
"message-a1": "a1",
111+
"message-c1": "c1",
112+
},
113+
},
114+
],
115+
Array [
116+
Object {
117+
"namespace": "a",
118+
"resource": Object {
119+
"message-a1": "a1 - pl",
120+
"message-c1": "c1 - pl",
121+
},
122+
},
123+
],
124+
],
125+
}
126+
`;
127+
128+
exports[`Namespace synchronizer should change language without request namespaces 1`] = `
129+
Object {
130+
"addMissing": [MockFunction],
131+
"getLanguages": [MockFunction],
132+
"getNamespace": [MockFunction],
133+
"getNamespaceForLanguage": [MockFunction],
134+
"pullNamespace": [MockFunction],
135+
"updateModified": [MockFunction],
136+
}
137+
`;
138+
139+
exports[`Namespace synchronizer should refresh namespaces 1`] = `
140+
Object {
141+
"addMissing": [MockFunction],
142+
"getLanguages": [MockFunction],
143+
"getNamespace": [MockFunction] {
144+
"calls": Array [
145+
Array [
146+
"a",
147+
],
148+
],
149+
},
150+
"getNamespaceForLanguage": [MockFunction],
151+
"pullNamespace": [MockFunction] {
152+
"calls": Array [
153+
Array [
154+
"a",
155+
"pl",
156+
Object {
157+
"updatedAfter": 2000-01-01T00:00:00.000Z,
158+
},
159+
],
160+
],
161+
},
162+
"updateModified": [MockFunction],
163+
}
164+
`;
165+
166+
exports[`Namespace synchronizer should refresh namespaces 2`] = `
167+
[MockFunction] {
168+
"calls": Array [
169+
Array [
170+
Object {
171+
"namespace": "a",
172+
"resource": Object {
173+
"message-a1": "a1",
174+
"message-c1": "c1",
175+
},
176+
},
177+
],
178+
Array [
179+
Object {
180+
"namespace": "a",
181+
"resource": Object {
182+
"message-a1": "a1 - pl - {\\"updatedAfter\\":\\"2000-01-01T00:00:00.000Z\\"}",
183+
"message-c1": "c1 - pl - {\\"updatedAfter\\":\\"2000-01-01T00:00:00.000Z\\"}",
184+
},
185+
},
186+
],
187+
],
188+
}
189+
`;

0 commit comments

Comments
 (0)