-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FP-891 fix external workbench access disrupted by onboarding (#358)
* Change only loading part of state when fetching workbench * Pass context data which has setup_complete * Handle anonymous users * Add unit tests * Build/install client during CI to generate templates * Add build client step for template generation to CI * Refactor github actions to client install is defined in standalone action * Run actions/checkout in local action * Fix action name/path * Revert attempt at composite action Not supported yet: actions/runner#646 * Copy template for unit testing instead of client building it * Fix copy command
- Loading branch information
1 parent
525fc34
commit 1ea3a60
Showing
4 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
def test_search_unauthenticated(client, regular_user): | ||
response = client.get('/search/') | ||
assert response.status_code == 200 | ||
assert response.context['setup_complete'] is False | ||
|
||
|
||
def test_search_authenticated_without_setup_complete(client, authenticated_user): | ||
response = client.get('/search/') | ||
assert response.status_code == 200 | ||
assert response.context['setup_complete'] is False | ||
|
||
|
||
def test_search_authenticated_with_setup_complete(client, authenticated_user): | ||
authenticated_user.profile.setup_complete = True | ||
authenticated_user.profile.save() | ||
response = client.get('/search/') | ||
assert response.status_code == 200 | ||
assert response.context['setup_complete'] |