Check old compat of other extension (CB-14125) (PR #550)

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:
Christopher J. Brody 2018-11-12 22:01:13 -05:00
parent e3468c66a3
commit dea6846918
3 changed files with 15 additions and 0 deletions

View File

@ -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>

View File

@ -0,0 +1 @@
dummy

View File

@ -134,6 +134,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 () {
@ -313,6 +320,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 () {