1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-21 22:47:43 +00:00
Files
matomo/tests/client/README.md
dizzy b182f0e716 [Vue] remove angularjs libraries from matomo (#19502)
* revert back to suffixing an underscore

* avoid random failure

* built vue files

* add missing vue-entry property + add missing translations

* fixing UI tests locally

* update screenshots

* update CustomAlerts submodule

* add missing translations

* fix spacing

* couple fixes

* more ui test fixes

* make sure installation umd is loaded during installation (as well as translations)

* couple small UI test fixes

* Fix component name case.

* built vue files

* do not use html_attr to escape and in UI tests replace path with escaped slashes so json data gets replaced

* move UploadPluginDialog to CorePluginsAdmin so it will be available when internet access is not available and the Marketplace plugin is deactivated

* correct typing for feedback question input

* update screenshots

* revert last tweak

* styling tweak

* update screenshots and styling tweak

* fix attribute

* Allow composer plugins for dev dependency codesniffer to fix travis builds.

* keep dependent class and rename

* styling tweaks

* update expected screenshot

* update screenshots

* comma spacing tweak

* update screenshots + fix v-show condition

* some small fixes

* fix styling and formatting issues

* fix spacing issue

* fix property name

* update expected screenshots

* get to load in UI

* getting dashboard settings control to work

* styling tweaks

* fix html attribute output for singlemetricview

* fix vue-entry elements

* update expected screenshot

* fixing UI test issues, reintroduce compileAngularComponents (will remove calls in CoreHome PR)

* move function to correct class

* fix order of array elements

* fixing some more issues

* hide the dashboard manager on initial display as before

* styling fixes

* fix styles for widgetized glossary

* update expected screenshots

* fixing DashboardManager UI test that previously used the uiControlObject property

* update device detection demo to be accurate

* update expected screenshots

* fix race condition in dashboard ajax requests/aborts

* start removing angularjs from CoreHome

* remove more angularjs code

* remove angularjs from CustomDimensions plugin

* removing some angularjs files

* remove use of history service, the use of $location from MatomoUrl and the piwikApi service

* remove angularjs service module and filters

* removing more angularjs references

* remove more angular related code, including getAngularDependency()

* update submodules to vue-remove-angularjs branches

* try replacing angularjs expression parsing w/ mathjs/number

* logical operator fixes

* only import what is needed for math.js

* remove some functionality

* optimize math.js use

* convert zen mode code, add --bail option and some output to vue:build

* remove ng-app directive in twig layouts

* ajaxhelper.adapter.ts still required for vanilla ajaxHelper() object

* remove ng-cloak use

* fix datatableactions.vue errors

* do not propagate id param in vue-entry uses

* remove pointless defer

* get zen mode to work, fix couple issues in headermessage vue-entry usage

* move more data table action icon code to vue component from dataTable.js + fix use of angular in ui test JS override code

* couple more data table actions fixes

* UI test fixes + ng-non-bindable no longer needed

* fix more test issues + update some screenshots

* remove another use of isAngularRenderingThePage

* revert screenshot change

* fixing more issues

* move inline script to vue directive + fix a couple vue warnings

* built vue files

* remove inline script in system check widget

* fix some more datatableactions issues

* use VueEntryContainer in _singleWidget.twig

* remove unused inline script from _donate.twig

* update expected screenshots

* fix hide flat icon code

* updating screenshots and try to fix random failure

* fix numeric conversion

* update expected screenshots

* update screenshots

* use common method to load umd file

* get languages dropdown to work

* only add menu translations if installed

* make sure datatableactions vue entry is completely rendered before initing datatable

* correct enriched-headline selector

* update VisitorGenerator submodule

* do not load menu translations during updater as well

* update expected screenshots

* update screenshot

* remove anglarjs libraries

* get code to build w/o angularjs

* update submodule

* update expected screenshot

* remove angular from tsconfig.json

* update submodule

* update submodule

* remove duplicate translations

* remove angularjs from legalnotice

* merge related fixes

* remove angluar mappings

* remove packages/scripts for angularjs unit tests that ran in karma

* remove references to angular in core directory

* rename AngularJS tests suite to ClientTests

* remove angularjs specific escaping in polyfill file

* remove angularjs references in source code/comments + remove unneeded BC code

* remove more angularjs references/deprecated code

* remove more references to angularjs in test files/local docs

* remove templateFile from expected test files

* remove .only() and more <templateFile> occurrences in test files

* update submodule

* update submodule

* update submodule

* submodule update

* fix phpcs

* update changelog and travis scripts

* fix failing test

* fix latest available version styling

* built vue files

* built vue files

* fix test

* submodule

* update expected test files

Co-authored-by: sgiehl <stefan@matomo.org>
Co-authored-by: sgiehl <sgiehl@users.noreply.github.com>
2022-11-07 21:57:00 +01:00

871 B

Installation:

[sudo] npm install .

Requirements

  • node.js
  • npm

Used libraries

File structure

We do not have a general tests folder containing all test files. Instead we create a file having the same name appended by .spec.ts in the same directory.

For instance you want to test a file named startfrom.ts then we create a file named startfrom.spec.js: plugins/CoreHome/vue/src/startfrom.ts => plugins/CoreHome/vue/src/startfrom.spec.ts

Execution

Run npm test in the root Matomo directory. npm test will invoke Vue CLI, which in turn handles invoking the TypeScript compiler and Jest.

Testing existing jQuery code

Just in case you want to write a test for your jQuery code you can do this the same way. You might be interested in the Chai jQuery plugin.