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

Indentation of tests in the cypress electron app is poor #3652

Closed
cmcnicholas opened this issue Mar 5, 2019 · 5 comments
Closed

Indentation of tests in the cypress electron app is poor #3652

cmcnicholas opened this issue Mar 5, 2019 · 5 comments
Labels
good first issue Good for newcomers pkg/desktop-gui This is due to an issue in the packages/desktop-gui directory type: user experience Improvements needed for UX

Comments

@cmcnicholas
Copy link

cmcnicholas commented Mar 5, 2019

Current behavior:

Indentation in the electron runner for test cases is poorly organised.

Desired behavior:

To have a better layout for readability. Simply being nested correctly would help.

Steps to reproduce: (app code and test code)

Simply create a deeply nested hierarchy of tests.

image

Versions

3.1.5

@jennifer-shehane
Copy link
Member

Hey @cmcnicholas, could you provide a screenshot / list of the file directory structure you have in your project? It's hard to tell from the image how it is supposed to look. Thanks!

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Mar 6, 2019
@cmcnicholas
Copy link
Author

Full output of our tests directory, this is in the root of the project, assume cypress.json is a sibling of the tests directory. We have a lot of data files so house our .json fixtures next to the test files themselves rather than replicate the structure in fixtures, hope that makes sense

----tests
-   ----e2e
-   -   ----fixtures
-   -   -       config.json
-   -   -       pikachu.jpeg
-   -   -       
-   -   ----plugins
-   -   -       index.js
-   -   -       webpack.config.js
-   -   -       
-   -   ----screenshots
-   -   -   ----Special.ts
-   -   -           File preview -- fake test 1 -- after all hook (failed) (1).png
-   -   -           File preview -- fake test 1 -- after all hook (failed).png
-   -   -           File preview -- fake test 1 -- before all hook (failed) (1).png
-   -   -           File preview -- fake test 1 -- before all hook (failed).png
-   -   -           
-   -   ----specs
-   -   -   -   SmokeTest.json
-   -   -   -   SmokeTest.ts
-   -   -   -   
-   -   -   ----all
-   -   -   -   ----full
-   -   -   -   -   ----data-explorer
-   -   -   -   -   -       DataExplorer.json
-   -   -   -   -   -       DataExplorer.ts
-   -   -   -   -   -       
-   -   -   -   -   ----file-explorer
-   -   -   -   -           FileExplorer.json
-   -   -   -   -           FileExplorer.ts
-   -   -   -   -           
-   -   -   -   ----right
-   -   -   -   -   ----cards
-   -   -   -   -   -   ----edit
-   -   -   -   -   -   -       EditGeneralCard.json
-   -   -   -   -   -   -       EditGeneralCard.ts
-   -   -   -   -   -   -       
-   -   -   -   -   -   ----info
-   -   -   -   -   -           InfoGeneralCard.json
-   -   -   -   -   -           InfoGeneralCard.ts
-   -   -   -   -   -           InfoQueriesCard.json
-   -   -   -   -   -           InfoQueriesCard.ts
-   -   -   -   -   -           
-   -   -   -   -   ----design
-   -   -   -   -   -   ----edit
-   -   -   -   -   -   -       EditGeneralDesign.json
-   -   -   -   -   -   -       EditGeneralDesign.ts
-   -   -   -   -   -   -       
-   -   -   -   -   -   ----info
-   -   -   -   -   -           InfoInterfacesDesign.json
-   -   -   -   -   -           InfoInterfacesDesign.ts
-   -   -   -   -   -           
-   -   -   -   -   ----group
-   -   -   -   -   -   ----edit
-   -   -   -   -   -   -       EditGeneralGroup.json
-   -   -   -   -   -   -       EditGeneralGroup.ts
-   -   -   -   -   -   -       
-   -   -   -   -   -   ----info
-   -   -   -   -   -           InfoGeneralGroup.json
-   -   -   -   -   -           InfoGeneralGroup.ts
-   -   -   -   -   -           
-   -   -   -   -   ----item
-   -   -   -   -   -   ----info
-   -   -   -   -   -           InfoTeamLeadersItem.json
-   -   -   -   -   -           InfoTeamLeadersItem.ts
-   -   -   -   -   -           InfoTeamMembersItem.json
-   -   -   -   -   -           InfoTeamMembersItem.ts
-   -   -   -   -   -           InfoTeamsItem.json
-   -   -   -   -   -           InfoTeamsItem.ts
-   -   -   -   -   -           
-   -   -   -   -   ----toolbar
-   -   -   -   -   -   ----basemaps
-   -   -   -   -   -   -       CreateBasemap.json
-   -   -   -   -   -   -       CreateBasemap.ts
-   -   -   -   -   -   -       
-   -   -   -   -   -   ----layers
-   -   -   -   -   -   -   -   Layers.json
-   -   -   -   -   -   -   -   Layers.ts
-   -   -   -   -   -   -   -   
-   -   -   -   -   -   -   ----layer
-   -   -   -   -   -   -   -       Layer.json
-   -   -   -   -   -   -   -       Layer.ts
-   -   -   -   -   -   -   -       LayerTags.json
-   -   -   -   -   -   -   -       LayerTags.ts
-   -   -   -   -   -   -   -       
-   -   -   -   -   -   -   ----style
-   -   -   -   -   -   -       -   StyleGeneral.json
-   -   -   -   -   -   -       -   StyleGeneral.ts
-   -   -   -   -   -   -       -   
-   -   -   -   -   -   -       ----edit
-   -   -   -   -   -   -               EditGeneralStyle.json
-   -   -   -   -   -   -               EditGeneralStyle.ts
-   -   -   -   -   -   -               
-   -   -   -   -   -   ----search
-   -   -   -   -   -           Search.json
-   -   -   -   -   -           Search.ts
-   -   -   -   -   -           
-   -   -   -   -   ----user
-   -   -   -   -       ----edit
-   -   -   -   -               EditUser.json
-   -   -   -   -               EditUser.ts
-   -   -   -   -               
-   -   -   -   ----split
-   -   -   -       ----center
-   -   -   -       -   -   Center.json
-   -   -   -       -   -   Center.ts
-   -   -   -       -   -   
-   -   -   -       -   ----designs
-   -   -   -       -   -       DesignGraph.json
-   -   -   -       -   -       DesignGraph.ts
-   -   -   -       -   -       
-   -   -   -       -   ----teams
-   -   -   -       -           TeamGraph.json
-   -   -   -       -           TeamGraph.ts
-   -   -   -       -           
-   -   -   -       ----left
-   -   -   -           ----activities
-   -   -   -           -   ----create
-   -   -   -           -       ----team
-   -   -   -           -       -       CreateTeam.json
-   -   -   -           -       -       CreateTeam.ts
-   -   -   -           -       -       
-   -   -   -           -       ----team-member
-   -   -   -           -               CreateTeamMember.json
-   -   -   -           -               CreateTeamMember.ts
-   -   -   -           -               
-   -   -   -           ----designer
-   -   -   -           -   ----create
-   -   -   -           -       ----attribute
-   -   -   -           -       -       CreateAttributeBoolean.ts
-   -   -   -           -       -       CreateAttributeDate.ts
-   -   -   -           -       -       CreateAttributeDateTime.ts
-   -   -   -           -       -       CreateAttributeGeoJson.ts
-   -   -   -           -       -       CreateAttributeJson.ts
-   -   -   -           -       -       CreateAttributeLink.ts
-   -   -   -           -       -       CreateAttributeNumber.ts
-   -   -   -           -       -       CreateAttributeSeasonal.ts
-   -   -   -           -       -       CreateAttributeStream.ts
-   -   -   -           -       -       CreateAttributeString.ts
-   -   -   -           -       -       CreateAttributeTime.ts
-   -   -   -           -       -       
-   -   -   -           -       ----design
-   -   -   -           -               CreateDesign.json
-   -   -   -           -               CreateDesign.ts
-   -   -   -           -               
-   -   -   -           ----map
-   -   -   -           -   ----layers
-   -   -   -           -   -   ----create
-   -   -   -           -   -           CreateLayer.json
-   -   -   -           -   -           CreateLayer.ts
-   -   -   -           -   -           CreateTag.json
-   -   -   -           -   -           CreateTag.ts
-   -   -   -           -   -           
-   -   -   -           -   ----style
-   -   -   -           -       ----create
-   -   -   -           -               CreateStyleAqs.json
-   -   -   -           -               CreateStyleAqs.ts
-   -   -   -           -               CreateStyleWfs.json
-   -   -   -           -               CreateStyleWfs.ts
-   -   -   -           -               
-   -   -   -           ----permissions
-   -   -   -           -   ----create
-   -   -   -           -       ----group
-   -   -   -           -       -       CreateGroup.json
-   -   -   -           -       -       CreateGroup.ts
-   -   -   -           -       -       
-   -   -   -           -       ----user
-   -   -   -           -               CreateUser.json
-   -   -   -           -               CreateUser.ts
-   -   -   -           -               
-   -   -   -           ----query-builder
-   -   -   -           -       CreateQueryBuilder.json
-   -   -   -           -       CreateQueryBuilder.ts
-   -   -   -           -       
-   -   -   -           ----settings
-   -   -   -               ----create
-   -   -   -                   ----card
-   -   -   -                   -       CreateCard.json
-   -   -   -                   -       CreateCard.ts
-   -   -   -                   -       
-   -   -   -                   ----card-query
-   -   -   -                           CreateCardQuery.json
-   -   -   -                           CreateCardQuery.ts
-   -   -   -                           
-   -   -   ----splash
-   -   -       ----login
-   -   -               Login.json
-   -   -               Login.ts
-   -   -               
-   -   ----support
-   -       -   before.ts
-   -       -   index.ts
-   -       -   
-   -       ----api
-   -       -       aqs.ts
-   -       -       card.ts
-   -       -       design.ts
-   -       -       file.ts
-   -       -       forge.ts
-   -       -       index.ts
-   -       -       item.ts
-   -       -       layer.ts
-   -       -       request.ts
-   -       -       RequestError.ts
-   -       -       session.ts
-   -       -       user.ts
-   -       -       userGroup.ts
-   -       -       
-   -       ----commands
-   -       -       config.ts
-   -       -       createCustomer.ts
-   -       -       createUser.ts
-   -       -       dataAttribute.ts
-   -       -       index.ts
-   -       -       login.ts
-   -       -       scaffold.ts
-   -       -       search.ts
-   -       -       setup.ts
-   -       -       teardown.ts
-   -       -       toast.ts
-   -       -       waitTask.ts
-   -       -       
-   -       ----models
-   -       -       AttributeFixtureJson.ts
-   -       -       ConfigFixtureJson.ts
-   -       -       DesignFixtureJson.ts
-   -       -       E2eConfig.ts
-   -       -       E2eCustomer.ts
-   -       -       E2eDesign.ts
-   -       -       E2eItem.ts
-   -       -       E2eSetup.ts
-   -       -       E2eUser.ts
-   -       -       index.ts
-   -       -       ItemFixtureJson.ts
-   -       -       Scaffold.ts
-   -       -       TaskError.ts
-   -       -       UserFixtureJson.ts
-   -       -       
-   -       ----utils
-   -               createRandomUserDetails.ts
-   -               index.ts

@cypress-bot cypress-bot bot added stage: ready for work The issue is reproducible and in scope and removed stage: needs information Not enough info to reproduce the issue labels Mar 6, 2019
@jennifer-shehane jennifer-shehane added pkg/desktop-gui This is due to an issue in the packages/desktop-gui directory type: user experience Improvements needed for UX labels Mar 6, 2019
@jennifer-shehane
Copy link
Member

Thanks!

The css for this is really naive and simply not handling nesting beyond 5 levels deep. Can be found here: https://github.com/cypress-io/cypress/blob/develop/packages/desktop-gui/src/specs/specs.scss#L238

Also, the fact that we list everything alphabetical, instead of showing folders first then spec files also causes confusion.

screen shot 2019-03-06 at 11 23 19 pm

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 19, 2019

The code for this is done in cypress-io/cypress#3711, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 17, 2019

Released in 3.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers pkg/desktop-gui This is due to an issue in the packages/desktop-gui directory type: user experience Improvements needed for UX
Projects
None yet
Development

No branches or pull requests

2 participants