Skip to content

Commit

Permalink
changed the decription for it in testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithad0703 committed Dec 18, 2023
1 parent 211773e commit ce0e53b
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 57 deletions.
26 changes: 13 additions & 13 deletions test/sanity-check/api/asset-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('Assets api Test', () => {
client = contentstackClient(user.authtoken)
})

it('Asset Upload ', done => {
it('should asset Upload ', done => {
const asset = {
upload: path.join(__dirname, '../mock/customUpload.html'),
title: 'customasset',
Expand All @@ -38,14 +38,14 @@ describe('Assets api Test', () => {
.catch(done)
})

it('Download asset from URL.', done => {
it('should download asset from URL.', done => {
makeAsset().download({ url: assetURL, responseType: 'stream' })
.then((response) => {
writeDownloadedFile(response, 'asset1')
done()
}).catch(done)
})
it('Download asset from fetch details ', done => {
it('should download asset from fetch details ', done => {
makeAsset(assetUID).fetch()
.then((asset) => asset.download({ responseType: 'stream' }))
.then((response) => {
Expand All @@ -54,7 +54,7 @@ describe('Assets api Test', () => {
}).catch(done)
})

it('Create folder ', done => {
it('should create folder ', done => {
makeAsset().folder().create({ asset: { name: 'Sample Folder' } })
.then((asset) => {
folderUID = asset.uid
Expand All @@ -66,7 +66,7 @@ describe('Assets api Test', () => {
.catch(done)
})

it('Asset Upload in folder', done => {
it('should asset Upload in folder', done => {
const asset = {
upload: path.join(__dirname, '../mock/customUpload.html'),
title: 'customasset in Folder',
Expand All @@ -89,7 +89,7 @@ describe('Assets api Test', () => {
.catch(done)
})

it('Asset Upload in folder with contenttype', done => {
it('should asset Upload in folder with contenttype', done => {
const asset = {
upload: path.join(__dirname, '../mock/berries.jfif'),
title: 'customasset2 in Folder',
Expand All @@ -112,7 +112,7 @@ describe('Assets api Test', () => {
})
.catch(done)
})
it('Replace asset ', done => {
it('should replace asset ', done => {
const asset = {
upload: path.join(__dirname, '../mock/upload.html')
}
Expand All @@ -127,7 +127,7 @@ describe('Assets api Test', () => {
.catch(done)
})

it('Fetch and Update asset details', done => {
it('should fetch and Update asset details', done => {
makeAsset(assetUID)
.fetch()
.then((asset) => {
Expand All @@ -145,7 +145,7 @@ describe('Assets api Test', () => {
.catch(done)
})

it('Publish Asset', done => {
it('should publish Asset', done => {
makeAsset(publishAssetUID)
.publish({ publishDetails: {
locales: ['hi-in', 'en-us'],
Expand All @@ -158,7 +158,7 @@ describe('Assets api Test', () => {
.catch(done)
})

it('Unpublish Asset', done => {
it('should unpublish Asset', done => {
makeAsset(publishAssetUID)
.unpublish({ publishDetails: {
locales: ['hi-in', 'en-us'],
Expand All @@ -171,7 +171,7 @@ describe('Assets api Test', () => {
.catch(done)
})

it('Delete asset', done => {
it('should delete asset', done => {
makeAsset(assetUID)
.delete()
.then((data) => {
Expand All @@ -181,7 +181,7 @@ describe('Assets api Test', () => {
.catch(done)
})

it('Query to fetch all asset', done => {
it('should query to fetch all asset', done => {
makeAsset()
.query()
.find()
Expand All @@ -196,7 +196,7 @@ describe('Assets api Test', () => {
.catch(done)
})

it('Query to fetch title match asset', done => {
it('should query to fetch title match asset', done => {
makeAsset()
.query({ query: { title: 'Update title' } })
.find()
Expand Down
2 changes: 1 addition & 1 deletion test/sanity-check/api/contentType-delete-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Content Type delete api Test', () => {
client = contentstackClient(user.authtoken)
})

it('Content Type delete', done => {
it('should content Type delete', done => {
makeContentType(multiPageCT.content_type.uid)
.delete().then((data) => {
expect(data.notice).to.be.equal('Content Type deleted successfully.')
Expand Down
16 changes: 8 additions & 8 deletions test/sanity-check/api/contentType-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Content Type api Test', () => {
client = contentstackClient(user.authtoken)
})

it('Create Single page ContentType Schema', done => {
it('should create Single page ContentType Schema', done => {
makeContentType()
.create(singlepageCT)
.then((contentType) => {
Expand All @@ -26,7 +26,7 @@ describe('Content Type api Test', () => {
.catch(done)
})

it('Create Multi page ContentType Schema', done => {
it('should create Multi page ContentType Schema', done => {
makeContentType()
.create(multiPageCT)
.then((contentType) => {
Expand All @@ -38,7 +38,7 @@ describe('Content Type api Test', () => {
.catch(done)
})

it('Get all ContentType', done => {
it('should get all ContentType', done => {
makeContentType()
.query()
.find()
Expand All @@ -53,7 +53,7 @@ describe('Content Type api Test', () => {
.catch(done)
})

it('Query ContentType title', done => {
it('should query ContentType title', done => {
makeContentType()
.query({ query: { title: singlepageCT.content_type.title } })
.find()
Expand All @@ -70,7 +70,7 @@ describe('Content Type api Test', () => {
.catch(done)
})

it('Fetch ContentType from uid', done => {
it('should fetch ContentType from uid', done => {
makeContentType(multiPageCT.content_type.uid)
.fetch()
.then((contentType) => {
Expand All @@ -81,7 +81,7 @@ describe('Content Type api Test', () => {
.catch(done)
})

it('Fetch and Update ContentType schema', done => {
it('should fetch and Update ContentType schema', done => {
makeContentType(multiPageCTUid)
.fetch()
.then((contentType) => {
Expand All @@ -95,7 +95,7 @@ describe('Content Type api Test', () => {
.catch(done)
})

it('Import content type', done => {
it('should import content type', done => {
makeContentType().import({
content_type: path.join(__dirname, '../mock/contentType.json')
})
Expand All @@ -107,7 +107,7 @@ describe('Content Type api Test', () => {
.catch(done)
})

it('Delete ContentTypes', done => {
it('should delete ContentTypes', done => {
makeContentType(importCTUid)
.delete()
.then((contentType) => {
Expand Down
24 changes: 12 additions & 12 deletions test/sanity-check/api/entry-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Entry api Test', () => {
client = contentstackClient(user.authtoken)
})

it('Create Entry in Single ', done => {
it('should create Entry in Single ', done => {
var entry = {
title: 'Sample Entry',
url: 'sampleEntry'
Expand All @@ -31,7 +31,7 @@ describe('Entry api Test', () => {
})
.catch(done)
})
it('Entry fetch with Content Type', done => {
it('should entry fetch with Content Type', done => {
makeEntry(singlepageCT.content_type.uid, entryUTD)
.fetch({ include_content_type: true })
.then((entryResponse) => {
Expand All @@ -42,7 +42,7 @@ describe('Entry api Test', () => {
.catch(done)
})

it('Localize entry with title update', done => {
it('should localize entry with title update', done => {
makeEntry(singlepageCT.content_type.uid, entryUTD)
.fetch()
.then((entry) => {
Expand All @@ -59,7 +59,7 @@ describe('Entry api Test', () => {
.catch(done)
})

it('Create Entries for Multiple page', done => {
it('should create Entries for Multiple page', done => {
makeEntry(multiPageCT.content_type.uid)
.create({ entry: entryFirst })
.then((entry) => {
Expand All @@ -74,7 +74,7 @@ describe('Entry api Test', () => {
.catch(done)
})

it('Create Entries 2 for Multiple page', done => {
it('should create Entries 2 for Multiple page', done => {
makeEntry(multiPageCT.content_type.uid)
.create({ entry: entrySecond })
.then((entry) => {
Expand All @@ -90,7 +90,7 @@ describe('Entry api Test', () => {
.catch(done)
})

it('Create Entries 3 for Multiple page', done => {
it('should create Entries 3 for Multiple page', done => {
makeEntry(multiPageCT.content_type.uid)
.create({ entry: entryThird })
.then((entry) => {
Expand All @@ -106,7 +106,7 @@ describe('Entry api Test', () => {
.catch(done)
})

it('Get all Entry', done => {
it('should get all Entry', done => {
makeEntry(multiPageCT.content_type.uid)
.query({ include_count: true, include_content_type: true }).find()
.then((collection) => {
Expand All @@ -121,7 +121,7 @@ describe('Entry api Test', () => {
.catch(done)
})

it('Get all Entry from tag', done => {
it('should get all Entry from tag', done => {
makeEntry(multiPageCT.content_type.uid)
.query({ include_count: true, query: { tags: entrySecond.tags[0] } }).find()
.then((collection) => {
Expand All @@ -135,7 +135,7 @@ describe('Entry api Test', () => {
.catch(done)
})

it('Publish Entry', done => {
it('should publish Entry', done => {
makeEntry(singlepageCT.content_type.uid, entryUTD)
.publish({ publishDetails: {
locales: ['en-us'],
Expand All @@ -148,7 +148,7 @@ describe('Entry api Test', () => {
.catch(done)
})

it('Publish localized Entry to locales', done => {
it('should publish localized Entry to locales', done => {
makeEntry(singlepageCT.content_type.uid, entryUTD)
.publish({ publishDetails: {
locales: ['hi-in', 'en-at'],
Expand All @@ -162,7 +162,7 @@ describe('Entry api Test', () => {
.catch(done)
})

it('Unpublish localized entry', done => {
it('should unpublish localized entry', done => {
makeEntry(singlepageCT.content_type.uid, entryUTD)
.unpublish({ publishDetails: {
locales: ['hi-in', 'en-at'],
Expand All @@ -176,7 +176,7 @@ describe('Entry api Test', () => {
.catch(done)
})

it('Import Entry', done => {
it('should import Entry', done => {
makeEntry(multiPageCT.content_type.uid)
.import({
entry: path.join(__dirname, '../mock/entry.json')
Expand Down
14 changes: 7 additions & 7 deletions test/sanity-check/api/organization-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Organization api test', () => {
client = contentstackClient(user.authtoken)
})

it('Fetch all organizations', done => {
it('should fetch all organizations', done => {
client.organization().fetchAll()
.then((response) => {
for (const index in response.items) {
Expand All @@ -26,7 +26,7 @@ describe('Organization api test', () => {
.catch(done)
})

it('Get Current user info test', done => {
it('should get Current user info test', done => {
client.getUser({ include_orgs: true, include_orgs_roles: true, include_stack_roles: true, include_user_settings: true }).then((user) => {
for (const index in user.organizations) {
const organizations = user.organizations[index]
Expand All @@ -40,7 +40,7 @@ describe('Organization api test', () => {
.catch(done)
})

it('Fetch organization', done => {
it('should fetch organization', done => {
organization.fetch()
.then((organizations) => {
expect(organizations.name).to.be.equal('CLI Dev and Automation', 'Organization name dose not match')
Expand All @@ -49,7 +49,7 @@ describe('Organization api test', () => {
.catch(done)
})

it('Get all stacks in an Organization', done => {
it('should get all stacks in an Organization', done => {
organization.stacks()
.then((response) => {
for (const index in response.items) {
Expand All @@ -62,7 +62,7 @@ describe('Organization api test', () => {
.catch(done)
})
// need to test with transfer ownership
it.skip('Transfer Organization Ownership', done => {
it.skip('should transfer Organization Ownership', done => {
organization.transferOwnership('[email protected]')
.then((data) => {
expect(data.notice).to.be.equal('Email has been successfully sent to the user.', 'Message does not match')
Expand All @@ -75,7 +75,7 @@ describe('Organization api test', () => {
})
})

it('Get all roles in an organization', done => {
it('should get all roles in an organization', done => {
organization.roles()
.then((roles) => {
for (const i in roles.items) {
Expand All @@ -88,7 +88,7 @@ describe('Organization api test', () => {
.catch(done)
})

it('Get all invitations in an organization', done => {
it('should get all invitations in an organization', done => {
organization.getInvitations({ include_count: true })
.then((response) => {
expect(response.count).to.not.equal(null, 'Failed Transfer Organization Ownership')
Expand Down
Loading

0 comments on commit ce0e53b

Please sign in to comment.