Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests on Node SDK #392

Merged
merged 4 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test/integration/companies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ describe('Companies', () => {
page: 1,
perPage: 35,
order: Order.DESC,
tagId: '7882526',
});

assert.notEqual(response, undefined);
Expand Down
9 changes: 5 additions & 4 deletions test/integration/conversations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ describe('Conversations', () => {
before(async () => {
const admins = await client.admins.list();

adminId = admins.admins[0].id;
anotherAdminId = admins.admins[1].id;

const adminList = admins.admins.filter((admin) => admin.has_inbox_seat);
// Only admins with inbox seat can interact with conversations.
adminId = adminList[0].id;
anotherAdminId = adminList[1].id;
user = await client.contacts.createUser({
externalId: randomString(),
name: 'Baba Booey',
Expand Down Expand Up @@ -174,7 +175,7 @@ describe('Conversations', () => {
const response = await client.conversations.redactConversationPart({
conversationId: foundConversation.id,
conversationPartId:
foundConversation.conversation_parts.conversation_parts[0].id,
foundConversation.conversation_parts.conversation_parts[2].id,
type: RedactConversationPartType.CONVERSATION_PART,
});

Expand Down
6 changes: 4 additions & 2 deletions test/integration/dataAttributes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ describe('Data Attributes', () => {

const client = new Client({ tokenAuth: { token } });

it('create', async () => {
xit('create', async () => {
// The workspace we test on has hit the CDA limit, so we can't create any more
// for now. We should reenable this test once we have a new workspace.
const response = await client.dataAttributes.create({
name: `Bebech${randomInt(0, 999)},${randomInt(
randomInt(0, 999)
Expand All @@ -23,7 +25,7 @@ describe('Data Attributes', () => {

assert.notEqual(response, undefined);
});
it('update', async () => {
xit('update', async () => {
const response = await client.dataAttributes.update({
id: createdDataAttribute.id,
archived: false,
Expand Down
6 changes: 4 additions & 2 deletions test/integration/messages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ describe('Messages', () => {
});

before(async () => {
const adminList = await client.admins.list();
adminId = adminList.admins[0].id;
const admins = await client.admins.list();
const adminList = admins.admins.filter((admin) => admin.has_inbox_seat);

adminId = adminList[0].id;

const createdUser = await client.contacts.createUser({
externalId: randomString(),
Expand Down