aksharagpostman / testing-sentiment2

0 stars 0 forks source link

msd #132

Open aksharagpostman opened 5 years ago

aksharagpostman commented 5 years ago

Bug Description When I open Postman Windows application is starts to meltdown applications screen, starting from top corners and menus. When I scroll down on the melting area with mouse it turns to normal.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'www.getpostman.com'
  2. Click on 'Download the app installer x64 for windows' (mine is Dell XPS 15" 2in1 with 4K display)
  3. After installing 'Open' the app and just start working with it/or don't do anything while the app is open.
  4. After few minutes you will see the meltdown.

Expected behavior It should not meltdown.

Screenshots I attached the screenshot, look at the one on the bottom in 4K, app menu and above sign in button. 1

App information (please complete the following information):

Additional context Add any other context about the problem here.

aksharagpostman commented 5 years ago

I have some tests (POST {{url}}/users):

JSON body for request defined in Postman:

{
    "e-mail": "{{e-mail}}",
    "password": "{{password}}"
}

I have JSON data object set to env dataObj:

{
    "users" : {
        "userCreated":{
            "e-mail": "just@ask.me",
            "password": "Dzi0b4k!"
        },
        "invalidEmailAddress" : {
            "password" : "rightPass1@",
            "noAtChar" : {
                "e-mail": "dadadada.ta"
            },
            "noDotChar":{
                "e-mail": "dadad@adata"
            },
            "notAtLeastOneCharBeforeAt":{
                "e-mail": "@da.da"
            }
        }

    }
}

Pre-request Script section:

let dataObj = JSON.parse(pm.environment.get("dataObj"));
pm.environment.set("e-mail", dataObj.users.invalidEmailAddress.notAtLeastOneCharBeforeAt["e-mail"]);
pm.environment.set("password", dataObj.users.invalidEmailAddress.password);

For each test I set new value for "e-mail" variable from dataObj in pre-request script. It's easier to use filled JSON object than hardcoded values from data portability and management perspective. Postman documentation gets current value of "e-mail" variable at the time of generating. So ie. frontend developer will be confused seeing different test scenarios for validating e-mail address with always set the same value for e-mail property in request JSON object.

In my opinion for each endpoint before docs generation should be evaluated pre-request script section to set correct variables (could be a checkbox option). This will resolve bad request body examples in Postman docs.