From 277cc91704704d5897f11a1cdddb127f3a9a2487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20H=C3=B6ger?= Date: Sat, 31 Oct 2020 23:31:42 +0100 Subject: [PATCH] Change order of buttons in DEG, question 2 --- DESCRIPTION | 2 +- R/DEG.R | 4 ++-- tests/testthat/test-DEG_DE.R | 2 +- tests/testthat/test-DEG_DE_no-q3.R | 2 +- tests/testthat/test-DEG_DE_q3_umlaut_and_punctuation.R | 2 +- ...DE_subscales_Best-Shot_Hearing-Impairment_Age_Handedness.R | 2 +- tests/testthat/test-DEG_EN.R | 2 +- tests/testthat/test-DEG_EN_leap_year.R | 2 +- tests/testthat/test-DEG_EN_no-q3.R | 2 +- tests/testthat/test-DEG_EN_no_second_language.R | 2 +- tests/testthat/test-DEG_EN_other_countries.R | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e4476d10..f840a67e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: psyquest Title: LongGold psychTestR questionnaires -Version: 1.2.0 +Version: 1.2.3 Author: Klaus Frieler, Frank Höger Maintainer: Frank Höger Description: Implementation of 18 questionnaires developed for the LongGold project and based on the psychTestR library. diff --git a/R/DEG.R b/R/DEG.R index 277b0929..0c239caa 100644 --- a/R/DEG.R +++ b/R/DEG.R @@ -55,8 +55,8 @@ main_test_deg <- function(label, items, subscales, language, offset = 1, arrange elts <- psychTestR::join(elts, psychTestR::new_timeline(c( NAFC_page("q2", psychTestR::i18n("TDEG_0002_PROMPT"), - sprintf("btn%d_text", 1:2), - labels = map(sprintf("TDEG_0002_CHOICE%d", 1:2), psychTestR::i18n), + sprintf("btn%d_text", c(2, 1)), + labels = map(sprintf("TDEG_0002_CHOICE%d", c(2, 1)), psychTestR::i18n), arrange_vertically = FALSE, button_style = "min-width: 60px", on_complete = function(answer, state, ...) { diff --git a/tests/testthat/test-DEG_DE.R b/tests/testthat/test-DEG_DE.R index 8510865b..f68b57e2 100644 --- a/tests/testthat/test-DEG_DE.R +++ b/tests/testthat/test-DEG_DE.R @@ -10,7 +10,7 @@ app$click_next() app$expect_ui_text("Wir möchten gerne möglichst präzise Informationen von dir bekommen. Wirst du bei dem nachfolgenden Test und den Fragen dein Bestes geben? Ja Nein") app$click("btn1_text") -app$expect_ui_text("Hast du Probleme oder Schwierigkeiten mit dem Hören (z. B. krankheitsbedingt)? Ja Nein") +app$expect_ui_text("Hast du Probleme oder Schwierigkeiten mit dem Hören (z. B. krankheitsbedingt)? Nein Ja") app$click("btn1_text") app$expect_ui_text("Wenn ja, welche? Weiter") diff --git a/tests/testthat/test-DEG_DE_no-q3.R b/tests/testthat/test-DEG_DE_no-q3.R index 91d61764..8d1b9acb 100644 --- a/tests/testthat/test-DEG_DE_no-q3.R +++ b/tests/testthat/test-DEG_DE_no-q3.R @@ -10,7 +10,7 @@ app$click_next() app$expect_ui_text("Wir möchten gerne möglichst präzise Informationen von dir bekommen. Wirst du bei dem nachfolgenden Test und den Fragen dein Bestes geben? Ja Nein") app$click("btn1_text") -app$expect_ui_text("Hast du Probleme oder Schwierigkeiten mit dem Hören (z. B. krankheitsbedingt)? Ja Nein") +app$expect_ui_text("Hast du Probleme oder Schwierigkeiten mit dem Hören (z. B. krankheitsbedingt)? Nein Ja") app$click("btn2_text") app$expect_ui_text("Ich bin weiblich männlich anderes möchte ich nicht sagen") diff --git a/tests/testthat/test-DEG_DE_q3_umlaut_and_punctuation.R b/tests/testthat/test-DEG_DE_q3_umlaut_and_punctuation.R index 21f70757..e0448f38 100644 --- a/tests/testthat/test-DEG_DE_q3_umlaut_and_punctuation.R +++ b/tests/testthat/test-DEG_DE_q3_umlaut_and_punctuation.R @@ -10,7 +10,7 @@ app$click_next() app$expect_ui_text("Wir möchten gerne möglichst präzise Informationen von dir bekommen. Wirst du bei dem nachfolgenden Test und den Fragen dein Bestes geben? Ja Nein") app$click("btn1_text") -app$expect_ui_text("Hast du Probleme oder Schwierigkeiten mit dem Hören (z. B. krankheitsbedingt)? Ja Nein") +app$expect_ui_text("Hast du Probleme oder Schwierigkeiten mit dem Hören (z. B. krankheitsbedingt)? Nein Ja") app$click("btn1_text") app$expect_ui_text("Wenn ja, welche? Weiter") diff --git a/tests/testthat/test-DEG_DE_subscales_Best-Shot_Hearing-Impairment_Age_Handedness.R b/tests/testthat/test-DEG_DE_subscales_Best-Shot_Hearing-Impairment_Age_Handedness.R index fdc90ba2..05248af9 100644 --- a/tests/testthat/test-DEG_DE_subscales_Best-Shot_Hearing-Impairment_Age_Handedness.R +++ b/tests/testthat/test-DEG_DE_subscales_Best-Shot_Hearing-Impairment_Age_Handedness.R @@ -10,7 +10,7 @@ app$click_next() app$expect_ui_text("Wir möchten gerne möglichst präzise Informationen von dir bekommen. Wirst du bei dem nachfolgenden Test und den Fragen dein Bestes geben? Ja Nein") app$click("btn1_text") -app$expect_ui_text("Hast du Probleme oder Schwierigkeiten mit dem Hören (z. B. krankheitsbedingt)? Ja Nein") +app$expect_ui_text("Hast du Probleme oder Schwierigkeiten mit dem Hören (z. B. krankheitsbedingt)? Nein Ja") app$click("btn1_text") app$expect_ui_text("Wenn ja, welche? Weiter") diff --git a/tests/testthat/test-DEG_EN.R b/tests/testthat/test-DEG_EN.R index f523557e..22909f58 100644 --- a/tests/testthat/test-DEG_EN.R +++ b/tests/testthat/test-DEG_EN.R @@ -10,7 +10,7 @@ app$click_next() app$expect_ui_text("We are interested in getting the most accurate information possible from you today. Are you able to give your best shot with the following tests and questions today? Yes No") app$click("btn1_text") -app$expect_ui_text("Do you have any kind of hearing impairment? (I.e., do you have any problems with your hearing?) Yes No") +app$expect_ui_text("Do you have any kind of hearing impairment? (I.e., do you have any problems with your hearing?) No Yes") app$click("btn1_text") app$expect_ui_text("If so, please tell us what kind of hearing impairment you have. Continue") diff --git a/tests/testthat/test-DEG_EN_leap_year.R b/tests/testthat/test-DEG_EN_leap_year.R index fe110e9d..b8276938 100644 --- a/tests/testthat/test-DEG_EN_leap_year.R +++ b/tests/testthat/test-DEG_EN_leap_year.R @@ -10,7 +10,7 @@ app$click_next() app$expect_ui_text("We are interested in getting the most accurate information possible from you today. Are you able to give your best shot with the following tests and questions today? Yes No") app$click("btn1_text") -app$expect_ui_text("Do you have any kind of hearing impairment? (I.e., do you have any problems with your hearing?) Yes No") +app$expect_ui_text("Do you have any kind of hearing impairment? (I.e., do you have any problems with your hearing?) No Yes") app$click("btn1_text") app$expect_ui_text("If so, please tell us what kind of hearing impairment you have. Continue") diff --git a/tests/testthat/test-DEG_EN_no-q3.R b/tests/testthat/test-DEG_EN_no-q3.R index 85a8065d..5c43620c 100644 --- a/tests/testthat/test-DEG_EN_no-q3.R +++ b/tests/testthat/test-DEG_EN_no-q3.R @@ -10,7 +10,7 @@ app$click_next() app$expect_ui_text("We are interested in getting the most accurate information possible from you today. Are you able to give your best shot with the following tests and questions today? Yes No") app$click("btn1_text") -app$expect_ui_text("Do you have any kind of hearing impairment? (I.e., do you have any problems with your hearing?) Yes No") +app$expect_ui_text("Do you have any kind of hearing impairment? (I.e., do you have any problems with your hearing?) No Yes") app$click("btn2_text") app$expect_ui_text("What is your gender? female male other rather not say") diff --git a/tests/testthat/test-DEG_EN_no_second_language.R b/tests/testthat/test-DEG_EN_no_second_language.R index ff4aee2e..17a7646c 100644 --- a/tests/testthat/test-DEG_EN_no_second_language.R +++ b/tests/testthat/test-DEG_EN_no_second_language.R @@ -10,7 +10,7 @@ app$click_next() app$expect_ui_text("We are interested in getting the most accurate information possible from you today. Are you able to give your best shot with the following tests and questions today? Yes No") app$click("btn1_text") -app$expect_ui_text("Do you have any kind of hearing impairment? (I.e., do you have any problems with your hearing?) Yes No") +app$expect_ui_text("Do you have any kind of hearing impairment? (I.e., do you have any problems with your hearing?) No Yes") app$click("btn1_text") app$expect_ui_text("If so, please tell us what kind of hearing impairment you have. Continue") diff --git a/tests/testthat/test-DEG_EN_other_countries.R b/tests/testthat/test-DEG_EN_other_countries.R index 1462caef..f9d079ad 100644 --- a/tests/testthat/test-DEG_EN_other_countries.R +++ b/tests/testthat/test-DEG_EN_other_countries.R @@ -10,7 +10,7 @@ app$click_next() app$expect_ui_text("We are interested in getting the most accurate information possible from you today. Are you able to give your best shot with the following tests and questions today? Yes No") app$click("btn1_text") -app$expect_ui_text("Do you have any kind of hearing impairment? (I.e., do you have any problems with your hearing?) Yes No") +app$expect_ui_text("Do you have any kind of hearing impairment? (I.e., do you have any problems with your hearing?) No Yes") app$click("btn1_text") app$expect_ui_text("If so, please tell us what kind of hearing impairment you have. Continue")