I am using vue3 composition API, vue-router, and cypress, and when I call:
cy.get('[data-test-id="sidebar-customers"]').click()
the element receives the click event and router.push(path: '/customers') is called, and everything works fine in my app. However, in cypress, the screen does not change to follow the path to which the router is pointing.
How do I get around this?
Related
Here's what I'm trying to achieve with my Chrome extension and the issue I'm facing:
My extension runs an ajax call every x minutes to a server and based on the result, displays the updated information in the extension pop-up window.
I was able to implement all of this logic with my ajax call made from popup.js and it works perfectly fine.
The only limitation I currently face is that the extension user has to click on the extension icon for the popup.js/html script to be triggered and executed (which is expected).
- I'm trying to figure how to trigger the ajax call function when the browser is launched.
Solution trial 1: I moved my ajax call and response logic from popup.js to background.js and included a chrome.runtime.onStartup.addListener. The problem with this approach is that background.js can't access my popup DOM and thus I cannot display my updated information.
Solution trial 2: I kept my ajax call and response logic in popup.js. In background.js, I added a chrome.runtime.sendMessage within the chrome.runtime.onStartup.addListener. The problem with this approach is that popup.js is not triggered obviously (no user click on extension icon yet) and thus apparently not able to get the message from background.js to execute the ajax call.
I'm pretty confused with what is the right approach to follow, it feels a bit like an chicken & egg problem.
Any help or feedback would be very much appreciated. Thanks in advance!
P.S: I'm using Manifest V3
I am trying to merge surveyjs along with my NativeScript application. I have referred URL for merging the same with Angular application
From the Angular demo code given on website, we have to add event handler for Complete button where we can get the response from surveyjs. Is it possible to integrate similarly for Nativescript Mobile application? Here is the approach which i feel can be taken.
Display
Create a HTML as provided by SurveyJS with required CSS and JS
referenced and add them as a file in project.
Modify HTML once i get the survey question json back from server.
Show the HTML as part of WebView. This will take care of displaying
the survey on my Application.
Here are my challenges during Submission
As per the process given on SurveyJS, i need to add handler for
oncomplete which will get the result json for me. How can i add
handlers for Complete button click in my code? Also please note that
there is a possibility that there may be multiple surveys on a single
page.
Apart from Survey, there are other fields also on the page and user
will submit them all in one go by clicking submit button of the page.
Hence i am planning to hide Complete button provided by SurveyJS
page. This needs to be triggered via code. Can this be done?
If someone can give directions on whether this scenario can be handled in nativescript application with Angular,it would help immensely.
yes it can be done using nativescript-webview-interface plugin.
add jS code inside WebView to handle oncomplete event from surveyJS. and on that function call emit some event to native app. after that add nativescript code to listen for that event and get the JSON back.
inside webView JS function
var oWebViewInterface = window.nsWebViewInterface;
// emit event to native app
oWebViewInterface.emit('anyEvent', jsonData);
inside native App
oWebViewInterface.on('anyEvent', function(jsonData){
// perform action on event
});
for more details on this you can check plugin readme file https://github.com/shripalsoni04/nativescript-webview-interface
I have just begun application development with Kendo UI & Vue.js. I have developed Kendo UI applications earlier but without Vue.js. As I started putting the basic code in place to test how Vue.js would work for me, I saw that Kendo UI fails when the Vue object is initialized and takes over. Kendo.all.min.js throws an error - i is undefined and this renders all the UI useless. The UI then takes no clicks, no inputs. To demonstrate I have created a DOJO here - http://dojo.telerik.com/oDAsE. When the Vue code is commented, the dropdowns in the toolbars work. When you uncomment the Vue code, the toolbar stops responding and console shows the exception - i is undefined when you perform some actions on the toolbar (try clicking the dropdown). I could not post this on telerik forums as my subscription period has expired :(. Appreciate your help !!
It seems like in your case the Vue object initialization is updating the dom in a way that breaks the logic that is expected in Kendo Toolbar. In such scenarios I would recommend using the official Kendo-Vue.js integration that designed and tested against such possible gliches.
I'm using backbone for a mobile app dev project (phonegap compiled) but have a problem with the router history. I'm firing the events on tap for extra responsiveness on the mobile platform, however pages visited by triggering tap do not appear to be included in the router's history. When hitting the back button, those are always skipped.
Is there any way to make the backbone router's history work with the tap event?
Thanks for your help
You must call use the navigate method in order to add a page to Backbone history. You can do it programmatically as follows:
var MyApp = new Backbone.Router();
MyApp.navigate('newPage', {trigger: true});
Basically whenever you fire a tap event you can navigate to a particular based on the tap event parameters.
I have made an google chrome extension recently. It is working fine except that it works only when user clicks it. I want it to update status even if it is not clicked. So, there is any browser onload action so that I can start updating the status continuously using AJAX.
Thanks :)
Create a background page for your extension.
The background page is loaded as soon as the extension is enabled, so any code in your background page will get executed without needing the user to click anything.