me.apla.cordova.app-preferences icon indicating copy to clipboard operation
me.apla.cordova.app-preferences copied to clipboard

Browser mocks/testing?

Open Zorgatone opened this issue 9 years ago • 8 comments

I've been thinking, is there a way to test/mock this plugin in the browser?

Since it has local storage fallback, it would be good to access it in the browser during development. Do you know how can we do it?

It's very frustrating to have to run on a simulator or device, just to test your application preferences.

I hope it's possible.

Zorgatone avatar Dec 11 '15 08:12 Zorgatone

I've just added ability to test iOS plugin, browser testing is also possible, but I don't understand purpose. Can you clarify a little?

apla avatar Jan 10 '16 23:01 apla

Seems I get your message wrong. Probably you wanted to add browser cordova platform. So, I did it. Try version 0.7.7

apla avatar Feb 04 '16 08:02 apla

Sorry I didn't reply in time.

I mean my app needs to know the settings to function, and I also need to be able to test my app without a device or a simulator while developing it. What I tipically use is cordova or ionic serve command. I have the browser platform added, but you mean I should do cordova run browser?

When I said test/mock I meant this. It would be too slow/boring to run everytime on device or simulator, that's why I suggested to support the browser :smile:

Zorgatone avatar Feb 04 '16 08:02 Zorgatone

I'll try version 0.7.7, as soon as I'll be implementing the settings/preferences of my app. I'm behind schedule of other features atm

Zorgatone avatar Feb 04 '16 08:02 Zorgatone

cordova run browser and cordova serve works fine in desktop browser now.

apla avatar Feb 04 '16 08:02 apla

Great thanks! Can't want to try it out now

Zorgatone avatar Feb 04 '16 09:02 Zorgatone

Hi apla. Great thanks to your plugin. When I test my app by running ionic serve , I keep getting message Error: Plugin not enabled(…) in Chrome. I am using 0.7.7. And my ngCordova version is v0.1.23-alpha. My ionic.Platform.platforms = browser,ios,ios8,ios8_0 . I change the browser UA to set platform to platforms: browser,macintel . The error keeps. I guess there's some slight difference between ionic serve and cordova serve?

pougin avatar Feb 14 '16 09:02 pougin

@pougin seems like you faced different issue, please take a look https://github.com/apla/me.apla.cordova.app-preferences/issues/70#issuecomment-179686449

apla avatar Feb 14 '16 09:02 apla