Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cassiopee/nghyd
1 result
Show changes
......@@ -5,7 +5,7 @@ import { NotificationsService } from "./notifications.service";
import { UserConfirmationService } from "./user-confirmation.service";
import { interval } from "rxjs";
@Injectable()
@Injectable({providedIn: 'root'})
export class ServiceWorkerUpdateService {
constructor(
private swUpdate: SwUpdate,
......@@ -28,11 +28,12 @@ export class ServiceWorkerUpdateService {
}
this.swUpdate.versionUpdates.subscribe(evt => {
console.log("ServiceWorkerUpdateService event:", evt.type);
switch (evt.type) {
case 'VERSION_DETECTED':
let ver = (evt as any).version?.appData?.version ?? "<NA>";
console.log("ServiceWorkerUpdateService: VERSION_DETECTED", ver);
notificationService.notify(i18nService.localizeText("INFO_SERVICE_WORKER_VERSION_DETECTED", { "ver": ver }), 10000);
this.notificationService.notify(this.i18nService.localizeText("INFO_SERVICE_WORKER_VERSION_DETECTED", { "ver": ver }), 10000);
break;
case 'VERSION_READY':
......@@ -40,15 +41,15 @@ export class ServiceWorkerUpdateService {
const newVer = (evt as any).latestVersion?.appData?.version ?? "<NA>";
console.log("ServiceWorkerUpdateService: VERSION_READY", currVer, "->", newVer);
notificationService.notify(i18nService.localizeText("INFO_SERVICE_WORKER_VERSION_READY", { "ver": newVer }), 10000);
this.notificationService.notify(this.i18nService.localizeText("INFO_SERVICE_WORKER_VERSION_READY", { "ver": newVer }), 10000);
// PLANTE si on stocke le message dans une variable !!!!
// const msg = i18nService.localizeText("INFO_SERVICE_WORKER_VERSION_READY", { "ver": newVer });
// notificationService.notify(msg, 10000);
// -> ReferenceError: can't access lexical declaration 'xxx' before initialization
// avec xxx qui varie d'une fois à l'autre !!!
userConfirmationService.askUserConfirmation("Confirmation",
i18nService.localizeText("INFO_SERVICE_WORKER_VERSION_READY", { "ver": newVer })).then(data => {
this.userConfirmationService.askUserConfirmation("Confirmation",
this.i18nService.localizeText("INFO_SERVICE_WORKER_VERSION_READY", { "ver": newVer })).then(data => {
if (data["confirm"]) {
console.log("ServiceWorkerUpdateService: application update confirmed");
window.location.reload();
......@@ -60,15 +61,14 @@ export class ServiceWorkerUpdateService {
break;
case 'VERSION_INSTALLATION_FAILED':
ver = (evt as any).version?.appData?.version ?? "NA";
console.log("ServiceWorkerUpdateService: VERSION_INSTALLATION_FAILED", ver);
notificationService.notify(i18nService.localizeText("ERROR_SERVICE_WORKER_INSTALL_FAILED", { "ver": ver }), 10000);
console.log(`Failed to install app version '${evt.version.hash}': ${evt.error}`);
this.notificationService.notify(this.i18nService.localizeText("ERROR_SERVICE_WORKER_INSTALL_FAILED"), 10000);
break;
}
});
swUpdate.unrecoverable.subscribe(event => {
console.log("SwUpdate.unrecoverable reason", event.reason, "type", event.type);
notificationService.notify("SwUpdate: unrecoverable state. Reason=" + event.reason + ", type=" + event.type, 10000);
this.notificationService.notify("SwUpdate: unrecoverable state. Reason=" + event.reason + ", type=" + event.type, 10000);
});
}
}
src/assets/images/logo_geau_m.png

33.3 KiB | W: 0px | H: 0px

src/assets/images/logo_geau_m.png

5.3 KiB | W: 0px | H: 0px

src/assets/images/logo_geau_m.png
src/assets/images/logo_geau_m.png
src/assets/images/logo_geau_m.png
src/assets/images/logo_geau_m.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/images/logo_pole_m.png

31.8 KiB | W: 0px | H: 0px

src/assets/images/logo_pole_m.png

6.88 KiB | W: 0px | H: 0px

src/assets/images/logo_pole_m.png
src/assets/images/logo_pole_m.png
src/assets/images/logo_pole_m.png
src/assets/images/logo_pole_m.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -4,7 +4,7 @@
"WARNING_DEVER_ZR_SUP_Z1": "Elevation of the river bed can't be higher than water elevation: Impossible to calculate the kinetic energy",
"WARNING_DOWNSTREAM_ELEVATION_POSSIBLE_SUBMERSION": "Downstream elevation is higher than weir elevation (%submergencePerc%% submergence)",
"WARNING_ORIFICE_FREE_DOWNSTREAM_ELEVATION_POSSIBLE_SUBMERSION": "Downstream elevation is higher than orifice center elevation (%submergencePerc%% submergence)",
"WARNING_NOTCH_SUBMERGENCE_GREATER_THAN_07": "Notch submergence (%submergencePerc%%) is higher than recommended boundary (70%)",
"WARNING_NOTCH_SUBMERGENCE_GREATER_THAN_09": "Notch submergence (%submergencePerc%%) is higher than recommended boundary (90%)",
"WARNING_SLOT_SUBMERGENCE_NOT_BETWEEN_07_AND_09": "Slot submergence (%submergencePerc%%) is not in the recommended boundaries (70 to 90%)",
"ERROR_STRUCTURE_SUBMERGENCE_LOWER_THAN": "Slot submergence (%submergencePerc%%) is lower than %min%%",
"WARNING_WEIR_SUBMERGENCE_LOWER_THAN_08": "Weir submergence factor (%submergencePerc%%) is lower than the recommended boundary (80%)",
......@@ -58,7 +58,6 @@
"ERROR_PARAMDOMAIN_INTERVAL_BOUNDS": "invalid %minValue%/%maxValue% min/max boundaries for 'interval' parameter definition domain",
"ERROR_PARAMDOMAIN_INVALID": "parameter '%symbol%: non supported '%domain%' definition domain",
"WARNING_PREBARRAGE_NON_CONVERGENCE": "Pre-dam: calculation converged with a water elevation precision of %precision%&nbsp;m",
"ERROR_PREBARRAGE_STRUCTURE_ZDV_INF_ZF": "Apron elevation of device #%ns% is lower than bottom elevation of upstream basin of wall %cub%-%cdb%",
"ERROR_PREBARRAGE_Z2_SUP_Z1": "Downstream water elevation is greater than upstream water elevation",
"ERROR_PROBLEM_LOADING_SESSION": "Session loaded, with errors",
"ERROR_REMOUS_NO_WATER_LINE": "No water line can be calculated",
......@@ -83,6 +82,10 @@
"ERROR_STRUCTURE_Q_TROP_ELEVE": "The flow passing through the other devices is too high: the requested parameter is not calculable.",
"ERROR_STRUCTURE_ZDV_PAS_CALCULABLE": "Parameter \"Crest elevation\" cannot be calculated with this discharge law",
"ERROR_STRUCTURE_Z_EGAUX_Q_NON_NUL": "Upstream and downstream elevations are equal but flow is not null",
"ERROR_ELEVATION_Z1_LOWER_THAN_ZF1": "Upstream elevation is lower than the upstream bottom elevation of the ramp",
"ERROR_ELEVATION_Z1_EQUAL_TO_ZF1": "Upstream elevation is equal to the upstream bottom elevation of the ramp",
"ERROR_COEF_DEBIT_NULL": "Calculation is impossible when discharge coefficient is null",
"ERROR_D65_NULL": "Calculation is impossible when d65 is null",
"INFO_CALCULATOR_CALC_NAME": "Calculator name",
"INFO_CALCULATOR_CALCULER": "Compute",
"INFO_CALCULATOR_CLONE": "Duplicate",
......@@ -429,6 +432,7 @@
"INFO_MACRORUGO_DESCRIPTION": "natural block",
"INFO_MACRORUGO_TITRE_COURT": "Rock-ramp",
"INFO_MACRORUGO_TITRE": "Rock-ramp fishpasses",
"INFO_MACRORUGO_GENERATE_BACKWATER_CURVE":"Generate backwater curve",
"INFO_MENU_DIAGRAM_TITLE": "Modules diagram",
"INFO_MACRORUGOCOMPOUND_TITRE": "Compound rock-ramp fishpasses",
"INFO_MACRORUGOCOMPOUND_DESCRIPTION": "natural multiple inclined block aprons",
......@@ -504,10 +508,16 @@
"INFO_PABPUISSANCE_DESCRIPTION": "basins",
"INFO_PABPUISSANCE_TITRE_COURT": "FL: diss. power",
"INFO_PABPUISSANCE_TITRE": "Fish ladder: dissipated power",
"INFO_MACRORUGOREMOUS_TITRE_COURT": "Rock R. Backw. curve",
"INFO_MACRORUGOREMOUS_TITRE": "Rock-ramp backwater curve",
"INFO_MACRORUGOREMOUS_DESCRIPTION": "Backwater curve in rock-ramp fishpass",
"INFO_MACRORUGOREMOUS_CREATE_PAM_FIRST": "Create first a rock-ramp fishpass",
"INFO_PARALLELSTRUCTURE_DESCRIPTION": "orifice gate weir threshold free flow submerged discharge stage-discharge",
"INFO_PARALLELSTRUCTURE_TITRE_COURT": "// structures",
"INFO_PARALLELSTRUCTURE_TITRE": "Parallel structures",
"INFO_PAR_TITRE": "Baffle fishway: setup",
"INFO_RUGOFOND_TITRE": "Bed roughness fishpasses",
"INFO_RUGOFOND_TITRE_COURT": "Bed roughness",
"INFO_PAR_DESCRIPTION": "planes Denil Fatou superactive mixte chevrons canoe",
"INFO_PAR_TITRE_COURT": "HF: setup",
"INFO_PARSIMULATION_TITRE": "Baffle fishway: simulation",
......@@ -643,8 +653,8 @@
"INFO_THEME_PASSE_A_RALENTISSEURS_DESCRIPTION": "Baffle fishway",
"INFO_THEME_PASSE_NATURELLE_DESCRIPTION": "Tools for sizing a evenly distributed macro-roughnesses pass in rockfill or prefabricated",
"INFO_THEME_PASSE_NATURELLE_TITRE": "Evenly distributed macro-roughness fish pass",
"INFO_THEME_VERIFICATION_DESCRIPTION": "Tools for verifying fish passes crossing capabilities by different fish species",
"INFO_THEME_VERIFICATION_TITRE": "Fish passes verification",
"INFO_THEME_VERIFICATION_DESCRIPTION": "The purpose of this tool is to carry out a simple check of the compatibility between certain fish pass sizing criteria and the passage capacities of the target fish species. It may prove useful during the design phase of a facility to ensure that the proposed design is consistent with its hydrological operating range",
"INFO_THEME_VERIFICATION_TITRE": "Crossability verification",
"INFO_TITREJOURNAL": "Calculation log",
"INFO_TITREJOURNAL_GLOBAL": "Calculation log synthesis",
"INFO_WELCOME_CONTENT": "<p>The Cassiopée software was developed by the ecohydraulic R&D pole gathering <a href=\"https://ofb.gouv.fr\" target=\"_blank\">OFB</a> (French Office for Biodiversity) and <a href=\"https://www.imft.fr\" target=\"_blank\">IMFT</a> (Fluids Mechanics Institute of Toulouse) and by <a href=\"http://g-eau.fr/index.php/en/\" target=\"_blank\">UMR G-EAU</a> (Joint Research Unit \"Water Management, Actors, Territories\").</p><p>It includes tools for designing fish crossing devices for upstream and downstream migrations, and hydraulic calculation tools useful for environmental and agricultural engineering.</p><p>For more information, consult <a href=\"assets/docs/en/mentions_legales.html\" target=\"_blank\">legal notice</a> and <a href=\"assets/docs/en/index.html\" target=\"_blank\">documentation</a>.</p>",
......@@ -655,6 +665,7 @@
"INFO_EXAMPLE_LABEL_PENTE_CRITIQUE_CANAL": "Canal critical slope",
"INFO_EXAMPLE_LABEL_PB": "Pre-dam",
"INFO_EXAMPLE_LABEL_PERR": "Rock-ramp fish pass",
"INFO_EXAMPLE_LABEL_RANGEES_PERIOD": "Rip-rap pass in periodic rows",
"INFO_EXAMPLE_LABEL_WEIR_JET_LENGTH": "Weir jet length",
"INFO_EXAMPLES_TITLE": "Examples",
"INFO_EXAMPLES_SUBTITLE": "Load standard examples",
......@@ -665,6 +676,7 @@
"INFO_TRIGO_DESCRIPTION": "cosinus sinus tangent arc maths mathematics",
"INFO_TRIGO_TITRE_COURT": "Trigo. f.",
"INFO_VERIF_CREATE_PASS_FRIST": "Create first a fish ladder, a baffle fishway or a rock-ramp fishpass",
"INFO_VERIF_SELECT_SPECIES_FIRST": "Select first one or several fish species",
"INFO_VERIF_OK": "Crossing criteria are met for all species",
"INFO_VERIF_VARYING_OK": "Crossing criteria are met for all species and all pass modalities",
"WARNING_VERIF_OK_BUT": "Crossing criteria are met for all species, but there are warnings",
......@@ -679,7 +691,7 @@
"INFO_ESPECE_TITRE_COURT": "Species",
"INFO_SERVICE_WORKER_VERSION_DETECTED": "Downloading Cassiopée version %ver%...",
"INFO_SERVICE_WORKER_VERSION_READY": "Cassiopée version %ver% is ready to be used, please restart.",
"ERROR_SERVICE_WORKER_INSTALL_FAILED": "Cassiopée version %ver% installation failed.",
"ERROR_SERVICE_WORKER_INSTALL_FAILED": "Cassiopée new version installation failed.",
"ERROR_JET_SUBMERGED_NO_SOLUTION": "There is no solution",
"WARNING_DEVER_ZDV_INF_ZR": "Apron elevation of structure #%number% is below river bed elevation",
"WARNING_JET_START_SUBMERGED": "Water elevation is greater than jet start elevation",
......@@ -773,5 +785,7 @@
"INFO_VERIF_SPECIES_NUB_OK": "Crossability criteria are met for custom species FORM_ID_%uid%",
"ERROR_VERIF_PAB_WALL_NOT_CROSSABLE": "Wall #%N% is not crossable",
"ERROR_VERIF_PAB_DW_NOT_CROSSABLE": "Downwall is not crossable",
"WARNING_VERIF_PAR_SPECIES_GROUP": "Species groups 3a, 3b et 7b are discouraged for this pass type"
"WARNING_VERIF_PAR_SPECIES_GROUP": "Species groups 3a, 3b et 7b are discouraged for this pass type",
"ERROR_MACRORUGOREMOUS_VARIATED_TARGET_PAM": "Target rock-ramp has variated parameters",
"WARNING_MACRORUGOREMOUS_CHUTE_AVAL": "Downstream fall detected: the downstream water level is below the critical level (%zCrit% m). Fall: %fall% m (not modelled)"
}
......@@ -4,7 +4,7 @@
"WARNING_DEVER_ZR_SUP_Z1": "La cote du lit du cours d'eau ne peut pas être supérieure à la cote de l'eau&nbsp;: Impossible de calculer l'énergie cinétique",
"WARNING_DOWNSTREAM_ELEVATION_POSSIBLE_SUBMERSION": "La cote de l'eau aval est plus élevée que la cote du seuil (ennoiement %submergencePerc% %)",
"WARNING_ORIFICE_FREE_DOWNSTREAM_ELEVATION_POSSIBLE_SUBMERSION": "La cote de l'eau aval est plus élevée que la cote du centre de l'orifice (ennoiement %submergencePerc% %)",
"WARNING_NOTCH_SUBMERGENCE_GREATER_THAN_07": "L'ennoiement de l'échancrure (%submergencePerc% %) est supérieur à la limite conseillée de 70 %",
"WARNING_NOTCH_SUBMERGENCE_GREATER_THAN_09": "L'ennoiement de l'échancrure (%submergencePerc% %) est supérieur à la limite conseillée de 90 %",
"WARNING_SLOT_SUBMERGENCE_NOT_BETWEEN_07_AND_09": "L'ennoiement de la fente (%submergencePerc% %) ne se situe pas entre les valeurs limites conseillées de 70 à 90 %",
"ERROR_STRUCTURE_SUBMERGENCE_LOWER_THAN": "L'ennoiement de la fente (%submergencePerc% %) est inférieur à %min% %",
"WARNING_WEIR_SUBMERGENCE_LOWER_THAN_08": "L'ennoiement du seuil noyé (%submergencePerc% %) est inférieur à la limite conseillée de 80% ",
......@@ -58,7 +58,6 @@
"ERROR_PARAMDOMAIN_INTERVAL_BOUNDS": "Les bornes (%minValue%/%maxValue%) de l'intervalle sont incorrectes",
"ERROR_PARAMDOMAIN_INVALID": "Paramètre '%symbol%'&nbsp;: le domaine de définition '%domain%' est incorrect",
"WARNING_PREBARRAGE_NON_CONVERGENCE": "Pré-barrage&nbsp;: le calcul a convergé avec une précision des cotes de %precision%&nbsp;m",
"ERROR_PREBARRAGE_STRUCTURE_ZDV_INF_ZF": "Cote de radier de l'ouvrage n°%ns% inférieure à la cote de fond du bassin amont de la cloison %cub%-%cdb%",
"ERROR_PREBARRAGE_Z2_SUP_Z1": "Cote de l'eau aval supérieure à la cote de l'eau amont",
"ERROR_PROBLEM_LOADING_SESSION": "Session chargée, avec des erreurs",
"ERROR_REMOUS_NO_WATER_LINE": "Aucune ligne d'eau ne peut être calculée",
......@@ -83,6 +82,10 @@
"ERROR_STRUCTURE_Q_TROP_ELEVE": "Le débit passant par les autres ouvrages est trop élevé&nbsp;: le paramètre demandé n'est pas calculable.",
"ERROR_STRUCTURE_ZDV_PAS_CALCULABLE": "Le paramètre \"Cote de radier\" ne peut pas être calculé avec cette loi de débit",
"ERROR_STRUCTURE_Z_EGAUX_Q_NON_NUL": "Les cotes amont aval sont égales et le débit n'est pas nul",
"ERROR_ELEVATION_Z1_LOWER_THAN_ZF1": "La cote amont est plus basse que la cote de fond amont de la rampe",
"ERROR_ELEVATION_Z1_EQUAL_TO_ZF1": "La cote de l'eau amont est égale à la cote de fond amont de la rampe",
"ERROR_COEF_DEBIT_NULL": "Le calcul impossible à cause d'un coefficient de débit nul",
"ERROR_D65_NULL": "Le calcul impossible à cause d'un d65 nul",
"INFO_CALCULATOR_CALC_NAME": "Nom du module de calcul",
"INFO_CALCULATOR_CALCULER": "Calculer",
"INFO_CALCULATOR_CLONE": "Dupliquer",
......@@ -430,6 +433,7 @@
"INFO_MACRORUGO_DESCRIPTION": "poisson naturelle bloc",
"INFO_MACRORUGO_TITRE_COURT": "Macro-rugo.",
"INFO_MACRORUGO_TITRE": "Passe à macro-rugosités",
"INFO_MACRORUGO_GENERATE_BACKWATER_CURVE": "Générer une courbe de remous",
"INFO_MENU_DIAGRAM_TITLE": "Diagramme des modules",
"INFO_MACRORUGOCOMPOUND_TITRE": "Passe à macro-rugosités complexe",
"INFO_MACRORUGOCOMPOUND_DESCRIPTION": "poisson naturelle bloc radiers multiples incliné",
......@@ -505,10 +509,16 @@
"INFO_PABPUISSANCE_DESCRIPTION": "échelle poisson",
"INFO_PABPUISSANCE_TITRE_COURT": "PAB&nbsp;: puissance",
"INFO_PABPUISSANCE_TITRE": "Passe à bassins&nbsp;: puissance dissipée",
"INFO_MACRORUGOREMOUS_TITRE_COURT": "C. remous de PAM",
"INFO_MACRORUGOREMOUS_TITRE": "Courbe de remous de passe à m. rugo.",
"INFO_MACRORUGOREMOUS_DESCRIPTION": "Courbe de remous d'une passe à macro-rugosités simple",
"INFO_MACRORUGOREMOUS_CREATE_PAM_FIRST": "Créer d'abord une passe à macrorugosités simple",
"INFO_PARALLELSTRUCTURE_DESCRIPTION": "orifice vanne seuil déversoir noyé dénoyé débit",
"INFO_PARALLELSTRUCTURE_TITRE_COURT": "Ouvrages",
"INFO_PARALLELSTRUCTURE_TITRE": "Lois d'ouvrages",
"INFO_PAR_TITRE": "Passe à ralentisseurs&nbsp;: calage",
"INFO_RUGOFOND_TITRE": "Passe à rugosité de fond",
"INFO_RUGOFOND_TITRE_COURT": "Rugofond",
"INFO_PAR_DESCRIPTION": "plans Denil Fatou fonds suractifs mixte chevrons canoë",
"INFO_PAR_TITRE_COURT": "PAR&nbsp;: calage",
"INFO_PARSIMULATION_TITRE": "Passe à ralentisseurs&nbsp;: simulation",
......@@ -644,8 +654,8 @@
"INFO_THEME_PASSE_A_RALENTISSEURS_DESCRIPTION": "Passe à ralentisseurs",
"INFO_THEME_PASSE_NATURELLE_DESCRIPTION": "Outils de dimensionnement d'une passe à poissons de type passe à macro-rugosités régulièrement réparties en enrochements ou préfabriquées",
"INFO_THEME_PASSE_NATURELLE_TITRE": "Passes à macro-rugosités régulièrement réparties",
"INFO_THEME_VERIFICATION_DESCRIPTION": "Outils de vérification des capacités de franchissement des passes par les différentes espèces de poissons",
"INFO_THEME_VERIFICATION_TITRE": "Vérification de passes",
"INFO_THEME_VERIFICATION_DESCRIPTION": "Cet outil a pour objectif de réaliser une vérification simple de la compatibilité entre certains critères de dimensionnement des passes à poissons et les capacités de franchissement des espèces de poissons cibles. Il peut s'avérer utile lors de la phase de conception d'un dispositif afin de s’assurer de la cohérence du dimensionnement projeté sur sa plage de fonctionnement hydrologique",
"INFO_THEME_VERIFICATION_TITRE": "Vérification des critères de franchissement",
"INFO_TITREJOURNAL": "Journal de calcul",
"INFO_TITREJOURNAL_GLOBAL": "Synthèse du journal de calcul",
"INFO_WELCOME_CONTENT": "<p>Le logiciel Cassiopée a été développé par le pôle R&D écohydraulique regroupant l'<a href=\"https://ofb.gouv.fr\" target=\"_blank\">OFB</a> (Office Français de la Biodiversité) et l’<a href=\"https://www.imft.fr\" target=\"_blank\">IMFT</a> (Institut de mécanique des fluides de Toulouse) et par l'<a href=\"http://g-eau.fr\" target=\"_blank\">UMR G-EAU</a> (UMR Gestion de l'Eau, Acteurs, Usages).</p><p>Il regroupe des outils d'aide à la conception des dispositifs de franchissement piscicoles pour la montaison et la dévalaison ainsi que des outils de calcul hydraulique utiles pour l'ingénierie en environnement et agriculture.</p><p>Pour plus d'informations, consulter les <a href=\"assets/docs/fr/mentions_legales.html\" target=\"_blank\">mentions légales</a> et la <a href=\"assets/docs/fr/index.html\" target=\"_blank\">documentation</a>.</p>",
......@@ -656,6 +666,7 @@
"INFO_EXAMPLE_LABEL_PENTE_CRITIQUE_CANAL": "Pente critique d'un canal",
"INFO_EXAMPLE_LABEL_PB": "Pré-barrage",
"INFO_EXAMPLE_LABEL_PERR": "Passe à enrochements régulièrement répartis",
"INFO_EXAMPLE_LABEL_RANGEES_PERIOD": "Passe à enrochement en rangées périodiques",
"INFO_EXAMPLE_LABEL_WEIR_JET_LENGTH": "Longueur de jet d'un déversoir",
"INFO_EXAMPLES_TITLE": "Exemples",
"INFO_EXAMPLES_SUBTITLE": "Charger des exemples types",
......@@ -666,6 +677,7 @@
"INFO_TRIGO_DESCRIPTION": "cosinus sinus tangente arc maths mathématiques",
"INFO_TRIGO_TITRE_COURT": "F. trigo.",
"INFO_VERIF_CREATE_PASS_FRIST": "Créer d'abord une passe à bassins, à ralentisseurs, ou à macrorugosités",
"INFO_VERIF_SELECT_SPECIES_FIRST": "Selectionner d'abord une ou plusieurs espèces",
"INFO_VERIF_OK": "Les critères de franchissement sont remplis pour toutes les espèces",
"INFO_VERIF_VARYING_OK": "Les critères de franchissement sont remplis pour toutes les espèces et toutes les modalités de la passe",
"WARNING_VERIF_OK_BUT": "Les critères de franchissement sont remplis pour toutes les espèces, mais il y a des avertissements",
......@@ -680,7 +692,7 @@
"INFO_ESPECE_TITRE_COURT": "Espèce",
"INFO_SERVICE_WORKER_VERSION_DETECTED": "Téléchargement de la version %ver% de Cassiopée en cours...",
"INFO_SERVICE_WORKER_VERSION_READY": "La version %ver% de Cassiopée est prête à être utilisée, veuillez redémarrer.",
"ERROR_SERVICE_WORKER_INSTALL_FAILED": "Erreur d'installation de Cassiopée version %ver%.",
"ERROR_SERVICE_WORKER_INSTALL_FAILED": "Erreur d'installation de la nouvelle version de Cassiopée.",
"ERROR_JET_SUBMERGED_NO_SOLUTION": "Il n'y a pas de solution",
"WARNING_DEVER_ZDV_INF_ZR": "La cote de radier de l'ouvrage n°%number% est sous la cote de fond du lit",
"WARNING_JET_START_SUBMERGED": "La cote de l'eau est supérieure à la cote de départ du jet",
......@@ -774,5 +786,7 @@
"INFO_VERIF_SPECIES_NUB_OK": "FORM_ID_%uid%&nbsp;: OK",
"ERROR_VERIF_PAB_WALL_NOT_CROSSABLE": "La cloison n°%N% n'est pas franchissable",
"ERROR_VERIF_PAB_DW_NOT_CROSSABLE": "La cloison aval n'est pas franchissable",
"WARNING_VERIF_PAR_SPECIES_GROUP": "Les groupes d'espèces 3a, 3b et 7b sont déconseillés pour ce type de passe"
}
"WARNING_VERIF_PAR_SPECIES_GROUP": "Les groupes d'espèces 3a, 3b et 7b sont déconseillés pour ce type de passe",
"ERROR_MACRORUGOREMOUS_VARIATED_TARGET_PAM": "La passe cible comporte des paramètres variés",
"WARNING_MACRORUGOREMOUS_CHUTE_AVAL": "Chute aval détectée: la cote de l'eau aval est inférieure à la cote critique (%zCrit% m). Chute&nbsp;: %fall% m (non modélisée)"
}
\ No newline at end of file
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"baseUrl": "./",
"types": [
"jasmine",
"node"
]
},
"files": [
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
import { ChainablePromiseElement } from 'webdriverio';
import Page from './page';
/**
* sub page containing specific selectors and methods for a specific page
*/
class LoginPage extends Page {
/**
* define selectors using getter methods
*/
public get inputUsername () {
return $('#username');
}
public get inputPassword () {
return $('#password');
}
public get btnSubmit () {
return $('button[type="submit"]');
}
/**
* a method to encapsule automation code to interact with the page
* e.g. to login using username and password
*/
public async login (username: string, password: string) {
await this.inputUsername.setValue(username);
await this.inputPassword.setValue(password);
await this.btnSubmit.click();
}
/**
* overwrite specific options to adapt it to page object
*/
public open () {
return super.open('login');
}
}
export default new LoginPage();
/**
* main page object containing all methods, selectors and functionality
* that is shared across all page objects
*/
export default class Page {
/**
* Opens a sub page of the page
* @param path path of the sub page (e.g. /path/to/page.html)
*/
public open (path: string) {
return browser.url(`https://the-internet.herokuapp.com/${path}`)
}
}
import { ChainablePromiseElement } from 'webdriverio';
import Page from './page';
/**
* sub page containing specific selectors and methods for a specific page
*/
class SecurePage extends Page {
/**
* define selectors using getter methods
*/
public get flashAlert () {
return $('#flash');
}
}
export default new SecurePage();
import LoginPage from '../pageobjects/login.page';
import SecurePage from '../pageobjects/secure.page';
describe('My Login application', () => {
it('should login with valid credentials', async () => {
await LoginPage.open();
await LoginPage.login('tomsmith', 'SuperSecretPassword!');
await expect(SecurePage.flashAlert).toBeExisting();
await expect(SecurePage.flashAlert).toHaveTextContaining(
'You logged into a secure area!');
});
});
......@@ -11,7 +11,7 @@
"path": "./src/tsconfig.app.json"
},
{
"path": "./src/tsconfig.spec.json"
"path": "./e2e/tsconfig.e2e.json"
}
]
}
\ No newline at end of file
......@@ -33,7 +33,7 @@ export const config: Options.Testrunner = {
// will be called from there.
//
specs: [
'./e2e/**/*.ts'
'./e2e/**/*e2e-spec.ts'
],
// Patterns to exclude.
exclude: [
......@@ -106,8 +106,8 @@ export const config: Options.Testrunner = {
// - @wdio/cli, @wdio/config, @wdio/utils
// Level of logging verbosity: trace | debug | info | warn | error | silent
// logLevels: {
// webdriver: 'info',
// '@wdio/appium-service': 'info'
// webdriver: 'trace',
// '@wdio/jasmine-framework': 'trace'
// },
//
// If you only want to run your tests until a specific amount of tests have failed use
......@@ -135,15 +135,15 @@ export const config: Options.Testrunner = {
// your test setup with almost no effort. Unlike plugins, they don't add new
// commands. Instead, they hook themselves up into the test process.
// args: ["--verbose", "--whitelisted-ips="]
services: [
['chromedriver',
{
chromedriverCustomPath: "/usr/bin/chromedriver",
args: ["--whitelisted-ips=127.0.0.1"]
}
]
],
// services: [
// ['chromedriver',
// {
// chromedriverCustomPath: "/usr/bin/chromedriver",
// args: ["--verbose", "--whitelisted-ips=127.0.0.1"]
// }
// ]
// ],
//
// Framework you want to run your specs with.
// The following are supported: Mocha, Jasmine, and Cucumber
// see also: https://webdriver.io/docs/frameworks
......@@ -165,14 +165,11 @@ export const config: Options.Testrunner = {
// The only one supported by default is 'dot'
// see also: https://webdriver.io/docs/dot-reporter
reporters: ['spec'],
//
// Options to be passed to Jasmine.
jasmineOpts: {
// Jasmine default timeout
defaultTimeoutInterval: 60000,
defaultTimeoutInterval: 180000,
//
// The Jasmine framework allows interception of each assertion in order to log the state of the application
// or website depending on the result. For example, it is pretty handy to take a screenshot every time
......