summaryrefslogtreecommitdiff
path: root/spec/features/projects/integrations/google_play_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/integrations/google_play_spec.rb')
-rw-r--r--spec/features/projects/integrations/google_play_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/features/projects/integrations/google_play_spec.rb b/spec/features/projects/integrations/google_play_spec.rb
new file mode 100644
index 00000000000..db867fc40d7
--- /dev/null
+++ b/spec/features/projects/integrations/google_play_spec.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe 'Upload Dropzone Field', feature_category: :integrations do
+ include_context 'project integration activation'
+
+ it 'uploads the file data to the correct form fields and updates the messaging correctly', :js, :aggregate_failures do
+ visit_project_integration('Google Play')
+
+ expect(page).to have_content('Drag your key file here or click to upload.')
+ expect(page).not_to have_content('service_account.json')
+
+ find("input[name='service[dropzone_file_name]']",
+ visible: false).set(Rails.root.join('spec/fixtures/service_account.json'))
+
+ expect(page).to have_field("service[service_account_key]", type: :hidden,
+ with: File.read(Rails.root.join('spec/fixtures/service_account.json')))
+ expect(page).to have_field("service[service_account_key_file_name]", type: :hidden, with: 'service_account.json')
+
+ expect(page).not_to have_content('Drag your key file here or click to upload.')
+ expect(page).to have_content('service_account.json')
+ end
+end