From 12357b95f7170f455950203e65b376bcdeb8c415 Mon Sep 17 00:00:00 2001 From: "Dmitry.Yudin" Date: Tue, 22 Oct 2024 16:02:57 +0200 Subject: [PATCH] [remote-driver] Update license tests to use new license dialog (IJPL-148224) (cherry picked from commit 5fff781d6345ded1c2a929e5c76f801663f85366) IJ-CR-148048 GitOrigin-RevId: 8e074f4990af5f548be8ec0add4d5237939f47c3 --- .../driver/sdk/application/DateFormatUtil.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/application/DateFormatUtil.kt diff --git a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/application/DateFormatUtil.kt b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/application/DateFormatUtil.kt new file mode 100644 index 000000000000..46e3ee180733 --- /dev/null +++ b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/application/DateFormatUtil.kt @@ -0,0 +1,15 @@ +package com.intellij.driver.sdk.application + +import com.intellij.driver.client.Driver +import com.intellij.driver.client.Remote +import java.time.LocalDate +import java.time.ZoneId +import java.util.Date + +@Remote("com.intellij.util.text.DateFormatUtil") +interface DateFormatUtil { + fun formatDate(date: Date): String +} + +fun Driver.formatLicenseDate(date: LocalDate) = utility(DateFormatUtil::class) + .formatDate(Date.from(date.atStartOfDay(ZoneId.systemDefault()).toInstant())) \ No newline at end of file