mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
Check old compat of other extension (CB-14125)
of plugin source file installed into app/src/main with old target-dir scheme NOTE: These tests do *not* check compatibility of plugins with old lib target-dir scheme.
This commit is contained in:
parent
578a642209
commit
92f07d0418
@ -77,6 +77,7 @@
|
||||
<source-file src="src/android/TestAar.aar"
|
||||
target-dir="app/libs" />
|
||||
<source-file src="src/android/mysettings.xml" target-dir="res/xml" />
|
||||
<source-file src="src/android/other.extension" target-dir="res/values" />
|
||||
<lib-file src="src/android/TestLib.jar" />
|
||||
</platform>
|
||||
</plugin>
|
||||
|
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/other.extension
vendored
Normal file
1
spec/fixtures/org.test.plugins.dummyplugin/src/android/other.extension
vendored
Normal file
@ -0,0 +1 @@
|
||||
dummy
|
@ -128,6 +128,13 @@ describe('android project handler', function () {
|
||||
'src/android/mysettings.xml', temp,
|
||||
path.join('app/src/main/res/xml/mysettings.xml'), false);
|
||||
});
|
||||
|
||||
it('Test#006e : should allow installing file with other extension from sources with old target-dir scheme', function () {
|
||||
android['source-file'].install(valid_source[5], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(copyFileSpy).toHaveBeenCalledWith(dummyplugin,
|
||||
'src/android/other.extension', temp,
|
||||
path.join('app/src/main/res/values/other.extension'), false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('of <framework> elements', function () {
|
||||
@ -307,6 +314,12 @@ describe('android project handler', function () {
|
||||
android['source-file'].uninstall(valid_source[4], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/res/xml/mysettings.xml'));
|
||||
});
|
||||
|
||||
it('Test#019e : should remove stuff by calling common.removeFile for Android Studio projects, of file with other extension with old target-dir scheme', function () {
|
||||
android['source-file'].install(valid_source[5], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
android['source-file'].uninstall(valid_source[5], dummyPluginInfo, dummyProject, {android_studio: true});
|
||||
expect(removeFileSpy).toHaveBeenCalledWith(temp, path.join('app/src/main/res/values/other.extension'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('of <framework> elements', function () {
|
||||
|
Loading…
Reference in New Issue
Block a user