Skip to content

Commit

Permalink
test(Article): test transcript field
Browse files Browse the repository at this point in the history
  • Loading branch information
MrOrz committed Aug 31, 2023
1 parent 44f70ed commit 45a78ca
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/graphql/queries/__fixtures__/GetReplyAndArticle.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,11 @@ export default {
type: 'AI_REPLY',
status: 'LOADING',
},

'/airesponses/doc/transcript-for-mediaArticle': {
docId: 'hash-for-media-article',
type: 'TRANSCRIPT',
status: 'SUCCESS',
text: 'Lorum ipsum',
},
};
30 changes: 30 additions & 0 deletions src/graphql/queries/__tests__/GetReplyAndGetArticle.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,36 @@ describe('GetReplyAndGetArticle', () => {
`({}, { appId: 'LINE' })
).toMatchSnapshot();
});

it('can list AI Transcripts', async () => {
expect(
await gql`
{
GetArticle(id: "mediaArticle") {
id
aiTranscripts {
text
status
}
}
}
`()
).toMatchInlineSnapshot(`
Object {
"data": Object {
"GetArticle": Object {
"aiTranscripts": Array [
Object {
"status": "SUCCESS",
"text": "Lorum ipsum",
},
],
"id": "mediaArticle",
},
},
}
`);
});
});

describe('GetReply', () => {
Expand Down

0 comments on commit 45a78ca

Please sign in to comment.