From 9d81a856fbc0801181f8fefd114d0052d081bffc Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Thu, 5 Sep 2024 16:13:38 +0200 Subject: [PATCH] Add changelog for the new, not-yet-released version (#2018) * add changelog for the newly unreleased version * fix tests * update changelog --- CHANGELOG.md | 37 ++++++++++++++++++- .../java/maestro/cli/util/ChangeLogUtils.kt | 9 +++++ .../maestro/cli/util/ChangeLogUtilsTest.kt | 4 +- 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dae5ea5946..a8a6143ec9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,42 @@ # Changelog +## Unreleased + + +Features: +- Feature: add `--shard-split` and `--shard-all` options to `maestro test` ([#1955](https://github.com/mobile-dev-inc/maestro/pull/1955) by [Tarek Belkahia](https://github.com/tokou)) + + The `--shard` is now deprecated and superseded by `--shard-split`. + +- Feature: allow for passing multiple flow files to `maestro test` ([#1995](https://github.com/mobile-dev-inc/maestro/pull/1995) by [Tarek Belkahia](https://github.com/tokou)) +- Feature: add the `optional` argument to all commands ([#1946](https://github.com/mobile-dev-inc/maestro/pull/1946) by [Tarek Belkahia](https://github.com/tokou)) + + This new command-level `optional` argument supersededs the (now removed) selector-level `optional` argument. No behavior changes are expected. + + When command with `optional: true` fails, its status is now "warned ⚠️" instead of "skipped ⚪️" + +- Feature: add changelog to the update prompt when new Maestro version is available ([#1950](https://github.com/mobile-dev-inc/maestro/pull/1950) by [Tarek Belkahia](https://github.com/tokou)) +- Feature: add back the `--platform` option ([#1954](https://github.com/mobile-dev-inc/maestro/pull/1954) by [Tarek Belkahia](https://github.com/tokou)) +- Feature: expose current flow name as `MAESTRO_FILENAME` env var ([#1945](https://github.com/mobile-dev-inc/maestro/pull/1945) by [Tarek Belkahia](https://github.com/tokou)) + +Fixes: +- Fix: visual bug with emojis having slightly different length in `maestro test`'s interactive CLI output ([#2016](https://github.com/mobile-dev-inc/maestro/pull/2016)) +- Fix: no tests being run when flowsOrder specified all tests in the workspace ([#2003](https://github.com/mobile-dev-inc/maestro/pull/2003)) +- Fix: using integers from JavaScript outputs causing a deserialization error ([#1788](https://github.com/mobile-dev-inc/maestro/pull/1788) by [Muhammed Furkan Boran](https://github.com/boranfrkn)) +- Fix: delete temporary APKs after using them ([#1947](https://github.com/mobile-dev-inc/maestro/pull/1947) by [Tarek Belkahia](https://github.com/tokou)) +- Fix: allow env vars in `setLocation` and `travel` commands ([#1988](https://github.com/mobile-dev-inc/maestro/pull/1988) by [Prasanta Biswas](https://github.com/prasanta-biswas)) +- Fix: error message when specifying `--format` together with `--continuous` #1948 ([#1948](https://github.com/mobile-dev-inc/maestro/pull/1948) by [Tarek Belkahia](https://github.com/tokou)) + +Chores: +- Chore: make Maestro build & compile on Java 17 ([#2008](https://github.com/mobile-dev-inc/maestro/pull/2008)) +- Chore: Migrate all Gradle buildscripts to Gradle Kotlin DSL ([#1994](https://github.com/mobile-dev-inc/maestro/pull/1994)) + ## 1.38.1 -- New commands AI visual testing: assertWithAI and assertNoDefectsWithAI -- Enable basic support for Maestro uploads while keeping maestro cloud functioning +Released on 2024-08-30 + +- New experimental AI-powered commands for screenshot testing: [assertWithAI](https://maestro.mobile.dev/api-reference/commands/assertwithai) and [assertNoDefectsWithAI](https://maestro.mobile.dev/api-reference/commands/assertnodefectswithai) ([#1906](https://github.com/mobile-dev-inc/maestro/pull/1906)) +- Enable basic support for Maestro uploads while keeping Maestro Cloud functioning ([#1970](https://github.com/mobile-dev-inc/maestro/pull/1970)) ## 1.37.9 diff --git a/maestro-cli/src/main/java/maestro/cli/util/ChangeLogUtils.kt b/maestro-cli/src/main/java/maestro/cli/util/ChangeLogUtils.kt index b6ce4e6ead..919d9bd6e2 100644 --- a/maestro-cli/src/main/java/maestro/cli/util/ChangeLogUtils.kt +++ b/maestro-cli/src/main/java/maestro/cli/util/ChangeLogUtils.kt @@ -2,6 +2,7 @@ package maestro.cli.util import okhttp3.OkHttpClient import okhttp3.Request +import java.io.File typealias ChangeLog = List? @@ -25,3 +26,11 @@ object ChangeLogUtils { fun print(changelog: ChangeLog): String = changelog?.let { "\n${it.joinToString("\n")}\n" }.orEmpty() } + +// Helper launcher to play around with presentation +fun main() { + val changelogFile = File(System.getProperty("user.dir"), "CHANGELOG.md") + val content = changelogFile.readText() + val changelog = ChangeLogUtils.formatBody(content, "Unreleased") + println(ChangeLogUtils.print(changelog)) +} diff --git a/maestro-cli/src/test/kotlin/maestro/cli/util/ChangeLogUtilsTest.kt b/maestro-cli/src/test/kotlin/maestro/cli/util/ChangeLogUtilsTest.kt index d506fd7e68..3a77aecb49 100644 --- a/maestro-cli/src/test/kotlin/maestro/cli/util/ChangeLogUtilsTest.kt +++ b/maestro-cli/src/test/kotlin/maestro/cli/util/ChangeLogUtilsTest.kt @@ -15,8 +15,8 @@ class ChangeLogUtilsTest { val changelog = ChangeLogUtils.formatBody(content, "1.38.1") assertThat(changelog).containsExactly( - "- New commands AI visual testing: assertWithAI and assertNoDefectsWithAI", - "- Enable basic support for Maestro uploads while keeping maestro cloud functioning", + "- New experimental AI-powered commands for screenshot testing: assertWithAI and assertNoDefectsWithAI (#1906)", + "- Enable basic support for Maestro uploads while keeping Maestro Cloud functioning (#1970)", ) }