-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16032 from opf/sharing-tests
Implement tests for sharing project queries
- Loading branch information
Showing
30 changed files
with
1,344 additions
and
83 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
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
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
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 |
---|---|---|
@@ -1,23 +1,22 @@ | ||
module Shares | ||
# @logical_path OpenProject/Shares | ||
class ShareDialogComponentPreview < Lookbook::Preview | ||
def project_query | ||
user = FactoryBot.build_stubbed(:admin) | ||
query = FactoryBot.build_stubbed(:project_query, user:) | ||
strategy = SharingStrategies::ProjectQueryStrategy.new(query, user:) | ||
strategy = SharingStrategies::ProjectQueryStrategy.new(query, user:, query_params: {}) | ||
errors = [] | ||
shares = [] | ||
|
||
render(Shares::ShareDialogComponent.new(strategy:, shares:, errors:)) | ||
render(Shares::ShareDialogComponent.new(strategy:, errors:, open: true)) | ||
end | ||
|
||
def work_package | ||
user = FactoryBot.build_stubbed(:admin) | ||
work_package = FactoryBot.build_stubbed(:work_package) | ||
strategy = SharingStrategies::WorkPackageStrategy.new(work_package, user:) | ||
strategy = SharingStrategies::WorkPackageStrategy.new(work_package, user:, query_params: {}) | ||
errors = [] | ||
shares = [] | ||
|
||
render(Shares::ShareDialogComponent.new(strategy:, shares:, errors:)) | ||
render(Shares::ShareDialogComponent.new(strategy:, errors:, open: true)) | ||
end | ||
end | ||
end |
Oops, something went wrong.