-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0d76aad
commit ad74bc8
Showing
66 changed files
with
2,231 additions
and
3,111 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from './constants'; | ||
export * as Utils from './utils'; | ||
export * from '@tests/constants'; | ||
export * as Utils from '@tests/utils'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
import test from 'ava'; | ||
import { Avatar } from '../../../src/version3/models'; | ||
import { test } from 'vitest'; | ||
import type { Avatar } from '@jirajs/version3/models'; | ||
import { getVersion2Client } from '../utils'; | ||
|
||
const client = getVersion2Client(); | ||
|
||
let avatar: Avatar | undefined; | ||
|
||
test.serial('should get all system avatars', async t => { | ||
test.sequential('should get all system avatars', async ({ expect }) => { | ||
const systemAvatars = await client.avatars.getAllSystemAvatars({ type: 'project' }); | ||
|
||
avatar = systemAvatars.system?.[0]; | ||
|
||
t.truthy(!!avatar); | ||
expect(!!avatar).toBeTruthy(); | ||
}); | ||
|
||
test.serial('should return avatar image with contentType', async t => { | ||
test.sequential('should return avatar image with contentType', async ({ expect }) => { | ||
const avatarWithDetails = await client.avatars.getAvatarImageByID({ id: avatar!.id, type: 'project' }); | ||
|
||
t.is(avatarWithDetails.contentType, 'image/svg+xml'); | ||
t.truthy(avatarWithDetails.avatar instanceof Uint8Array); | ||
expect(avatarWithDetails.contentType).toBe('image/svg+xml'); | ||
expect(avatarWithDetails.avatar instanceof Uint8Array).toBeTruthy(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
import test from 'ava'; | ||
import { Constants } from '../constants'; | ||
import { getVersion2Client } from '../utils'; | ||
import { Version2Models } from '../../../src'; | ||
import { test } from 'vitest'; | ||
import { Version2Models } from '@jirajs'; | ||
import { Constants } from '@tests/constants'; | ||
import { getVersion2Client } from '@tests/utils'; | ||
|
||
let dashboard: Version2Models.Dashboard; | ||
const client = getVersion2Client(); | ||
|
||
test.serial('should create dashboard', async t => { | ||
test.sequential('should create dashboard', async ({ expect }) => { | ||
dashboard = await client.dashboards.createDashboard({ | ||
name: Constants.testDashboardName, | ||
sharePermissions: [], | ||
}); | ||
|
||
t.truthy(!!dashboard); | ||
t.is(dashboard.name, Constants.testDashboardName); | ||
t.deepEqual(dashboard.sharePermissions, []); | ||
expect(!!dashboard).toBeTruthy(); | ||
expect(dashboard.name).toBe(Constants.testDashboardName); | ||
expect(dashboard.sharePermissions).toStrictEqual([]); | ||
}); | ||
|
||
test.serial('should remove dashboard', async t => { | ||
test.sequential('should remove dashboard', async ({ expect }) => { | ||
const response = await client.dashboards.deleteDashboard({ | ||
id: dashboard.id, | ||
}); | ||
|
||
t.is(typeof response, 'string'); | ||
t.is<string | void, string>(response, ''); | ||
expect(typeof response).toBe('string'); | ||
expect(response).toBe(''); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
import test from 'ava'; | ||
import { Constants } from '..'; | ||
import { getVersion2Client } from '../utils'; | ||
import { test } from 'vitest'; | ||
import { Constants } from '@tests'; | ||
import { getVersion2Client } from '@tests/utils'; | ||
|
||
const client = getVersion2Client(); | ||
|
||
test.serial('should create a group', async t => { | ||
test.sequential('should create a group', async ({ expect }) => { | ||
const group = await client.groups.createGroup({ | ||
name: Constants.testGroupName, | ||
}); | ||
|
||
t.truthy(!!group); | ||
t.is(group.name, Constants.testGroupName); | ||
expect(!!group).toBeTruthy(); | ||
expect(group.name).toBe(Constants.testGroupName); | ||
}); | ||
|
||
test.serial('should remove a group', async t => { | ||
test.sequential('should remove a group', async ({ expect }) => { | ||
const response = await client.groups.removeGroup({ | ||
groupname: Constants.testGroupName, | ||
}); | ||
|
||
t.is(typeof response, 'string'); | ||
t.is(response.trim(), ''); | ||
expect(typeof response).toBe('string'); | ||
expect(response.trim()).toBe(''); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.