Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Behat] Refactored displaying of application/browser logs #1271

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

mnocon
Copy link
Member

@mnocon mnocon commented Mar 10, 2020

Question Answer
Tickets https://jira.ez.no/browse/EZP-31453
Bug fix? no
New feature? no
BC breaks? no
Tests pass? yes
Doc needed? no
License GPL-2.0

This PR refactors how the logs are displayed (by moving the responsibility of providing the logs into a new class) so that most of the logic can be reused in Allure bundles (and add the logs as attachments).

Required by: ezsystems/allure-behat#8

This PR also introduces some formatting changes to how the output is displayed, to make it more readable.

See: https://travis-ci.org/ezsystems/ezplatform-admin-ui/jobs/660613158?utm_medium=notification&utm_source=github_status for how it looks now:

        │  JS Console errors:
        │  	http://web/assets/ezplatform/build/ezplatform-admin-ui-content-edit-parts-js.js 9401:12 "EzObjectRelation fieldtype is deprecated. Please, use EzObjectRelationList fieldtype instead."
        │  Application logs:
        │  	[2020-03-10 13:08:16] Starting Step "I go to "Content structure" in "Content" tab" 
        │  	[2020-03-10 13:08:17] Ending Step "I go to "Test Object State Group edited2" "Object State Group" page" 
        │  	[2020-03-10 13:08:17] Starting Step "I start creating new "Object State" in "Test Object State Group edited2"" 
        │  	[2020-03-10 13:08:18] Ending Step "I start creating new "Object State" in "Test Object State Group edited2"" 
        │  	[2020-03-10 13:08:18] Starting Step "I set fields" 
        │  	[2020-03-10 13:08:19] Ending Step "I set fields" 
        │  	[2020-03-10 13:08:19] Starting Step "I click on the edit action bar button "Create"" 
        │  	[2020-03-10 13:08:20] Ending Step "I click on the edit action bar button "Create"" 
        │  	[2020-03-10 13:08:20] Starting Step "I should be on "Object State" "Test Object State" page" 
        │  	[2020-03-10 13:08:21] Ending Step "I should be on "Object State" "Test Object State" page" 
        │  	[2020-03-10 13:08:21] Starting Step ""Object State" "Test Object State" has proper attributes" 
        │  	[2020-03-10 13:08:21] Ending Step ""Object State" "Test Object State" has proper attributes" 
        │  	[2020-03-10 13:08:21] Starting Step "notification that "Object state" "Test Object State" is created appears" 
        │  	[2020-03-10 13:08:22] Ending Step "I go to "Content structure" in "Content" tab" 
        │  	[2020-03-10 13:08:22] Starting Step "I start creating a new content "Country CT"" 
        │  	[2020-03-10 13:08:23] Ending Step "notification that "Object state" "Test Object State" is created appears" 
        │  	[2020-03-10 13:08:23] Ending Scenario "New Object State can be added" 
        │  	[2020-03-10 13:08:23] Starting Scenario "I can navigate to Object State Group page through breadcrumb" 
        │  	[2020-03-10 13:08:23] Starting Step "I am logged as "admin"" 
        │  	[2020-03-10 13:08:25] Ending Step "I am logged as "admin"" 
        │  	[2020-03-10 13:08:25] Starting Step "I go to "Object States" in "Admin" tab" 
        │  	[2020-03-10 13:08:27] Ending Step "I start creating a new content "Country CT"" 
        │  	[2020-03-10 13:08:27] Starting Step "I set content fields" 
        │  	[2020-03-10 13:08:27] Ending Step "I set content fields" 

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

Before merge:

  • rebase and remove TMP commits

@mnocon mnocon changed the title [Behat] Refactored displaying of application/browser logs [DON'T MERGE] [Behat] Refactored displaying of application/browser logs Mar 10, 2020
Copy link
Member

@micszo micszo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's definitely more readable with the indent. 🙂

@mnocon mnocon force-pushed the add-attachments branch from 22e3e44 to 63d34ea Compare April 8, 2020 11:41
@mnocon mnocon changed the title [DON'T MERGE] [Behat] Refactored displaying of application/browser logs [Behat] Refactored displaying of application/browser logs Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants