From 3d443b165fdf7028d700cb1731480e93b66f2546 Mon Sep 17 00:00:00 2001 From: David Eggerschwiler Date: Tue, 14 May 2019 13:58:00 +0200 Subject: [PATCH 1/9] Prepare for next release SELENIUM_PROMISE_MANAGER should be defined outside of the block jasmineNodeOpts. See Scenarioo and https://www.protractortest.org/#/async-await. --- example/protractor.conf.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/protractor.conf.js b/example/protractor.conf.js index fb8fc7b..214eb67 100755 --- a/example/protractor.conf.js +++ b/example/protractor.conf.js @@ -125,10 +125,10 @@ var exportsConfig = { includeStackTrace: true, // Default time to wait in ms before a test fails. - defaultTimeoutInterval: 60000, + defaultTimeoutInterval: 60000 + }, - SELENIUM_PROMISE_MANAGER: 0 - } + SELENIUM_PROMISE_MANAGER: 0 }; From 0a89391300b61236abe7bbc6ff2f9d194c0102ea Mon Sep 17 00:00:00 2001 From: David Eggerschwiler Date: Tue, 14 May 2019 14:00:16 +0200 Subject: [PATCH 2/9] Prepare for next release Update version of ScenariooJS to 4.0.0 due to a breaking change (discontinuation of WebDriver Control Flow) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a2610c9..0ffa027 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "scenarioo-js", "description": "Scenarioo API for Javascript to generate Scenarioo Documentations", - "version": "3.0.2", + "version": "4.0.0", "homepage": "http://scenarioo.org", "author": { "name": "xeronimus", From 21b2586e74e2786d720d26569882a77fb7f00bc5 Mon Sep 17 00:00:00 2001 From: David Eggerschwiler Date: Tue, 14 May 2019 14:02:57 +0200 Subject: [PATCH 3/9] Prepare for next release Update Migration Guide with migration steps from release 3.x to 4.x. --- MIGRATION.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 490c15d..49c6694 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,6 +1,20 @@ -## Migration Guide +# Migration Guide -This migration guide explains how to switch from SceanriooJS 1.x to ScenariooJS 2.x +This migration guide explains how to upgrade major versions of ScenariooJS. + +## 3.x to 4.x + +This section explains how to switch from ScenariooJS 3.x to ScenariooJS 4.x + +### Scenarioo Configuration + +ScenariooJS is no longer using WebDriver Control Flow. This means you should set `SELENIUM_PROMISE_MANAGER` to `0` in your protractor config file. + +For a complete example where `SELENIUM_PROMISE_MANAGER` has been configured correctly, see [Example protractor.conf.js](example/protractor.conf.js) + +## 1.x to 2.x + +This section explains how to switch from ScenariooJS 1.x to ScenariooJS 2.x ### Jasmine 2 Support From 15bd722925ca09437494158a664d37918a3c2efd Mon Sep 17 00:00:00 2001 From: David Eggerschwiler Date: Tue, 14 May 2019 14:09:36 +0200 Subject: [PATCH 4/9] Prepare for next release Update Changelog with new version 4.0.0. --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6cc8aa..1594dd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Scenarioo JS Versions -## Next version (not released) +## Version 4.0.0 -### Breaking Changes: +### Breaking Changes * Not using the WebDriver Control Flow anymore, so you should set `SELENIUM_PROMISE_MANAGER` to `0` in your protractor config file. @@ -10,7 +10,7 @@ * When saveLastStep is activated then both the screenshot and the step.xml are correctly created. ([#80](https://github.com/scenarioo/scenarioo-js/issues/80)) * When using the fluent DSL, description is now optional for use cases. ([#88](https://github.com/scenarioo/scenarioo-js/issues/88)) -### Other Changes: +### Other Changes * Update Libraries From a6d7d280e3a229dd4c6360cc14de7da9dd7ec1d8 Mon Sep 17 00:00:00 2001 From: David Eggerschwiler Date: Tue, 14 May 2019 14:24:42 +0200 Subject: [PATCH 5/9] Prepare for next release Tests are executed with npm and not with gulp. --- docs/contribute/release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contribute/release.md b/docs/contribute/release.md index 742121d..ef0b2c0 100644 --- a/docs/contribute/release.md +++ b/docs/contribute/release.md @@ -13,7 +13,7 @@ * Set correct version in `package.json` and run a full build * **Run tests**: - * `gulp test` + * `npm test` * run all examples and check it works as expected (see [example/README.md](../../example/README.md) for details) * also test generated output from examples can be read by Viewer Webapp (import generated output) From d35bfa55a863bfba6166be04ff12c9dd4d1ab43c Mon Sep 17 00:00:00 2001 From: David Eggerschwiler Date: Tue, 14 May 2019 14:32:56 +0200 Subject: [PATCH 6/9] Prepare for next release REVERT: SELENIUM_PROMISE_MANAGER should be defined outside of the block jasmineNodeOpts. See Scenarioo and https://www.protractortest.org/#/async-await. --- example/protractor.conf.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/protractor.conf.js b/example/protractor.conf.js index 214eb67..fb8fc7b 100755 --- a/example/protractor.conf.js +++ b/example/protractor.conf.js @@ -125,10 +125,10 @@ var exportsConfig = { includeStackTrace: true, // Default time to wait in ms before a test fails. - defaultTimeoutInterval: 60000 - }, + defaultTimeoutInterval: 60000, - SELENIUM_PROMISE_MANAGER: 0 + SELENIUM_PROMISE_MANAGER: 0 + } }; From 970325c56a2d45703543162ecd29c6da40634dc9 Mon Sep 17 00:00:00 2001 From: David Eggerschwiler Date: Tue, 14 May 2019 14:33:30 +0200 Subject: [PATCH 7/9] Prepare for next release One new test was added, thus 17 specs are expected to be executed. --- example/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/README.MD b/example/README.MD index 34fc06e..185b072 100644 --- a/example/README.MD +++ b/example/README.MD @@ -23,7 +23,7 @@ npm run e2e **You should see following in the output:**
``` -16 specs, 5 failures, 5 pending specs +17 specs, 5 failures, 5 pending specs ``` This is for testing and demonstrating how test failures and also pending tests are reported in scenarioo. From a6e8926b6311ae033e4ec8ee9940029f16bb5112 Mon Sep 17 00:00:00 2001 From: David Eggerschwiler Date: Tue, 14 May 2019 14:51:56 +0200 Subject: [PATCH 8/9] Prepare for next release Fix broken links and improve grammar. --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 7d905c5..4d1a268 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Some feature highlights include detection of changes in recorded screenshots and ### Version Notice -This documentation is for version 3.x of ScenariooJS. See [Changelog](CHANGELOG.md). +This documentation is for version 4.x of ScenariooJS. See [Changelog](CHANGELOG.md). ### Installation @@ -112,7 +112,7 @@ For a quick reference, you can also have a look at the following example files a - [exampleFluentDsl.spec.js](example/test/exampleFluentDsl.spec.js) - [exampleFluentDslWithTypeScript.spec.ts](example/test/exampleFluentDslWithTypeScript.spec.ts) - [exampleFluentDslWithTypeScriptAndPageObjects.spec.ts](example/test/exampleFluentDslWithTypeScriptAndPageObjects.spec.ts) - - [exampleFluentDslLabelDefinitions.spec.js](example/test/exampleFluentDslLabelDefinitions.spec.js) + - [exampleFluentDslLabelDefinitions.js](example/test/exampleFluentDslLabelDefinitions.js) - [exampleFluentDslPendingUseCase.spec.js](example/test/exampleFluentDslPendingUseCase.spec.js) - [Vanilla Jasmine](#vanilla-jasmine-style) - [exampleBasicJasmine.spec.js](example/test/exampleBasicJasmine.spec.js) @@ -165,18 +165,18 @@ Scenarioo will as well automatically report one additional step with a screensho To make this example work, the Labels have to be registered first before usage with the Fluent DSL. Refer to [exampleFluentDslLabelDefinitions.js](example/test/exampleFluentDslLabelDefinitions.js) to see how to register labels for usage in useCases, scenarios and steps. This is to avoid misspelling and cluttering of labels in all your tests. -But of course you do not have to add any labels, as long as you not want to label your tests. +But of course you do not have to add any labels, as long as you do not want to label your tests. -There are also functions like `fdescribe`, `xdescribe`, `xit`, `fit` in the DSL such that you have the same comfort as with using jasmine directly - or even more: there is even a special `pending` to mark temporarily disabled tests with a special pending-comment, which even works with protractor's asynch tests (contains a workaround for a known bug to the `pend`-feature of jasmine, which not works with protractor). +There are also functions like `fdescribe`, `xdescribe`, `xit`, `fit` in the DSL such that you have the same comfort as with using jasmine directly - or even more: there is even a special `pending` to mark temporarily disabled tests with a special pending-comment, which even works with protractor's async tests (contains a workaround for a known bug to the `pend`-feature of jasmine, which does not work with protractor). -If you do not like to use a special DSL in your tests, you can still use [Vanilla Jasmine Style](#vanilla-jasmine-style) to write your tests. But we not recommend to do so, because adding additional informations to your reports is less elegant using that other style. +If you do not like to use a special DSL in your tests, you can still use [Vanilla Jasmine Style](#vanilla-jasmine-style) to write your tests. But we do not recommend to do so, because adding additional information to your reports is less elegant using that style. #### Using Scenarioo with Typescript Typescript Typings are provided for the Fluent DSL (only). Since the Fluent DSL is the recommended API of the future, older Scenarioo APIs do not come with typings as their usage is discouraged. Refer to [exampleFluentDslWithTypeScript.spec.ts](example/test/exampleFluentDslWithTypeScript.spec.ts) -for a simple example using TypeScript with the Fluent DSL, which looks almost the same as above javascript example. +for a simple example using TypeScript with the Fluent DSL, which looks almost the same as the javascript example above. #### General Recommendations About Recording Steps @@ -186,8 +186,8 @@ Or you can try to do this by hooking into protractor functions, to ensure that a We recommend to do it in the page objects, because that is usually the place where you know, that something worthy of recording as a step happened. -If you are using Typescript (old Jasmine syntax or the new Fluent DSL), you can follow the example -[exampleFluentDslWithTypeScriptAndPageObjects.spec.ts](example/test/exampleFluentDslWithTypeScriptAndPageObjects.spec.ts) +If you are using Typescript (old Jasmine syntax or the new Fluent DSL), you can follow the examples +[exampleFluentDslWithTypeScriptAndPageObjects.spec.ts](example/test/exampleFluentDslWithTypeScriptAndPageObjects.spec.ts), [exampleBasicJasmineWithTypeScript.spec.ts](example/test/exampleBasicJasmineWithTypeScript.spec.ts) and the used page object [startPage.ts](example/test/pages/startPage.ts) as a reference on how to use a [Typescript Decorator](http://www.typescriptlang.org/docs/handbook/decorators.html) to perform this in an easy manner. @@ -195,7 +195,7 @@ object [startPage.ts](example/test/pages/startPage.ts) as a reference on how to #### Vanilla Jasmine Style -If you prefer to write your e2e tests in your usual Jasmine style with Protractor without using special Scenarioo DSL, you can do so: +If you prefer to write your e2e tests in your usual Jasmine style with Protractor without using the special Scenarioo DSL, you can do so: ```javascript @@ -218,17 +218,17 @@ describe('Example Usecase', function() { ``` -ScenariooJS will automatically report a `use case` for every `describe`-block and a `scenario` inside this use case for every contained `it`-block during running the tests. +ScenariooJS will automatically report a `use case` for every `describe`-block and a `scenario` inside this use case for every contained `it`-block during running of the tests. -Also a step (including a screenshot and additional details about the step) is reported at the end of each test scenario (on failure or success), if you configured so (see configuration possibilities in `example/protractor.conf.js`). We recommend to turn this on, because the last step is one of the most important ones in a test, especially if there are failures. +Also a step (including a screenshot and additional details about the step) is reported at the end of each test scenario (on failure or success), if you configured this (see configuration possibilities in [Example protractor.conf.js](example/protractor.conf.js)). We recommend to turn this on, because the last step is one of the most important ones in a test, especially if there are failures. Additional steps of a scenario can be reported by manually calling `scenarioo.saveStep('stepName');` in your tests. -Instead of using the Vanilla Jasmine Style, we recommend to use the special [Scenarioo Fluent DSL](#) which makes it even more easier to add additional information (like descriptions, labels, etc.) to your test reports. +Instead of using the Vanilla Jasmine Style, we recommend to use the special [Scenarioo Fluent DSL](#scenarioo-fluent-dsl) which makes it even easier to add additional information (like descriptions, labels, etc.) to your test reports. #### Backwards DSL for Migration -There is also a `Backward DSL` that is only interesting for easier migration from old scenarioo 1.x tests to the new scenarioo 2.x library with jasmine 2. See [Migration Guide](MIGRATION.md) on how to use this. +There is also a `Backward DSL` that is only interesting for an easier migration from old scenarioo 1.x tests to the new scenarioo 2.x library with jasmine 2. See [Migration Guide](MIGRATION.md) on how to use this. #### Define Custom App-specific DSL From fd33666696bc71ce0aec94f019050a99374a68de Mon Sep 17 00:00:00 2001 From: David Eggerschwiler Date: Tue, 14 May 2019 15:01:28 +0200 Subject: [PATCH 9/9] Prepare for next release Add link to Quickstart in Scenarioo docu. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 4d1a268..84ef298 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,10 @@ Some feature highlights include detection of changes in recorded screenshots and ## How to Use +### Quickstart + +If you just want to get a quick glance at how it all works, then you can follow this [Quickstart Guide](http://scenarioo.org/docs/master/tutorial/Quickstart-JS.html). + ### Version Notice This documentation is for version 4.x of ScenariooJS. See [Changelog](CHANGELOG.md).