Are you supposed to be able to use the the <Intell...
# http4k
m
Are you supposed to be able to use the the IntelliJ OkeyDoke plugin with https://www.http4k.org/ecosystem/http4k/reference/approvaltests/ ? I can't get that to work. The tests work, but the plugin doesn't do anything. I have a simple test like this:
Copy code
@ExtendWith(Html5ApprovalTest::class)
class IndexTest {
    val app = createApp(DataStore())

    @Test
    fun index(approver: Approver) {
        assertThat(app(Request(GET, "/")), hasStatus(OK).and(approver.hasApprovedContent()))
    }
}
a
The plugin adds an
Approve
button when you right-click on an
.actual
file in the project window.
image.png
s
You should be able to approve from the test runner too. I’m the plugin author and wrote it before http4k approval test module existed, so it’s possible it may not work as expected in some particular use case
a
I don't see anything show up in the test runner (when running with gradle, at least)
d
Yeah - approving from the bottom pane hasn't worked in a while
(I'm running with gradle as well)
s
I'll take a look, but it's been three years since I've touched it and I'm sure it hasn't aged well 😬
m
Ah, it works for me on the
.actual
file.
a
Works in the IntelliJ test runner now. Thanks @s4nchez!
s
Yeap. I’ve also added an option to see all relevant diffs if multiple tests are failing
And one can approve all tests in the project from the project view
👍 1
a
Oh nice
m
Nice, it works for me as well.