diff --git a/docs/en/general/installation.md b/docs/en/general/installation.md new file mode 100644 index 0000000000000000000000000000000000000000..63d05ab42a1495dde7539b42d80fddcd41defa15 --- /dev/null +++ b/docs/en/general/installation.md @@ -0,0 +1,35 @@ +# Installation + +Cassiopée can be installed for use without an internet connection as an executable program or as a progressive web app (PWA). + +## Installation of the Cassiopée progressive web application + +A progressive web app (PWA) is a web application that consists of pages or websites, and can appear to the user in the same way as native applications or mobile applications. + +PWAs are available for all platforms (Windows, Linux, MacOS, Android, and iOS) provided you have a compatible browser: + +| Plateforme | Chrome/Chromium | Edge | Firefox | Safari | +|------------|-----------------|------|---------------|--------| +| Windows | Yes | Yes | via extension | | +| Linux | Yes | | via extension | | +| MacOS | Yes | | via extension | | +| Android | Yes | | Yes | | +| iOS | | | | Yes | + +The installation is done directly from the web browser at <https://cassiopee.g-eau.net> by clicking on a button located on the right of the address bar. The appearance of the button may vary depending on the browser used: + +* Install a PWA with Chrome/Chromium: <https://support.google.com/chrome/answer/9658361?hl=fr> +* Installing a PWA with Edge: <https://learn.microsoft.com/fr-fr/microsoft-edge/progressive-web-apps-chromium/ux> +* Install a PWA (any browser and platform): <https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Installing> + +After the installation, Cassiopée can be launched from the application icon on the desktop. + +Updates are automatically detected and installed (the user is invited to restart Cassiopée after downloading the update). + +N.B.: even without going through the PWA installation procedure, Cassiopée is available in the browser without an internet connection provided it has been previously loaded. + +## Installation of the Desktop application (obsolete) + +Cassiopée is available as an executable program for Windows, Linux and MacOS platforms. The installation programs can be downloaded at the following address: <https://cassiopee.g-eau.fr/cassiopee-releases/> + +The installation in the form of a progressive web application (see above) will definitely replace this installation mode in a future version of Cassiopée. diff --git a/docs/en/index.md b/docs/en/index.md index f8e9b1078f305f132a3376a1dcc2310d8ce205bc..1fb2aeaebb2da5d5823f02518674d807e8758603 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -13,9 +13,9 @@ Cassiopée is a software dedicated to rivers hydraulics with especially some hel ## Pre-requisites - installation -Cassiopée does not require any installation. It is available online using an up-to-date browser (tested with Firefox, Chrome and Chromium) by navigating to the following address: [https://cassiopee.g-eau.fr](https://cassiopee.g-eau.fr) +Cassiopée does not require any installation. It is available online using an up-to-date browser (tested with Firefox, Edge, Chrome and Chromium) by navigating to the following address: [https://cassiopee.g-eau.fr](https://cassiopee.g-eau.fr). -Offline versions are available (Windows, Linux, macOS, Android) at the following address : [https://cassiopee.g-eau.fr/cassiopee-releases/](https://cassiopee.g-eau.fr/cassiopee-releases/) +Offline versions are available for the Windows, Linux, macOS, Android platforms. For details, see the ["Installation" section](general/installation.md) in the documentation. ## Documentation diff --git a/docs/fr/general/installation.md b/docs/fr/general/installation.md new file mode 100644 index 0000000000000000000000000000000000000000..42d86052eb9f6e22b5fbb29baefe866ca9e3e423 --- /dev/null +++ b/docs/fr/general/installation.md @@ -0,0 +1,35 @@ +# Installation + +Cassiopée peut être installé pour une utilisation sans connexion internet sous la forme d'un programme exécutable ou d'une Web App progressive (PWA). + +## Installation de l'application web progressive Cassiopée + +Une progressive web app (PWA, application web progressive en français) est une application web qui consiste en des pages ou des sites web, et qui peuvent apparaître à l'utilisateur de la même manière que les applications natives ou les applications mobiles. + +Les PWA sont disponibles pour toutes les platesformes (Windows, Linux, MacOS, Android, et iOS) à condition d'avoir un browser compatible : + +| Plateforme | Chrome/Chromium | Edge | Firefox | Safari | +|------------|-----------------|------|---------------|--------| +| Windows | Oui | Oui | via extension | | +| Linux | Oui | | via extension | | +| MacOS | Oui | | via extension | | +| Android | Oui | | Oui | | +| iOS | | | | Oui | + +L'installation se fait directement à partir du navigateur internet à l'adresse <https://cassiopee.g-eau.net> en cliquant sur un bouton situé à droite de la barre d'adresse. L'aspect du bouton peut varier en fonction du navigateur utilisé : + +* Installer une PWA avec Chrome/Chromium : <https://support.google.com/chrome/answer/9658361?hl=fr> +* Installer une PWA avec Edge : <https://learn.microsoft.com/fr-fr/microsoft-edge/progressive-web-apps-chromium/ux> +* Installer une PWA (tout browser et plateforme - en anglais) : <https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Installing> + +Après l'installation, Cassiopée peut être lancé à partir de l'icône de l'application présente sur le bureau. + +Les mises à jour sont automatiquement détectées et installées (l'utilisateur est invité à redémarrer Cassiopée après le téléchargement de la mise à jour). + +N.B.: même sans passer par la procédure d'installation de la PWA, Cassiopée est disponible dans le navigateur sans connection internet à condition d'avoir été chargé précédemment. + +## Installation de l'application Desktop (obsolète) + +Cassiopée est disponible sous la forme d'un programme exécutable pour les plateformes Windows, Linux et MacOS. Les programmes d'installation sont téléchargeables à l'adresse suivante : <https://cassiopee.g-eau.fr/cassiopee-releases/> + +L'installation sous la forme d'une application web progressive (cf. ci-dessus) remplacera définitivement ce mode d'installation dans une prochaine version de Cassiopée. diff --git a/docs/fr/index.md b/docs/fr/index.md index c7d0948ebbb57c8fb24026ce01d294c6acdd34c7..a2718ab7dcdca8009b575cf9579baf3ff2af116b 100644 --- a/docs/fr/index.md +++ b/docs/fr/index.md @@ -13,9 +13,9 @@ Cassiopée est un logiciel consacré à l'hydraulique des rivières avec notamme ## Pré-requis - installation -Cassiopée ne nécessite aucune installation. Il est disponible en ligne à partir d'un navigateur récent (testé sous Firefox, Chrome et Chromium) en se rendant à l'adresse suivante : [https://cassiopee.g-eau.fr](https://cassiopee.g-eau.fr) +Cassiopée ne nécessite aucune installation. Il est disponible en ligne à partir d'un navigateur récent (testé sous Firefox, Edge, Chrome et Chromium) en se rendant à l'adresse suivante : [https://cassiopee.g-eau.fr](https://cassiopee.g-eau.fr). -Des versions hors-ligne sont disponibles (Windows, Linux, macOS, Android) à l'adresse suivante : [https://cassiopee.g-eau.fr/cassiopee-releases/](https://cassiopee.g-eau.fr/cassiopee-releases/) +Des versions hors-ligne sont installables sur les plateformes Windows, Linux, macOS, Android. Voir le détail dans la [section installation](general/installation.md) de la documentation. ## Documentation diff --git a/e2e/calculator.po.ts b/e2e/calculator.po.ts index 7399ae786944a6ba9fc43d4a7627b46c8e96b492..64c8ae5bcb93b331b0ebb41ac8377bfc3374fa63 100644 --- a/e2e/calculator.po.ts +++ b/e2e/calculator.po.ts @@ -268,7 +268,9 @@ export class CalculatorPage { || (await this.presentAndVisible("pb-results pb-results-table")) || - (await this.presentAndVisible("macrorugo-compound-results macrorugo-compound-results-table")) + await this.presentAndVisible("pb-results pb-cloison-results") + || + await this.presentAndVisible("macrorugo-compound-results macrorugo-compound-results-table") || (await this.presentAndVisible("jet-results .fixed-results-container"))); } diff --git a/e2e/prebarrages-results.e2e-spec.ts b/e2e/prebarrages-results.e2e-spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..e7af14868cf0e8d472746f0aa13c5296acba4c33 --- /dev/null +++ b/e2e/prebarrages-results.e2e-spec.ts @@ -0,0 +1,56 @@ +import { ListPage } from "./list.po"; +import { CalculatorPage } from "./calculator.po"; +import { Navbar } from "./navbar.po"; +import { browser, by, element } from "protractor"; +import { AppPage } from "./app.po"; +import { SideNav } from "./sidenav.po"; +import { PreferencesPage } from "./preferences.po"; +import { changeSelectValue, scrollPageToTop } from "./util.po"; + +/** + * Clone calculators + */ +describe("Prébarrages results - ", () => { + let listPage: ListPage; + let calcPage: CalculatorPage; + let navBar: Navbar; + let prefPage: PreferencesPage; + + beforeAll(() => { + listPage = new ListPage(); + calcPage = new CalculatorPage(); + navBar = new Navbar(); + prefPage = new PreferencesPage(); + jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 1000; + }); + + beforeEach(async () => { + // disable evil option "empty fields on module creation" + await prefPage.navigateTo(); + await prefPage.disableEvilEmptyFields(); + await browser.sleep(200); + }); + + it("every module shoud have results", async () => { + // create prébarrage calculator + await navBar.clickNewCalculatorButton(); + await listPage.clickMenuEntryForCalcType(30); + + // run calculation + const calcButton = calcPage.getCalculateButton(); + await calcButton.click(); + await browser.sleep(200); + + const nodes = element.all(by.css("g.nodes > g")); + const nb = await nodes.count(); + for (let n = 0; n < nb; n++) { + const node = nodes.get(n); + await node.click(); + await browser.sleep(200); + + // check that result is not empty + const hasResults = await calcPage.hasResults(); + expect(hasResults).toBe(true); + } + }); +}); diff --git a/mkdocs/mkdocs-en.yml b/mkdocs/mkdocs-en.yml index 88ae9eff984662b7f1cedecf71cad1e70443762e..1e1f282b84be7ebae2a9772a74691766c93b4fa9 100644 --- a/mkdocs/mkdocs-en.yml +++ b/mkdocs/mkdocs-en.yml @@ -25,6 +25,7 @@ markdown_extensions: nav: - Presentation of Cassiopée: - index.md + - general/installation.md - general/principe_fonctionnement.md - general/parametres_application.md - general/raccourcis_clavier.md diff --git a/mkdocs/mkdocs-fr.yml b/mkdocs/mkdocs-fr.yml index 4c31e2e742799cbf31aa814d73a968674e47d998..8f3d38653b3f881a1c21fccde8f9de10aecbb731 100644 --- a/mkdocs/mkdocs-fr.yml +++ b/mkdocs/mkdocs-fr.yml @@ -25,6 +25,7 @@ markdown_extensions: nav: - Présentation de Cassiopée: - index.md + - general/installation.md - general/principe_fonctionnement.md - general/parametres_application.md - general/raccourcis_clavier.md diff --git a/src/app/formulaire/definition/form-definition.ts b/src/app/formulaire/definition/form-definition.ts index d7022502972c2cc748f6477791ce8e32ce60f977..23f9d2d9842af25f6fc5c132f443bd628b40c044 100644 --- a/src/app/formulaire/definition/form-definition.ts +++ b/src/app/formulaire/definition/form-definition.ts @@ -344,7 +344,7 @@ export abstract class FormulaireDefinition extends FormulaireNode implements Obs } } - this.completeParse(); + this.completeParse(false); } public hasParameter(symbol: string): boolean {