Skip to content

Commit

Permalink
proper map testing
Browse files Browse the repository at this point in the history
  • Loading branch information
richardelms committed Jan 3, 2025
1 parent 31b56a2 commit edf4559
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ gem 'rake'
gem 'xcpretty'
gem 'xcodeproj'
gem 'cocoapods'
gem 'rake'
gem 'danger'

unless Gem.win_platform?
Expand Down
6 changes: 5 additions & 1 deletion features/build/build_android.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ Feature: Build Android
Scenario: Auto Symbol Upload
When I run the script "features/scripts/prepare_fixture.sh" synchronously
When I run the script "features/scripts/build_android.sh release" synchronously
Then I wait to receive 6 uploads
Then I wait to receive 6 sourcemaps
Then the sourcemaps Content-Type header is valid multipart form-data
And the sourcemap payload field "apiKey" equals "a35a2a72bd230ac0aa0f52715bbdc6aa"
And the sourcemap payload field "versionCode" equals "123"
And the sourcemap payload field "versionName" equals "1.2.3"
4 changes: 3 additions & 1 deletion features/fixtures/maze_runner/Assets/Editor/Builder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ public static void AndroidRelease()
settingsObject.ApiKey = "a35a2a72bd230ac0aa0f52715bbdc6aa";
settingsObject.StartAutomaticallyAtLaunch = false;
settingsObject.AutoUploadSymbols = true;
settingsObject.UploadEndpoint = "http://localhost:9339/uploads";
settingsObject.UploadEndpoint = "http://localhost:9339";
settingsObject.AppVersion = "1.2.3";
settingsObject.VersionCode = 123;
EditorUtility.SetDirty(settingsObject);
#endif
BuildAndroid(false);
Expand Down
6 changes: 6 additions & 0 deletions features/steps/unity_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ def execute_command(action, scenario_name = '')
raise 'Test fixture did not GET /command' unless Maze::Server.commands.remaining.empty?
end

Then('the sourcemaps Content-Type header is valid multipart form-data') do
expected = /^multipart\/form-data; boundary=([^;]+)/
actual = Maze::Server.sourcemaps.current[:request]['content-type']
Maze.check.match(expected, actual)
end

When('I clear the Bugsnag cache') do
case Maze::Helper.get_current_platform
when 'macos', 'webgl'
Expand Down

0 comments on commit edf4559

Please sign in to comment.