Merged in feature/mergecell (pull request #142)

Merged Cell

* mergecellv1

* buildimg

* merging

* addfile

* justmergedcell
This commit is contained in:
Michael McGuinness
2025-05-13 12:33:34 +00:00
parent 125b9e3c31
commit 418a2761b3
16 changed files with 5151 additions and 101 deletions
+23 -4
View File
@@ -67,7 +67,7 @@ func TestGetDocumentText(t *testing.T) {
require.EqualError(t, err, "no textract response")
})
t.Run("sampleOne - cnc_01-06", func(t *testing.T) {
t.Run("cnc_01-06", func(t *testing.T) {
t.Parallel()
cfg := DocTextConfig{}
svc := Service{
@@ -86,7 +86,7 @@ func TestGetDocumentText(t *testing.T) {
assertReaders(t, txtFile, text)
})
t.Run("sampleOne - hn_0109", func(t *testing.T) {
t.Run("hn_0109", func(t *testing.T) {
t.Parallel()
cfg := DocTextConfig{}
svc := Service{
@@ -105,7 +105,7 @@ func TestGetDocumentText(t *testing.T) {
assertReaders(t, txtFile, text)
})
t.Run("sampleOne - hn_23-70", func(t *testing.T) {
t.Run("hn_23-70", func(t *testing.T) {
t.Parallel()
cfg := DocTextConfig{}
svc := Service{
@@ -124,7 +124,7 @@ func TestGetDocumentText(t *testing.T) {
assertReaders(t, txtFile, text)
})
t.Run("sampleOne - chc_1", func(t *testing.T) {
t.Run("chc_1", func(t *testing.T) {
t.Parallel()
cfg := DocTextConfig{}
svc := Service{
@@ -141,6 +141,25 @@ func TestGetDocumentText(t *testing.T) {
text, err := svc.getDocumentText(ctx, pdf)
require.NoError(t, err)
assertReaders(t, txtFile, text)
})
t.Run("merged_cell_table", func(t *testing.T) {
t.Parallel()
cfg := DocTextConfig{}
svc := Service{
cfg: &cfg,
}
mockTextract := textractmock.NewMockTextractClient(t)
cfg.TextractClient = mockTextract
textractBaseOut, pdf, txtFile, close := getFiles(t, "merged_cell_table")
defer close()
textExpectations(t, ctx, mockTextract, pdf, textractBaseOut)
text, err := svc.getDocumentText(ctx, pdf)
require.NoError(t, err)
assertReaders(t, txtFile, text)
})
}