summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README190
1 files changed, 127 insertions, 63 deletions
diff --git a/README b/README
index b48a53565..54626f0de 100644
--- a/README
+++ b/README
@@ -1,26 +1,33 @@
-# GNU Taler Wallet
+# GNU Taler Wallet & Anastasis Web UI
This repository contains the implementation of a wallet for GNU Taler written
-in TypeScript.
-
+in TypeScript and Anastasis Web UI
## Dependencies
The following dependencies are required to build the wallet:
-* python>=3.8
-* nodejs>=12
-* jq
-* npm
-* pnpm
-* zip
+- python>=3.8
+- nodejs>=12
+- jq
+- npm
+- pnpm
+- zip
+
+## Prepraring the repository
+After running clone you should boostrap the repository.
+
+```shell
+./boostrap
+```
## Installation
The CLI version of the wallet supports the normal GNU installation process.
```shell
+./bootstrap
./configure [ --prefix=$PREFIX ] && make install
```
@@ -29,6 +36,26 @@ The CLI version of the wallet supports the normal GNU installation process.
If you are compiling the code from git, you have to run `./bootstrap` before
running `./configure`.
+## Pushing a new prebuilt version
+
+After compiling run
+
+```shell
+make prebuilt
+```
+
+This will create a directory `prebuilt` with a git subtree,
+compile every prebuilt project, copy everything into this subtree
+and create a commit with the default message mentioning from
+which revision the prebuilt was created.
+When the script completes the prebuilt version can should
+be manually pushed.
+
+```shell
+cd prebuilt
+git push
+```
+
### Building the WebExtension
The WebExtension can be built via the 'webextension' make target:
@@ -43,91 +70,128 @@ This will create the zip file with the WebExtension in the directory
packages/taler-wallet-webextension/extension/
```
-We also provide a `Dockerfile` for a container that can build the
-WebExtension. After you install docker, make sure the user is in group
-`docker` and (re-)start the docker daemon:
+### Installing local WebExtension
-```shell
-# Make sure there is a docker group.
-$ grep docker: /etc/group
-$ sudo groupadd docker
+Firefox:
+ - Settings
+ - Add-ons
+ - Manage your extension -> Debug Add-ons
+ - Load temporary Add-on...
+ - Look for the zip file under './packages/taler-wallet-webextension/extension/' folder
-# Make sure USER is defined and is in the docker group.
-$ echo $USER
-$ sudo usermod -aG docker $USER
+Chrome:
+ - Settings
+ - More tools
+ - Extensions
+ - Load unpacked
+ - Look for the folder under './packages/taler-wallet-webextension/extension/'
-# Restart the docker daemon.
-# (This command is OS-specific.)
+You may need to use manifest v2 or v3 depending on the browser version:
+https://blog.mozilla.org/addons/2022/05/18/manifest-v3-in-firefox-recap-next-steps/
+https://developer.chrome.com/docs/extensions/mv3/mv2-sunset/
-# Obtain a new shell. Make sure it includes the `docker` group.
-$ newgrp docker
-$ id
-```
+### Reviewing WebExtension UI examples
-Then, you can proceed with these instructions:
+The WebExtension can be tested using example stories.
+To run a live server use the 'dev-view' target
```shell
-# Download wallet source code and unpack it
-(host)$ tar -xf wallet-core-$version.tar.gz
+make webextension-dev-view
+```
-# Build the image
-(host)$ docker build --tag walletbuilder wallet-core-$version/contrib/wallet-docker
+Stories are defined with a \*.stories.tsx file [1], you are free to create new or edit
+some and commit them in order to create a more complete set of examples.
-# Start the container
-(host)$ docker run -dti --name walletcontainer walletbuilder /bin/bash
+[1] look for them at packages/taler-wallet-webextension/src/\*_/_.stories.tsx
-# Copy wallet source to container
-(host)$ docker cp ./wallet-core-$version/ walletcontainer:/
+### WebExtension UI Components
-# Attach to container
-(host)$ docker attach walletcontainer
+Every group of component have a directory and a README.
+Testing component is based in two main category:
-# Run build inside container
-(container)$ cd wallet-core-$version
-(container)$ ./configure && make webextension
-(container)$ exit
+- UI testing
+- State transition testing
-# Copy build artefact(s) to host
-(host)$ docker cp walletcontainer:/wallet-core-$version/packages/taler-wallet-webextension/extension extension
-```
+For UI testing, every story example will be taken as a unit test.
+For State testing, every stateful component should have an `useStateComponent` function that will be tested in a \*.test.ts file.
-### Reviewing WebExtension UI examples
+### Testing WebExtension
-The WebExtension can be tested using Storybook. Using live server or building
-static html files to deploy into nginx.
+After building the WebExtension look for the folder `extension`
+Inside you will find v2 and v3 version referring to the manifest version being used.
-To run a live server use the 'dev-view' target
+Firefox users:
-```shell
-make webextension-dev-view
-```
-
-A server will start, usually at http://localhost:6006/.
-On the left it will have a navigation panel with examples organized in a tree view.
+- Go to about:addons
+- Then `debug addon` (or about:debugging#/runtime/this-firefox)
+- Then `Load temporary addon...`
+- Select the `taler-wallet-webextension-*.zip`
-Stories are defined with a *.stories.tsx file [1], you are free to create new or edit
-some and commit them in order to create a more complete set of examples.
+Chrome users:
-[1] look for them at packages/taler-wallet-webextension/src/**/*.stories.tsx
+- Settings -> More tools -> Extensions (or go to chrome://extensions/)
+- `Load unpacked` button in the upper left
+- Selected the `unpacked` folder in v2 or v3
# Integration Tests
-This repository comes with integration tests for GNU Taler. To run them,
-install the wallet first. Then use the test runner from the
+This repository comes with integration tests for GNU Taler. To run them,
+install the wallet first. Then use the test runner from the
taler-integrationtests package:
```shell
-cd packages/taler-integrationtests/
-./testrunner '*'
+# List available tests
+taler-wallet-cli testing list-integrationtests
+
+# Run all tests
+taler-wallet-cli testing run-integrationtests
+
+# Run all tests matching pattern
+taler-wallet-cli testing run-integrationtests $GLOB
+
+$ Run all tests from a suite
+taler-wallet-cli testing run-integrationtests --suites=wallet
```
-The test runner accepts a bash glob pattern as parameter. Individual tests can
+The test runner accepts a bash glob pattern as parameter. Individual tests can
be run by specifying their name.
To check coverage, use nyc from the root of the repository and make sure that the taler-wallet-cli
from the source tree is executed, and not the globally installed one:
```
-PATH="$PWD/packages/taler-wallet-cli/bin:$PATH" \
- nyc ./packages/taler-integrationtests/testrunner '*'
+nyc ./packages/taler-wallet-cli/bin/taler-wallet-cli '*'
```
+
+## Minimum required browser for WebEx
+
+Can be found in:
+ - packages/taler-wallet-webextension/manifest-v2.json
+ - packages/taler-wallet-webextension/manifest-v3.json
+
+## Anastasis Web UI
+
+## Building for deploy
+
+To build the Anastasis SPA run:
+
+```shell
+make anastasis-webui
+```
+
+It will run the test suite and put everything into the dist folder under the project root (packages/anastasis-webui).
+You can copy the SPA directly to work local webserver.
+
+```shell
+cp -Tr ./packages/anastasis-webui/dist/prod /var/www/html/anastasis
+```
+
+Additionally you can create a zip file with the content to upload into a web server:
+
+```shell
+make anastasis-webui-dist
+```
+
+It creates the zip file named `anastasis-webui.zip`
+
+