Skip to content

Commit

Permalink
integration tests fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed Oct 12, 2023
1 parent 25c71ec commit 6edcb65
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/version2/models/attachment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface Attachment {
/** The file name of the attachment. */
filename?: string;
/** The ID of the attachment. */
id?: string;
id: string;
/** The MIME type of the attachment. */
mimeType?: string;
/** The URL of the attachment details response. */
Expand Down
2 changes: 1 addition & 1 deletion src/version2/models/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface Comment {
/** The date and time at which the comment was created. */
created?: string;
/** The ID of the comment. */
id?: string;
id: string;
/**
* Whether the comment was added from an email sent by a person who is not part of the issue. See [Allow external
* emails to be added as comments on
Expand Down
2 changes: 1 addition & 1 deletion src/version2/models/pageProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export interface PageProject {
/** The number of items returned. */
total?: number;
/** The list of items. */
values?: Project[];
values: Project[];
}
2 changes: 1 addition & 1 deletion src/version3/models/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface Comment {
/** The URL of the comment. */
self?: string;
/** The ID of the comment. */
id?: string;
id: string;
author?: UserDetails;
/**
* The comment text in [Atlassian Document
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/agile/sprint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test.serial('should create new sprint', async t => {

t.truthy(!!sprint);
t.is(sprint.name, 'New sprint');
t.is(sprint.state, AgileModels.Sprint.State.Future);
t.is(sprint.state, 'future');
});

test.serial('should create and move task to sprint', async t => {
Expand Down Expand Up @@ -70,12 +70,12 @@ test.serial('should return issues for sprint', async t => {
test.serial('should partially update sprint', async t => {
const newSprint = await client.sprint.partiallyUpdateSprint({
sprintId: sprint.id,
state: AgileModels.Sprint.State.Active,
state: 'active',
startDate: new Date(),
endDate: new Date(Date.now() + 1000),
});

t.is(newSprint.state, AgileModels.Sprint.State.Active);
t.is(newSprint.state, 'active');
});

test.serial('should remove sprint', async t => {
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/version2/issueComments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test.serial('should update comment', async t => {

const updatedComment = await client.issueComments.updateComment({
issueIdOrKey: issue.key,
id: comment.id!, // TODO
id: comment.id,
body: 'updated comment',
});

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/version3/issueComments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test.serial('should update comment', async t => {

const updatedComment = await client.issueComments.updateComment({
issueIdOrKey: issue.key,
id: comment.id!, // TODO
id: comment.id,
body: {
type: 'doc',
version: 1,
Expand Down

0 comments on commit 6edcb65

Please sign in to comment.