Skip to content

Commit

Permalink
Merge pull request #13236 from opf/code-maintenance/49285-fix-flaky-s…
Browse files Browse the repository at this point in the history
…pec-modulesstoragesspecfeaturesmanage_project_storage_specrb1

[#49285] Fix flaky specs `modules/storages/spec/features/{manage_project_storage_spec.rb,create_file_links_spec.rb}`
  • Loading branch information
ba1ash authored Jul 26, 2023
2 parents f846f2f + 2263410 commit 4dbc399
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/storages/spec/features/create_file_links_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
before do
allow(Storages::FileLinkSyncService).to receive(:new).and_return(sync_service)

stub_request(:get, "https://host1.example.com/ocs/v1.php/cloud/user")
stub_request(:get, "#{storage.host}/ocs/v1.php/cloud/user")
.with(
headers: {
'Authorization' => 'Bearer 1234567890-1',
Expand Down
5 changes: 2 additions & 3 deletions modules/storages/spec/features/manage_project_storage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@
end

before do
skip("Flaky test disabled. Fix it in https://community.openproject.org/wp/49285")

oauth_client_token

stub_request(:propfind, "#{storage.host}/remote.php/dav/files/#{oauth_client_token.origin_user_id}/")
Expand Down Expand Up @@ -117,7 +115,8 @@
page.find('.toolbar .button--icon.icon-add').click
expect(page).to have_current_path new_project_settings_projects_storage_path(project_id: project)
expect(page).to have_text('Add a file storage')
expect(page).to have_select('storages_project_storage_storage_id', options: ['Storage 1 (nextcloud)'])
expect(page).to have_select('storages_project_storage_storage_id',
options: ["#{storage.name} (#{storage.short_provider_type})"])
page.click_button('Continue')

# by default automatic have to be choosen if storage has automatic management enabled
Expand Down

0 comments on commit 4dbc399

Please sign in to comment.