Test GrapesJs Editor With Cypress - cypress

We are using grapesjs to create an application editor. We want to validate that all the components we create can be used in Grapesjs. To do it, we want to write e2e tests using UI to simulate a final user. I'm using Cypress for automation but didn't have any luck dropping block inside the grapes iframe. Any help regarding this would be highly appreciated.

Me and my coworker tryied for 2 weeks, both Cypress and the rest of the tools on the market couldn't drag and drop a block of GrapesJs inside it's iframe :/
You can follow the issue from GrapesJs: https://github.com/artf/grapesjs/issues/3721
And a discussion i opened in Cypress's repo:
https://github.com/cypress-io/cypress/discussions/17979
Last month, i find this option, but i didn't try to set it as false on grapesjs.init, can you test it?
https://github.com/artf/grapesjs/blob/dev/src/editor/config/config.js#L111

Related

Secret masking with Cypress recordings

I couldn't find a similar question here. We have been piloting Cypress for our E2E tests. One thing that is not overtly obvious but feels problematic is the fact that in the videos that are being recorded by Cypress, any secret texts (passwords) that are being typed in are being logged in the video recording. Have folks run into this issue before? Is there a way to fix this?
If your webpage itself is not showing cleartext. There is a way to hide from cypress commands.
Add
cy.get('yourelement').type('password',{log:false});
Then you can see the command is hidden.
see cypress doc.

Cypress does not support multi window and multiple tabs so how we can handle both

I am trying to automate a website using cypress and I came across a problem where in I have to handle below tag. On click, new window gets opened which gets displayed out of the test runner.
a href="javascript:ContextTradeMenuPopup('View/Edit Trade')">View/Edit
Trade /a
I understand Cypress does not support multi window but as a workaround I can get the href tag and copy the URL and can open the URL in same runner, but in the above example there is no URL.
Can anyone help with different ways available in Cypress to handle multi window/ multiple tab behavior.
Thanks!
The work around you mentioned is currently the only work around that is available. So you should retrieve the URL of the new window/tab and visit that directly. If you can't do that you sadly can't automate it.

Jasmine SpecRunner style page for Karma

I am trying to show Jasmine SpecRunner style page using karma-jasmine, karma and gulp plugins but not able to see all the specs listing all of the test that passed on failed. I used karma-jasmine-reporter node module to get a report of the tests that ran but how can I rerun an individual test. I am looking to generate a page like this where I can see the result and rerun individual tests.
I've found that https://www.npmjs.com/package/karma-jasmine-html-reporter the karma-jasmine-html-reporter is the best UI reporter that gets close to the default jasmine html file look.
Your question is old, but it's what I was trying to find myself.
If you found a better solution since posting I'd like to know. One thing that this HTML reporter doesn't do is refresh if you updated the tests.
So if you run 'karma start' then it will run the tests, open your browser then you have to click on the debug button to show the UI reporting of your tests.
Then if you update the tests, the cmd window will refresh to reflect your new tests but the browser window will not. You must refresh it manually. Would be awesome to not have to do that.

Deploying CRM solution

Using the crm 2011 sdk samples I've written a C# routine in Visual Studio to deactivate all active records in a custom entity. Now I'd like to wire this routine to a custom button on ribbon (figured that one out using RibbonDiffXml) However I'm unsure how to go about deploying. Am I creating a dll to register with the plugin registration tool? Any guidance would be appreciated!
As I see it, you have two options:
Rewrite your code to use the Organization Service from JavaScript. You can put the code completely inside the button this way. However, this requires manually constructing the SOAP calls to the API. The SDK has a walkthrough for this.
Include your code in a plugin, create a custom entity that you can register this plugin against, and create an instance of that entity from the JavaScript that will fire when clicking your ribbon button. This is detailed in an answer to a similar question.
Here are even more alternative solutions:
Create a workflow plugin and trigger that workflow (that runs async in the background). Triggered manually, on an event or from a javascript.
Create a javascript but use the REST API or even better, use the CrmRestKit to deal with the REST-part and keep your scripts clean and easy to read and maintain.
Create an ASP.NET page (or silverlight control) that displays a dialog that shows a progress bar while the process is running.

Selenium IDE and telling it to record actions

I am trying to make a little application to allow to record actions within a Flash and Silverlight application. In such manner that you can compile your interactive application in test-mode and then be able to click on elements which then passed the action to Selenium IDE which then adds this command to the testcase.
I am curious if this even possible and how I can achieve this in Firefox?
There is a new plugin for Se-IDE called 'Flex Pilot X' which works with External Actions exposed through Flex Pilot. Adam Christian (who wrote it) demonstrated it at the SFSE meetup last month; which was recorded and viewable at http://saucelabs.com/blog/index.php/2010/04/highlights-from-our-april-20th-selenium-testing-tools-demo-night/
-adam

Resources