Is there a way to generate static id`s in Vue.Js? - vue.js

I`m trying to create Automated Testing for an App that is developed in Vue.Js.
Is there a way for Vue.js to generate a static identifier (id, name, etc..) ?

You could set cssLoaders in webpack config to 'extract' css in dev/test/production build and that way it will not hashing your classes

Your tests should be run before building process. More here
Or you are going to use selenium/something like that?

Related

React-i18next in micro-frontend

I've built a react app with react-i18next for localization. But when I use it as a micro-frontend in another app, it's not translating the text and returning json keys. Do I need to use i18next localization for parent/host app also or is there any other way to solve this?
Probably your file with the translation keys is in the orchestrated one.
You probably need to do domething like this: https://github.com/i18next/react-i18next/blob/master/example/react-component-lib/src/i18n.js
use the provider: https://react.i18next.com/latest/i18nextprovider#when-to-use

dynamic meta tags with react-helmet and gatsby not working

So I am using react-helmet to create an SEO object in gatsby, the updated meta tags can be seen in the developer tools however when using a web crawler there are none of the dynamic meta tags, does anyone know how to fix this?
Just use gatsby-plugin-react-helmet along with react-helmet.
In your gatsby-config.js
plugins: [`gatsby-plugin-react-helmet`]
This is because you need to serve static properties instead of dynamic ones, so you need to add the drop-in support for the SSR (Server-Side Rendering).

Add multiple files using IDE or task runner

Working with component in angular is great, but each time we have to create a component we have to add multiple files:
js/ts
less/sass/scss...
html
...
I wonder if it's possible to define somewhere (IDE or gulp, webpack ...) the set of files to create according to a unique user input?
ex: I would like to create a user component.
I will have to enter only one time user and it will create: user.js, user.css, user.html...
Not currently possible using WebStorm; please vote for IDEA-141225 to be notified on any progress with this feature.
I'd suggest using existing node modules for generating components; for example, you can use angular-1.5-cli package to create AngularJS components. Cli can be integrated with WebStorm as an external tool

i18n testing using selenium

Have any one used selenium for testing i18n !
Does Selenium provide any kind of I18N/L10N support? Is it possible
to verify text based on message keys from a resource file? What
about checking numbers and dates that might have a different format
because of L10N?
I am also interested in the correct approach for this issue. Where I work, we usually use the ids to verify certain page or field. But, sometimes you might need to verify some text, which could be using i18n.
Try the following:
If you have a selenium-testing module, have the module where the bundle is placed as a dependency. And then define a ReloadableResourceBundleMessageSource in the xml. And than setup the test following this code: https://stackoverflow.com/a/6251478/521754
Hope that helps!
Cheers!

Can I use/adapt the Kohana userguide module to create help pages for my application?

I'd like to create a userguide for the application I'm building using the Kohana framework, and I'm wondering if there's a way I can use the Kohana userguide module for this purpose.
I understand how to add userguide info for new modules that I create, and how to include my classes in the API, but I want to build a second, separate userguide for the actual application user, as opposed to the app developers.
At first, I thought I'd just try adding app help pages to the main userguide at APPPATH/guide. I tried adding a "application/guide" directory, and put a file in there called menu.md, but that just ended up replacing the Kohana menu in the userguide. After renaming the file to menu.myapp.md, it doesn't show up at all.
So then it occurs to me that I could simple edit modules/userguide/guide/menu.md to add sections for my app, and likewise add markdown files for each app component. But really it would be much better to have a completely separate userguide for app users since the Kohana documentation isn't relevant for them.
What's the best way to go about this? Should I create a duplicate of the entire userguide module and modify the routing, &c.? Or is there some way to set up both userguides using the one version of the module? Or am I barking up the wrong tree altogether? Is there some other module/approach that would be better for building "Help" pages for the app?
Thanks in advance for your help!
Yes, you can make docs for your application with the userguide. If you want examples, check out these links:
https://github.com/zombor/Auto-Modeler/blob/master/config/userguide.php
https://github.com/zombor/Auto-Modeler/tree/master/guide/auto-modeler
Note that you'll still get "api docs" and everything else, unless you change the config to hide them.