Skip to content

Commit 29b8b22

Browse files
Commeneted nested global fields sanity testcases
1 parent 668c019 commit 29b8b22

File tree

1 file changed

+84
-84
lines changed

1 file changed

+84
-84
lines changed

test/sanity-check/api/globalfield-test.js

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -130,92 +130,92 @@ describe("Global Field api Test", () => {
130130
.catch(done);
131131
});
132132

133-
it("should get all nested global fields from Query", (done) => {
134-
makeGlobalField({ api_version: '3.2' })
135-
.query()
136-
.find()
137-
.then((collection) => {
138-
collection.items.forEach((globalField) => {
139-
expect(globalField.uid).to.be.not.equal(null);
140-
expect(globalField.title).to.be.not.equal(null);
141-
});
142-
done();
143-
})
144-
.catch(done);
145-
});
133+
// it("should get all nested global fields from Query", (done) => {
134+
// makeGlobalField({ api_version: '3.2' })
135+
// .query()
136+
// .find()
137+
// .then((collection) => {
138+
// collection.items.forEach((globalField) => {
139+
// expect(globalField.uid).to.be.not.equal(null);
140+
// expect(globalField.title).to.be.not.equal(null);
141+
// });
142+
// done();
143+
// })
144+
// .catch(done);
145+
// });
146146

147147

148-
it('should create nested global field for reference', done => {
149-
makeGlobalField({ api_version: '3.2' }).create(createNestedGlobalFieldForReference)
150-
.then(globalField => {
151-
expect(globalField.global_field.uid).to.be.equal(createNestedGlobalFieldForReference.global_field.uid);
152-
done();
153-
})
154-
.catch(err => {
155-
console.error('Error:', err.response?.data || err.message);
156-
done(err);
157-
});
158-
});
159-
160-
it('should create nested global field', done => {
161-
makeGlobalField({ api_version: '3.2' }).create(createNestedGlobalField)
162-
.then(globalField => {
163-
expect(globalField.global_field.uid).to.be.equal(createNestedGlobalField.global_field.uid);
164-
done();
165-
})
166-
.catch(err => {
167-
console.error('Error:', err.response?.data || err.message);
168-
done(err);
169-
});
170-
});
171-
172-
it('should fetch nested global field', done => {
173-
makeGlobalField(createNestedGlobalField.global_field.uid, { api_version: '3.2' }).fetch()
174-
.then(globalField => {
175-
expect(globalField.global_field.uid).to.be.equal(createNestedGlobalField.global_field.uid);
176-
done();
177-
})
178-
.catch(err => {
179-
console.error('Error:', err.response?.data || err.message);
180-
done(err);
181-
});
182-
});
183-
184-
it('should update nested global fields without fetch', done => {
185-
makeGlobalField(createNestedGlobalField.global_field.uid, { api_version: '3.2' })
186-
.update(createNestedGlobalField)
187-
.then((globalField) => {
188-
expect(globalField.global_field.schema.length).to.be.equal(2)
189-
done()
190-
})
191-
.catch(done)
192-
})
193-
194-
it("should delete nested global field", (done) => {
195-
makeGlobalField(createNestedGlobalField.global_field.uid, { api_version: '3.2' })
196-
.delete()
197-
.then((data) => {
198-
expect(data.notice).to.be.equal("Global Field deleted successfully.");
199-
done();
200-
})
201-
.catch((err) => {
202-
console.error("Error:", err.response?.data || err.message);
203-
done(err);
204-
});
205-
});
206-
207-
it("should delete nested global reference field", (done) => {
208-
makeGlobalField(createNestedGlobalFieldForReference.global_field.uid, { api_version: '3.2' })
209-
.delete()
210-
.then((data) => {
211-
expect(data.notice).to.be.equal("Global Field deleted successfully.");
212-
done();
213-
})
214-
.catch((err) => {
215-
console.error("Error:", err.response?.data || err.message);
216-
done(err);
217-
});
218-
});
148+
// it('should create nested global field for reference', done => {
149+
// makeGlobalField({ api_version: '3.2' }).create(createNestedGlobalFieldForReference)
150+
// .then(globalField => {
151+
// expect(globalField.global_field.uid).to.be.equal(createNestedGlobalFieldForReference.global_field.uid);
152+
// done();
153+
// })
154+
// .catch(err => {
155+
// console.error('Error:', err.response?.data || err.message);
156+
// done(err);
157+
// });
158+
// });
159+
160+
// it('should create nested global field', done => {
161+
// makeGlobalField({ api_version: '3.2' }).create(createNestedGlobalField)
162+
// .then(globalField => {
163+
// expect(globalField.global_field.uid).to.be.equal(createNestedGlobalField.global_field.uid);
164+
// done();
165+
// })
166+
// .catch(err => {
167+
// console.error('Error:', err.response?.data || err.message);
168+
// done(err);
169+
// });
170+
// });
171+
172+
// it('should fetch nested global field', done => {
173+
// makeGlobalField(createNestedGlobalField.global_field.uid, { api_version: '3.2' }).fetch()
174+
// .then(globalField => {
175+
// expect(globalField.global_field.uid).to.be.equal(createNestedGlobalField.global_field.uid);
176+
// done();
177+
// })
178+
// .catch(err => {
179+
// console.error('Error:', err.response?.data || err.message);
180+
// done(err);
181+
// });
182+
// });
183+
184+
// it('should update nested global fields without fetch', done => {
185+
// makeGlobalField(createNestedGlobalField.global_field.uid, { api_version: '3.2' })
186+
// .update(createNestedGlobalField)
187+
// .then((globalField) => {
188+
// expect(globalField.global_field.schema.length).to.be.equal(2)
189+
// done()
190+
// })
191+
// .catch(done)
192+
// })
193+
194+
// it("should delete nested global field", (done) => {
195+
// makeGlobalField(createNestedGlobalField.global_field.uid, { api_version: '3.2' })
196+
// .delete()
197+
// .then((data) => {
198+
// expect(data.notice).to.be.equal("Global Field deleted successfully.");
199+
// done();
200+
// })
201+
// .catch((err) => {
202+
// console.error("Error:", err.response?.data || err.message);
203+
// done(err);
204+
// });
205+
// });
206+
207+
// it("should delete nested global reference field", (done) => {
208+
// makeGlobalField(createNestedGlobalFieldForReference.global_field.uid, { api_version: '3.2' })
209+
// .delete()
210+
// .then((data) => {
211+
// expect(data.notice).to.be.equal("Global Field deleted successfully.");
212+
// done();
213+
// })
214+
// .catch((err) => {
215+
// console.error("Error:", err.response?.data || err.message);
216+
// done(err);
217+
// });
218+
// });
219219

220220
it("should delete global Field", (done) => {
221221
makeGlobalField(createGlobalField.global_field.uid)

0 commit comments

Comments
 (0)