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

Angular 2 test cases #4301

Closed
31 of 34 tasks
deepu105 opened this issue Oct 10, 2016 · 54 comments
Closed
31 of 34 tasks

Angular 2 test cases #4301

deepu105 opened this issue Oct 10, 2016 · 54 comments

Comments

@deepu105
Copy link
Member

deepu105 commented Oct 10, 2016

This is a tracker in order to test Angular 2 migration @jhipster/hipsters please add on If I missed anything
Related to #3664

Application

  • Default options with i18n
  • Default options without i18n
  • Default options with i18n prod profile
  • Default options without i18n prod profile
  • Default options regenerate existing app
  • Default options with SASS
  • Default options with Social Login
  • Default options with --skip-user-management flag
  • Default options with --jhi-prefix flag
  • Default options with --skip-server flag
  • Default options with i18n for Gateway
  • Default options without i18n for Gateway
  • Default options with i18n for UAA server
  • Default options without i18n for UAA server
  • Default options with Protractor
  • Gradle build Default with i18n
  • Gradle build Default without i18n
  • Gradle build Default with i18n prod profile
  • Gradle build Default without i18n prod profile
  • With Search engine
  • With websocket
  • JWT Auth
  • Oauth2 Auth
  • add new languages to app

Entity

  • With no pagination
  • With pager
  • With pagination
  • With Infinite scroll
  • With blob
  • With Image
  • With Text
  • Different field types
  • Different relationship types
  • Import from JDL
@deepu105 deepu105 added the ng2 label Oct 10, 2016
@deepu105 deepu105 added this to the Future 4.0 milestone Oct 10, 2016
@deepu105 deepu105 mentioned this issue Nov 25, 2016
19 tasks
@deepu105 deepu105 modified the milestone: Future 4.0 Nov 25, 2016
@deepu105 deepu105 added ng2 and removed ng2 labels Nov 30, 2016
@deepu105
Copy link
Member Author

@jhipster/developers @flaviencathala @VictorADS could you guys try to test any combinations from these and mark them done if they pass please?

@VictorADS
Copy link
Contributor

VictorADS commented Dec 30, 2016

Options I tested and that worked :

  • Default options with i18n
  • Default options without i18n
  • Default options regenerate existing app ( I had entities and i needed to regenerate them all to make it work)
  • With no pagination
  • With pager
  • With pagination
  • With Text
  • Different relationship types
  • Import from JDL

Needs more testing :

  • Different field types (Not sure EnumField generation works well)

Didnt work :

  • With blob
  • With Image

@xetys
Copy link
Member

xetys commented Jan 2, 2017

I am currently testing the default options with SASS enabled. I know SASS is not our main focus, but it is not really working, as:

  • hot reload is working somekind strange, not for all files
  • you can change the main.scss, but it doesn't affect the main.css

so

didn't work

  • Default with SASS

@jdubois
Copy link
Member

jdubois commented Jan 10, 2017

You also need to test entities with Elasticsearch, with and without i18n at least.

@deepu105
Copy link
Member Author

Test cases reset as we switched to Ng2 router :(

@pascalgrimaud
Copy link
Member

Some issues I found this morning:

  • maven build in dev:

  • pagination

    • in user management page, the pagination doesn't work
    • when generate an ng2 project (with BankAccount, Operation and Label as entities), the Label page can't be displayed, because of that code: ?page&sort&search
    • so I did the same in user-management page and I delete the ?page&sort&search, the page is displayed correctly (as in user management), but the pagination won't work

@deepu105
Copy link
Member Author

deepu105 commented Jan 24, 2017

@jhipster/developers guys more hands here please. Plz tick off the options that works without any issues (except known issues if any) If there are issues and if you cant do PR then plz open a ticket so that me or someone else can try to fix it

@pascalgrimaud
Copy link
Member

Here all Travis builds with only ng2 app:
https://travis-ci.org/pascalgrimaud/generator-jhipster/builds/195433340

It seems to be an issue with elasticsearch which should be fixed in this PR #4970

It wont replace manually tests but I think it can help

@deepu105
Copy link
Member Author

deepu105 commented Jan 26, 2017 via email

@pascalgrimaud
Copy link
Member

Karma tests are already enabled for all options.
And for protractor, yes I can! I will do that

@pascalgrimaud
Copy link
Member

With protractor enabled for all builds: https://travis-ci.org/pascalgrimaud/generator-jhipster/builds/195487021

  • Cassandra + ng2: fail on protractor tests
  • OAuth2 + ng2: fail on protractor tests

@deepu105
Copy link
Member Author

Thanks @pascalgrimaud I was wondering if we could test most of the options here with some kind of automation. with some script or something that can iterate through options and generate apps according to the options and build, lint, test. we cover some cases in travis but it might be nice to have such a script so that we can test everything locally (or in docker or something)

@pascalgrimaud
Copy link
Member

@deepu105 : what do you think about using the Travis builds from hipster labs orga ? As it is free and not used as often as jhipster orga

@deepu105
Copy link
Member Author

Yes we can use that if thats possible

@deepu105
Copy link
Member Author

also how difficult it is to configure Travis to run protractor tests on all builds when something is merged to master but not for PR builds?

@pascalgrimaud
Copy link
Member

Ok I ll give a try. Maybe I will need you to connect the repo to Travis, so I will ping you :P

@pascalgrimaud
Copy link
Member

Not difficult, just a variable to detect the branch which is currently tested by Travis.
So we can have a better build when merging into master, and a lighter build for PR. Or the other side if you prefer

@jdubois
Copy link
Member

jdubois commented Jan 28, 2017

  • Social login doesn't work, both with AngularJS 1 and Angular 2
    • With Angular 2, the login looks to work, but there is a stacktrace showing a registration email being sent (which shouldn't happen as we use Social login), and then we get redirected to a page with no view (there's the menu and footer, but nothing in the middle)
    • With AngularJS 1 I can't get authenticated by Google (and I'm using the same codes as for Angular 2)
  • On all projects, when I do a "prod" build, I still have a banner (the "ribbon" that shows we are in dev mode), with a message "no translation"
  • With JWT, I can't test with Swagger: when I click on "try it out" to test an API, it is not authenticated as the JWT token isn't sent. This needs to be checked also for OAuth2

@jdubois
Copy link
Member

jdubois commented Jan 28, 2017

  • I can't login with UAA. Everything starts up correctly, but the login form gets a 404 error. @xetys if you have time to check...

@jdubois
Copy link
Member

jdubois commented Jan 29, 2017

  • Websocket is checked as it works in "prod" mode, but in "dev" mode there is no way to use it correctly: with just HMR (port 9060) or with BrowserSync + HMR (port 9000) the socket can't be opened, so it's impossible to develop easily.

@ruddell
Copy link
Member

ruddell commented Jan 29, 2017

@jdubois I didn't have any issues with NG1 and Google, is there a specific error message? Also we send an email on account creation for social users

For NG2, social-auth.register.ts doesn't get the provider/success params from the route. I don't think this.provider = params['provider{success:boolean}']; looks right so I'll leave that to someone who knows ngRouter. For easier testing, the URL that breaks is http://localhost:9000/#/social-register/twitter?success=true

@jdubois
Copy link
Member

jdubois commented Jan 29, 2017

@ruddell for Social login + NG1, I get:

The redirect URI in the request, http://localhost:8080/signin/google, does not match the ones authorized for the OAuth client

But this URL is correctly configured, and works with NG2 (with NG2 it fails after that, when displaying the page)

@jdubois
Copy link
Member

jdubois commented Jan 29, 2017

And the last bullet point "add new languages to app" doesn't work...

-> I'm going to finish testing all those, and then I'll close this ticket and create one specific ticket per issue, as there are just too many of them here

@jdubois
Copy link
Member

jdubois commented Jan 29, 2017

Testing the entities:

  • Dates cannot be edited (both LocalDate and ZoneDateTime)
  • ZoneDateTime do not have the correct pop up, as the time can't be set up
  • The "pager" and "pagination" are the same component
  • In many-to-many relationships, when you view the entity, you cannot click on the "many" entities

@deepu105
Copy link
Member Author

@jdubois I see the Oauth option is checked but what about #4982 can someone take a look at it? I'm not an Oauth expert

@jdubois
Copy link
Member

jdubois commented Jan 29, 2017

@deepu105 oh I didn't test this, so OK let's uncheck this.
Maybe we should remove the OAuth2 option, it doesn't make much sense (you'd better have an external OAuth2 server, for what we do here JWT is much better and probably more secure), causes lots of issues, and nearly nobody uses it (only 13 generations last month!!). I'll do a ticket for this too.

@jdubois
Copy link
Member

jdubois commented Jan 29, 2017

I've tested everything, I'm going to:

  • Create tickets for each issue
  • Give them priorities

If we can't solve them easily, we can still remove options in the generators.

And I'll close this ticket afterwards as it is becoming too big.

@deepu105
Copy link
Member Author

@jdubois IMO lets not remove options as we are only releasing a Beta of angular support and not final. if we remove options we wont get feedback for those as failing options would prompt more contribution from people who try to use them and we can fix them once we move NG2 support out of Beta

@jdubois
Copy link
Member

jdubois commented Jan 29, 2017

@deepu105 it's not really cool to allow options that we know are failing. We should at the very least put a clear warning, like "unfinished".

@jdubois
Copy link
Member

jdubois commented Jan 29, 2017

@deepu105 I'm listing all those errors, I still have good hope we can solve them all.

@deepu105
Copy link
Member Author

Agree but isnt marking something as [BETA] clear warning that its unfinished?
Else we can mark such options [Unstable] so that people still get a chance to use them and fix them if its required for them. if we dont give people a way to use them at all then the burden of fixing those options will be solely on us.

@jdubois
Copy link
Member

jdubois commented Jan 29, 2017

Closing as I added all the issues as specific tickets!

@jdubois jdubois closed this as completed Jan 29, 2017
@deepu105
Copy link
Member Author

deepu105 commented Jan 29, 2017 via email

@gmarziou
Copy link
Contributor

gmarziou commented Jan 29, 2017

Just tried and it does not work.
I used prefix="example".
Should prefix also be used for ***Translate directives?

Template parse errors:↵Can't bind to 'predicate' s…iTranslate="global.fie"): UserMgmtComponent@11:78"} Error: Template parse errors:
Can't bind to 'predicate' since it isn't a known property of 'tr'. ("
        <table class="table table-striped">
            <thead>
            <tr exampleSort [ERROR ->][(predicate)]="predicate" [(ascending)]="reverse" [callback]="transition.bind(this)">
            <th"): UserMgmtComponent@11:28
Can't bind to 'ascending' since it isn't a known property of 'tr'. ("ss="table table-striped">
            <thead>
            <tr exampleSort [(predicate)]="predicate" [ERROR ->][(ascending)]="reverse" [callback]="transition.bind(this)">
            <th exampleSortBy="id"><span "): UserMgmtComponent@11:54
Can't bind to 'callback' since it isn't a known property of 'tr'. (">
            <thead>
            <tr exampleSort [(predicate)]="predicate" [(ascending)]="reverse" [ERROR ->][callback]="transition.bind(this)">
            <th exampleSortBy="id"><span jhiTranslate="global.fie"): UserMgmtComponent@11:78

@deepu105
Copy link
Member Author

Ya I tried as well and fixed most of the issues

@deepu105 deepu105 moved this from IN PROGRESS ISSUES to CLOSED ISSUES in Angular 2 Migration Feb 1, 2017
@deepu105 deepu105 mentioned this issue Feb 19, 2017
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Angular 2 Migration
CLOSED ISSUES
Development

No branches or pull requests

8 participants