Skip to content

Commit

Permalink
test: Add more test IDs (#9285)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddrechse authored Aug 16, 2024
1 parent 9552a4c commit 2a63129
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
12 changes: 6 additions & 6 deletions spec/CloudCode.Validator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ describe('cloud validator', () => {
done();
});

it('basic beforeSave Parse.Config skipWithMasterKey', async () => {
it_id('893eec0c-41bd-4adf-8f0a-306087ad8d61')(it)('basic beforeSave Parse.Config skipWithMasterKey', async () => {
Parse.Cloud.beforeSave(
Parse.Config,
() => {
Expand All @@ -750,7 +750,7 @@ describe('cloud validator', () => {
expect(config.get('number')).toBe(12);
});

it('basic afterSave Parse.Config skipWithMasterKey', async () => {
it_id('91e739a4-6a38-405c-8f83-f36d48220734')(it)('basic afterSave Parse.Config skipWithMasterKey', async () => {
Parse.Cloud.afterSave(
Parse.Config,
() => {
Expand Down Expand Up @@ -1531,15 +1531,15 @@ describe('cloud validator', () => {
}
});

it('validate beforeSave Parse.Config', async () => {
it_id('32ca1a99-7f2b-429d-a7cf-62b6661d0af6')(it)('validate beforeSave Parse.Config', async () => {
Parse.Cloud.beforeSave(Parse.Config, () => {}, validatorSuccess);
const config = await testConfig();
expect(config.get('internal')).toBe('i');
expect(config.get('string')).toBe('s');
expect(config.get('number')).toBe(12);
});

it('validate beforeSave Parse.Config fail', async () => {
it_id('c84d11e7-d09c-4843-ad98-f671511bf612')(it)('validate beforeSave Parse.Config fail', async () => {
Parse.Cloud.beforeSave(Parse.Config, () => {}, validatorFail);
try {
await testConfig();
Expand All @@ -1549,15 +1549,15 @@ describe('cloud validator', () => {
}
});

it('validate afterSave Parse.Config', async () => {
it_id('b18b9a6a-0e35-4b60-9771-30f53501df3c')(it)('validate afterSave Parse.Config', async () => {
Parse.Cloud.afterSave(Parse.Config, () => {}, validatorSuccess);
const config = await testConfig();
expect(config.get('internal')).toBe('i');
expect(config.get('string')).toBe('s');
expect(config.get('number')).toBe(12);
});

it('validate afterSave Parse.Config fail', async () => {
it_id('ef761222-1758-4614-b984-da84d73fc10c')(it)('validate afterSave Parse.Config fail', async () => {
Parse.Cloud.afterSave(Parse.Config, () => {}, validatorFail);
try {
await testConfig();
Expand Down
12 changes: 6 additions & 6 deletions spec/CloudCode.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3926,7 +3926,7 @@ describe('Cloud Config hooks', () => {
return Parse.Config.save({ internal: 'i', string: 's', number: 12 }, { internal: true });
}

it('beforeSave(Parse.Config) can run hook with new config', async () => {
it_id('997fe20a-96f7-454a-a5b0-c155b8d02f05')(it)('beforeSave(Parse.Config) can run hook with new config', async () => {
let count = 0;
Parse.Cloud.beforeSave(Parse.Config, (req) => {
expect(req.object).toBeDefined();
Expand All @@ -3950,7 +3950,7 @@ describe('Cloud Config hooks', () => {
expect(count).toBe(1);
});

it('beforeSave(Parse.Config) can run hook with existing config', async () => {
it_id('06a9b66c-ffb4-43d1-a025-f7d2192500e7')(it)('beforeSave(Parse.Config) can run hook with existing config', async () => {
let count = 0;
Parse.Cloud.beforeSave(Parse.Config, (req) => {
if (count === 0) {
Expand All @@ -3968,7 +3968,7 @@ describe('Cloud Config hooks', () => {
expect(count).toBe(2);
});

it('beforeSave(Parse.Config) should not change config if nothing is returned', async () => {
it_id('ca76de8e-671b-4c2d-9535-bd28a855fa1a')(it)('beforeSave(Parse.Config) should not change config if nothing is returned', async () => {
let count = 0;
Parse.Cloud.beforeSave(Parse.Config, () => {
count += 1;
Expand Down Expand Up @@ -4021,7 +4021,7 @@ describe('Cloud Config hooks', () => {
}
});

it('afterSave(Parse.Config) can run hook with new config', async () => {
it_id('3e7a75c0-6c2e-4c7e-b042-6eb5f23acf94')(it)('afterSave(Parse.Config) can run hook with new config', async () => {
let count = 0;
Parse.Cloud.afterSave(Parse.Config, (req) => {
expect(req.object).toBeDefined();
Expand All @@ -4045,7 +4045,7 @@ describe('Cloud Config hooks', () => {
expect(count).toBe(1);
});

it('afterSave(Parse.Config) can run hook with existing config', async () => {
it_id('5cffb28a-2924-4857-84bb-f5778d80372a')(it)('afterSave(Parse.Config) can run hook with existing config', async () => {
let count = 0;
Parse.Cloud.afterSave(Parse.Config, (req) => {
if (count === 0) {
Expand All @@ -4063,7 +4063,7 @@ describe('Cloud Config hooks', () => {
expect(count).toBe(2);
});

it('afterSave(Parse.Config) should throw error', async () => {
it_id('49883992-ce91-4797-85f9-7cce1f819407')(it)('afterSave(Parse.Config) should throw error', async () => {
Parse.Cloud.afterSave(Parse.Config, () => {
throw new Parse.Error(400, 'It should fail');
});
Expand Down
4 changes: 2 additions & 2 deletions spec/EmailVerificationToken.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ describe('Email Verification Token Expiration: ', () => {
expect(emailSpy).toHaveBeenCalledTimes(0);
});

it('provides full user object in email verification function on email and username change', async () => {
it_id('d98babc1-feb8-4b5e-916c-57dc0a6ed9fb')(it)('provides full user object in email verification function on email and username change', async () => {
const emailAdapter = {
sendVerificationEmail: () => {},
sendPasswordResetEmail: () => Promise.resolve(),
Expand Down Expand Up @@ -679,7 +679,7 @@ describe('Email Verification Token Expiration: ', () => {
});
});

it('setting the email on the user should set a new email verification token and new expiration date for the token when expire email verify token flag is set', done => {
it_id('b6c87f35-d887-477d-bc86-a9217a424f53')(it)('setting the email on the user should set a new email verification token and new expiration date for the token when expire email verify token flag is set', done => {
const user = new Parse.User();
let userBeforeEmailReset;

Expand Down
2 changes: 1 addition & 1 deletion spec/ParseObject.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ describe('Parse.Object testing', () => {
expect(result.get('items')).toEqual(obj.get('items'));
});

it('can query array nested fields', async () => {
it_id('44097c6f-d0ca-4dc5-aa8a-3dd2d9ac645a')(it)('can query array nested fields', async () => {
const objects = [];
for (let i = 0; i < 10; i++) {
const obj = new TestObject();
Expand Down
4 changes: 2 additions & 2 deletions spec/ParseUser.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2271,7 +2271,7 @@ describe('Parse.User testing', () => {
);
});

it('signup should fail with duplicate case insensitive username with field specific setter', async () => {
it_id('1cef005b-d5f0-4699-af0c-bb0af27d2437')(it)('signup should fail with duplicate case insensitive username with field specific setter', async () => {
const user = new Parse.User();
user.setUsername('test1');
user.setPassword('test');
Expand All @@ -2285,7 +2285,7 @@ describe('Parse.User testing', () => {
);
});

it('signup should fail with duplicate case insensitive email', async () => {
it_id('12735529-98d1-42c0-b437-3b47fe78ddde')(it)('signup should fail with duplicate case insensitive email', async () => {
const user = new Parse.User();
user.setUsername('test1');
user.setPassword('test');
Expand Down
6 changes: 3 additions & 3 deletions spec/PointerPermissions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2517,7 +2517,7 @@ describe('Pointer Permissions', () => {
done();
});

it('should fail for user not listed', async done => {
it_id('84a42339-c7b5-4735-a431-57b46535b073')(it)('should fail for user not listed', async done => {
await updateCLP({
get: {
pointerFields: ['moderators'],
Expand Down Expand Up @@ -2698,7 +2698,7 @@ describe('Pointer Permissions', () => {
done();
});

it('should fail for user not listed', async done => {
it_id('1abb9f4a-fb24-48c7-8025-3001d6cf8737')(it)('should fail for user not listed', async done => {
await updateCLP({
update: {
pointerFields: ['moderators'],
Expand Down Expand Up @@ -2764,7 +2764,7 @@ describe('Pointer Permissions', () => {
done();
});

it('should fail for user not listed', async done => {
it_id('3175a0e3-e51e-4b84-a2e6-50bbcc582123')(it)('should fail for user not listed', async done => {
await updateCLP({
delete: {
pointerFields: ['owners'],
Expand Down
2 changes: 1 addition & 1 deletion spec/rest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ describe('rest create', () => {
);
});

it('cannot get object in _GlobalConfig if not masterKey through pointer', async () => {
it_id('3ce563bf-93aa-4d0b-9af9-c5fb246ac9fc')(it)('cannot get object in _GlobalConfig if not masterKey through pointer', async () => {
await Parse.Config.save({ privateData: 'secret' }, { privateData: true });
const obj2 = new Parse.Object('TestObject');
obj2.set('globalConfigPointer', {
Expand Down

0 comments on commit 2a63129

Please sign in to comment.