From f8eb155b99323059db2e0d005b4f853bf5bc72e3 Mon Sep 17 00:00:00 2001 From: Jon Samwell Date: Mon, 11 Jan 2021 16:30:47 +1100 Subject: [PATCH] fix(reports): fixed default report path --- .flutter-plugins-dependencies | 2 +- CHANGELOG.md | 2 +- .../reports}/integration_response_data.json | 2 +- .../integration_test/gherkin/steps/expect_todos_step.dart | 2 ++ .../test_driver/integration_test_driver.dart | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) rename example_with_integration_test/integration_test/{gherkin_reports => gherkin/reports}/integration_response_data.json (76%) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 1e61c56..c6ac501 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"integration_test","path":"C:\\\\Google\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\integration_test-1.0.1\\\\","dependencies":[]}],"android":[{"name":"integration_test","path":"C:\\\\Google\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\integration_test-1.0.1\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"integration_test","dependencies":[]}],"date_created":"2021-01-11 16:25:59.096234","version":"1.22.5"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"integration_test","path":"C:\\\\Google\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\integration_test-1.0.1\\\\","dependencies":[]}],"android":[{"name":"integration_test","path":"C:\\\\Google\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\integration_test-1.0.1\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"integration_test","dependencies":[]}],"date_created":"2021-01-11 16:28:02.388492","version":"1.22.5"} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b062f7..e48a60a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,7 @@ import 'package:integration_test/integration_test_driver.dart' as integration_te Future main() { // The Gherkin report data send back to this runner by the app after // the tests have run will be saved to this directory - integration_test_driver.testOutputsDirectory = 'integration_test/gherkin_reports'; + integration_test_driver.testOutputsDirectory = 'integration_test/gherkin/reports'; return integration_test_driver.integrationDriver( timeout: Duration(minutes: 90), diff --git a/example_with_integration_test/integration_test/gherkin_reports/integration_response_data.json b/example_with_integration_test/integration_test/gherkin/reports/integration_response_data.json similarity index 76% rename from example_with_integration_test/integration_test/gherkin_reports/integration_response_data.json rename to example_with_integration_test/integration_test/gherkin/reports/integration_response_data.json index 04728db..f8ebe15 100644 --- a/example_with_integration_test/integration_test/gherkin_reports/integration_response_data.json +++ b/example_with_integration_test/integration_test/gherkin/reports/integration_response_data.json @@ -1,3 +1,3 @@ { - "gherkin_reports": "[[{\"description\":\"\",\"id\":\"creating todos:\",\"keyword\":\"Feature\",\"line\":1,\"name\":\"Creating todos:\",\"uri\":\"\",\"tags\":[{\"line\":1,\"name\":\"@tag\"}],\"elements\":[{\"keyword\":\"Scenario\",\"type\":\"scenario\",\"id\":\"creating todos:;user can create a new todo item\",\"name\":\"User can create a new todo item\",\"description\":\"\",\"line\":1,\"tags\":[{\"line\":1,\"name\":\"@tag\"},{\"line\":1,\"name\":\"@tag1\"},{\"line\":1,\"name\":\"@tag_two\"}],\"steps\":[{\"keyword\":\"Given \",\"name\":\"I fill the \\\"todo\\\" field with \\\"Buy carrots\\\"\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":373000000}},{\"keyword\":\"When \",\"name\":\"I tap the \\\"add\\\" button\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":210000000}},{\"keyword\":\"Then \",\"name\":\"I expect the todo list\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":138000000},\"rows\":[{\"cells\":[\"Todo\"]},{\"cells\":[\"Buy carrots\"]}]}]},{\"keyword\":\"Scenario\",\"type\":\"scenario\",\"id\":\"creating todos:;user can create multiple new todo items\",\"name\":\"User can create multiple new todo items\",\"description\":\"\",\"line\":1,\"tags\":[{\"line\":1,\"name\":\"@tag\"}],\"steps\":[{\"keyword\":\"Given \",\"name\":\"I fill the \\\"todo\\\" field with \\\"Buy carrots\\\"\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":255000000}},{\"keyword\":\"When \",\"name\":\"I tap the \\\"add\\\" button\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":244000000}},{\"keyword\":\"Given \",\"name\":\"I fill the \\\"todo\\\" field with \\\"Buy apples\\\"\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":140000000}},{\"keyword\":\"When \",\"name\":\"I tap the \\\"add\\\" button\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":255000000}},{\"keyword\":\"Given \",\"name\":\"I fill the \\\"todo\\\" field with \\\"Buy blueberries\\\"\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":132000000}},{\"keyword\":\"When \",\"name\":\"I tap the \\\"add\\\" button\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":224000000}},{\"keyword\":\"Then \",\"name\":\"I expect the todo list\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":403000000},\"rows\":[{\"cells\":[\"Todo\"]},{\"cells\":[\"Buy blueberries\"]},{\"cells\":[\"Buy apples\"]},{\"cells\":[\"Buy carrots\"]}]}]}]}]]" + "gherkin_reports": "[[{\"description\":\"\",\"id\":\"creating todos:\",\"keyword\":\"Feature\",\"line\":1,\"name\":\"Creating todos:\",\"uri\":\"\",\"tags\":[{\"line\":1,\"name\":\"@tag\"}],\"elements\":[{\"keyword\":\"Scenario\",\"type\":\"scenario\",\"id\":\"creating todos:;user can create a new todo item\",\"name\":\"User can create a new todo item\",\"description\":\"\",\"line\":1,\"tags\":[{\"line\":1,\"name\":\"@tag\"},{\"line\":1,\"name\":\"@tag1\"},{\"line\":1,\"name\":\"@tag_two\"}],\"steps\":[{\"keyword\":\"Given \",\"name\":\"I fill the \\\"todo\\\" field with \\\"Buy carrots\\\"\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":420000000}},{\"keyword\":\"When \",\"name\":\"I tap the \\\"add\\\" button\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":307000000}},{\"keyword\":\"Then \",\"name\":\"I expect the todo list\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":204000000},\"rows\":[{\"cells\":[\"Todo\"]},{\"cells\":[\"Buy carrots\"]}]}]},{\"keyword\":\"Scenario\",\"type\":\"scenario\",\"id\":\"creating todos:;user can create multiple new todo items\",\"name\":\"User can create multiple new todo items\",\"description\":\"\",\"line\":1,\"tags\":[{\"line\":1,\"name\":\"@tag\"}],\"steps\":[{\"keyword\":\"Given \",\"name\":\"I fill the \\\"todo\\\" field with \\\"Buy carrots\\\"\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":286000000}},{\"keyword\":\"When \",\"name\":\"I tap the \\\"add\\\" button\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":220000000}},{\"keyword\":\"Given \",\"name\":\"I fill the \\\"todo\\\" field with \\\"Buy apples\\\"\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":138000000}},{\"keyword\":\"When \",\"name\":\"I tap the \\\"add\\\" button\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":238000000}},{\"keyword\":\"Given \",\"name\":\"I fill the \\\"todo\\\" field with \\\"Buy blueberries\\\"\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":162000000}},{\"keyword\":\"When \",\"name\":\"I tap the \\\"add\\\" button\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":225000000}},{\"keyword\":\"Then \",\"name\":\"I expect the todo list\",\"line\":1,\"match\":{\"location\":\":1\"},\"result\":{\"status\":\"passed\",\"duration\":418000000},\"rows\":[{\"cells\":[\"Todo\"]},{\"cells\":[\"Buy blueberries\"]},{\"cells\":[\"Buy apples\"]},{\"cells\":[\"Buy carrots\"]}]}]}]}]]" } \ No newline at end of file diff --git a/example_with_integration_test/integration_test/gherkin/steps/expect_todos_step.dart b/example_with_integration_test/integration_test/gherkin/steps/expect_todos_step.dart index d274843..1c6744c 100644 --- a/example_with_integration_test/integration_test/gherkin/steps/expect_todos_step.dart +++ b/example_with_integration_test/integration_test/gherkin/steps/expect_todos_step.dart @@ -1,3 +1,5 @@ +import 'dart:convert'; + import 'package:flutter/material.dart'; import 'package:flutter_gherkin/flutter_gherkin.dart'; import 'package:flutter_gherkin/flutter_gherkin_integration_test.dart'; diff --git a/example_with_integration_test/test_driver/integration_test_driver.dart b/example_with_integration_test/test_driver/integration_test_driver.dart index 854275c..18b58b4 100644 --- a/example_with_integration_test/test_driver/integration_test_driver.dart +++ b/example_with_integration_test/test_driver/integration_test_driver.dart @@ -5,7 +5,7 @@ Future main() { // The Gherkin report data send back to this runner by the app after // the tests have run will be saved to this directory integration_test_driver.testOutputsDirectory = - 'integration_test/gherkin_reports'; + 'integration_test/gherkin/reports'; return integration_test_driver.integrationDriver( timeout: Duration(minutes: 90),