Skip to content

Conversation

@samgomena
Copy link
Member

@samgomena samgomena commented Oct 1, 2019

This PR add functionality for:

  • Automatically logging into the application when a valid token is present (i.e. logins in quick succession)
  • A more general store write method that now updates the store state on every request (it also properly removes the store on logout)

I realize this functionality isn't crucial but it was maddening to do any serious testing/development on the app and have to login every time.

Also, this already has Martin's changes incorporated so PR #67 should go in first!

Note: This functionality requires a new version of the API to be running which will be deployed sometime within the next week.

samgomena and others added 11 commits June 20, 2019 00:22
# Conflicts:
#	.travis.yml
#	src/api.py
#	src/jobs.py
#	src/login.py
#	src/uix/config.py
#	test/steps/step_api.py
#	test/test_api.py
# Conflicts:
#	.travis.yml
#	src/integrationtest/python/features/login.feature
#	src/integrationtest/python/steps/step_login.py
#	src/main.py
#	src/main/python/api.py
#	src/main/python/login.py
#	src/main/python/resources.py
#	src/uix/config.py
#	test/test_api.py
…a/develop

# Conflicts:
#	src/main/python/app.py
#	src/main/python/jobs.py
@samgomena samgomena added the enhancement New feature or request label Oct 1, 2019
@samgomena samgomena self-assigned this Oct 1, 2019
logyball
logyball previously approved these changes Oct 1, 2019
Copy link
Contributor

@logyball logyball left a comment

Choose a reason for hiding this comment

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

 Scenario: Verify only email input hint                             # src/integrationtest/python/features/login.feature:21
    When I spin up the application                                   # src/integrationtest/python/steps/step_helpers.py:39 0.046s
    And I open the login window                                      # src/integrationtest/python/steps/step_login.py:13 0.000s
    And I enter "test_user@test_email.com" in the username input box # src/integrationtest/python/steps/step_login.py:28 0.000s
    And I click the login button                                     # src/integrationtest/python/steps/step_login.py:48 0.001s
    Then the login hint text should be "Please enter your password." # src/integrationtest/python/steps/step_login.py:55 0.000s
      Assertion Failed: 'Please enter your email and password.' does not equal 'Please enter your password.'


  Scenario: Verify only password input hint                       # src/integrationtest/python/features/login.feature:28
    When I spin up the application                                # src/integrationtest/python/steps/step_helpers.py:39 0.051s
    And I open the login window                                   # src/integrationtest/python/steps/step_login.py:13 0.000s
    And I enter "test_password" in the password input box         # src/integrationtest/python/steps/step_login.py:28 0.000s
    And I click the login button                                  # src/integrationtest/python/steps/step_login.py:48 0.001s
    Then the login hint text should be "Please enter your email." # src/integrationtest/python/steps/step_login.py:55 0.000s
      Assertion Failed: 'Please enter your email and password.' does not equal 'Please enter your email.'


  Scenario: Verify incorrect credentials hint                                                 # src/integrationtest/python/features/login.feature:35
    When I spin up the application                                                            # src/integrationtest/python/steps/step_helpers.py:39 0.051s
    And I open the login window                                                               # src/integrationtest/python/steps/step_login.py:13 0.000s
    And I enter "test_user@test_email.com" in the username input box                          # src/integrationtest/python/steps/step_login.py:28 0.000s
    And I enter "test_password" in the password input box                                     # src/integrationtest/python/steps/step_login.py:28 0.000s
    And I click the login button                                                              # src/integrationtest/python/steps/step_login.py:48 0.001s
    Then the login hint text should be "The email or password you entered is not recognized." # src/integrationtest/python/steps/step_login.py:55 0.000s
      Assertion Failed: 'Please enter your email and password.' does not equal 'The email or password you entered is not recognized.'


  Scenario: Verify correct credentials hint                     # src/integrationtest/python/features/login.feature:43
    When I spin up the application                              # src/integrationtest/python/steps/step_helpers.py:39 0.050s
    And I open the login window                                 # src/integrationtest/python/steps/step_login.py:13 0.000s
    And I enter "samgomena@gmail.com" in the username input box # src/integrationtest/python/steps/step_login.py:28 0.000s
    And I enter "password" in the password input box            # src/integrationtest/python/steps/step_login.py:28 0.000s
    And I click the login button                                # src/integrationtest/python/steps/step_login.py:48 0.001s
    Then I should be able to log in to the application          # src/integrationtest/python/steps/step_login.py:62 0.000s
      Assertion Failed: '0' does not equal '1'

some issues locally with the behave tests but I think the fixes should be in the fbs_refactor branch

@logyball
Copy link
Contributor

is this ready for re-review? Can probably merge develop back into it and put it up for review again

@samgomena
Copy link
Member Author

samgomena commented Oct 17, 2019

is this ready for re-review? Can probably merge develop back into it and put it up for review again

Yea, it's all jacked up after merging develop into it unfortunately. I'll spend some time fixing it this weekend or early next week!

Alright, sorry for letting the file modification count balloon into the dozens but this should be ready to for another look over and I think the majority of the changes should be pretty straight forward!

Copy link
Contributor

@logyball logyball left a comment

Choose a reason for hiding this comment

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

just one minor thing - removing the token from src

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants