if(this.pageFlattenedData && this.pageFlattenedData.lenght > 0)
This should be length
. this.showMessage
never gets true.
If I were you, I'd move the methods below @wire
to a separate Javascript module. A separate module can be tested much more easily, because unit tests can directly test individual methods. E.g. above problem would almost for sure have come to light writing a unit test for showMessageOrTable()
.