Skip to content

Commit

Permalink
Add timeout and create more functional test suites (#1537)
Browse files Browse the repository at this point in the history
  • Loading branch information
berroar authored Oct 21, 2024
1 parent 080d87e commit 705ba93
Show file tree
Hide file tree
Showing 64 changed files with 192 additions and 189 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ jobs:
- name: Install apt dependencies
run: |
sudo apt-get install libsnappy-dev libgconf-2-4 jq
# Install wkthtmltopdf with patched Qt
sudo apt-get install -y xfonts-base xfonts-75dpi
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb
Expand Down Expand Up @@ -124,12 +123,13 @@ jobs:
needs: [python-dependencies, node-dependencies]
strategy:
matrix:
suite: [ timeout_modal_expired, timeout_modal_extended, timeout_modal_extended_new_window, features, general, components ]
suite: [ timeout_modal_expired, timeout_modal_extended, timeout_modal_extended_new_window, features, summaries, general, journeys, components, list_collector]
runs-on: ubuntu-22.04
timeout-minutes: 30
env:
EQ_RUN_FUNCTIONAL_TESTS_HEADLESS: True
# :TODO: Revisit & update when 2 instances can be used without adverse effects
EQ_FUNCTIONAL_TEST_MAX_INSTANCES: 1
EQ_FUNCTIONAL_TEST_MAX_INSTANCES: 2
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { checkItemsInList, click } from "../helpers";
import AnyoneLiveAtListCollector from "../generated_pages/answer_action_redirect_to_list_add_block_checkbox/anyone-else-live-at.page";
import AnyoneLiveAtListCollectorAddPage from "../generated_pages/answer_action_redirect_to_list_add_block_checkbox/anyone-else-live-at-add.page";
import AnyoneLiveAtListCollectorRemovePage from "../generated_pages/answer_action_redirect_to_list_add_block_checkbox/anyone-else-live-at-remove.page";
import AnyoneUsuallyLiveAt from "../generated_pages/answer_action_redirect_to_list_add_block_checkbox/anyone-usually-live-at.page";
import { checkItemsInList, click } from "../../../helpers";
import AnyoneLiveAtListCollector from "../../../generated_pages/answer_action_redirect_to_list_add_block_checkbox/anyone-else-live-at.page";
import AnyoneLiveAtListCollectorAddPage from "../../../generated_pages/answer_action_redirect_to_list_add_block_checkbox/anyone-else-live-at-add.page";
import AnyoneLiveAtListCollectorRemovePage from "../../../generated_pages/answer_action_redirect_to_list_add_block_checkbox/anyone-else-live-at-remove.page";
import AnyoneUsuallyLiveAt from "../../../generated_pages/answer_action_redirect_to_list_add_block_checkbox/anyone-usually-live-at.page";

describe("Answer Action: Redirect To List Add Question (Checkbox)", () => {
describe('Given the user is on a question with a "RedirectToListAddBlock" action enabled', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { checkItemsInList, click } from "../helpers";
import AnyoneLiveAtListCollector from "../generated_pages/answer_action_redirect_to_list_add_block_radio/anyone-else-live-at.page";
import AnyoneLiveAtListCollectorAddPage from "../generated_pages/answer_action_redirect_to_list_add_block_radio/anyone-else-live-at-add.page";
import AnyoneLiveAtListCollectorRemovePage from "../generated_pages/answer_action_redirect_to_list_add_block_radio/anyone-else-live-at-remove.page";
import AnyoneUsuallyLiveAt from "../generated_pages/answer_action_redirect_to_list_add_block_radio/anyone-usually-live-at.page";
import { checkItemsInList, click } from "../../../helpers";
import AnyoneLiveAtListCollector from "../../../generated_pages/answer_action_redirect_to_list_add_block_radio/anyone-else-live-at.page";
import AnyoneLiveAtListCollectorAddPage from "../../../generated_pages/answer_action_redirect_to_list_add_block_radio/anyone-else-live-at-add.page";
import AnyoneLiveAtListCollectorRemovePage from "../../../generated_pages/answer_action_redirect_to_list_add_block_radio/anyone-else-live-at-remove.page";
import AnyoneUsuallyLiveAt from "../../../generated_pages/answer_action_redirect_to_list_add_block_radio/anyone-usually-live-at.page";

describe("Answer Action: Redirect To List Add Question (Radio)", () => {
describe('Given the user is on a question with a "RedirectToListAddBlock" action enabled', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import ConditionalCombinedRoutingPage from "../generated_pages/conditional_combined_routing/conditional-routing-block.page";
import ResponseAny from "../generated_pages/conditional_combined_routing/response-any.page";
import ResponseNotAny from "../generated_pages/conditional_combined_routing/response-not-any.page";
import SubmitPage from "../generated_pages/conditional_combined_routing/submit.page";
import { click } from "../helpers";
import ConditionalCombinedRoutingPage from "../../../generated_pages/conditional_combined_routing/conditional-routing-block.page";
import ResponseAny from "../../../generated_pages/conditional_combined_routing/response-any.page";
import ResponseNotAny from "../../../generated_pages/conditional_combined_routing/response-not-any.page";
import SubmitPage from "../../../generated_pages/conditional_combined_routing/submit.page";
import { click } from "../../../helpers";

describe("Conditional combined routing.", () => {
beforeEach(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import AgePage from "../generated_pages/routing_and_skipping_section_dependencies/age.page";
import HouseHoldPersonalDetailsSectionSummaryPage from "../generated_pages/routing_and_skipping_section_dependencies/household-personal-details-section-summary.page";
import HouseholdSectionSummaryPage from "../generated_pages/routing_and_skipping_section_dependencies/household-section-summary.page";
import ListCollectorAddPage from "../generated_pages/routing_and_skipping_section_dependencies/list-collector-add.page";
import ListCollectorPage from "../generated_pages/routing_and_skipping_section_dependencies/list-collector.page";
import NamePage from "../generated_pages/routing_and_skipping_section_dependencies/name-block.page";
import PrimaryPersonSummaryPage from "../generated_pages/routing_and_skipping_section_dependencies/primary-person-summary.page";
import ReasonNoConfirmationPage from "../generated_pages/routing_and_skipping_section_dependencies/reason-no-confirmation.page";
import RepeatingAgePage from "../generated_pages/routing_and_skipping_section_dependencies/repeating-age.page";
import RepeatingSexPage from "../generated_pages/routing_and_skipping_section_dependencies/repeating-sex.page";
import SecurityPage from "../generated_pages/routing_and_skipping_section_dependencies/security.page";
import SkipAgePage from "../generated_pages/routing_and_skipping_section_dependencies/skip-age.page";
import SkipEnableSectionPage from "../generated_pages/routing_and_skipping_section_dependencies/skip-household-section.page";
import EnableSectionPage from "../generated_pages/routing_and_skipping_section_dependencies/enable-section.page";
import SkipConfirmationPage from "../generated_pages/routing_and_skipping_section_dependencies/skip-confirmation.page";
import SkipConfirmationSectionSummaryPage from "../generated_pages/routing_and_skipping_section_dependencies/skip-confirmation-section-summary.page";
import SkipSectionSummaryPage from "../generated_pages/routing_and_skipping_section_dependencies/skip-section-summary.page";
import RepeatingIsDependentPage from "../generated_pages/routing_and_skipping_section_dependencies/repeating-is-dependent.page";
import RepeatingIsSmokerPage from "../generated_pages/routing_and_skipping_section_dependencies/repeating-is-smoker.page";

import HubPage from "../base_pages/hub.page";
import { click } from "../helpers";
import AgePage from "../../../generated_pages/routing_and_skipping_section_dependencies/age.page";
import HouseHoldPersonalDetailsSectionSummaryPage from "../../../generated_pages/routing_and_skipping_section_dependencies/household-personal-details-section-summary.page";
import HouseholdSectionSummaryPage from "../../../generated_pages/routing_and_skipping_section_dependencies/household-section-summary.page";
import ListCollectorAddPage from "../../../generated_pages/routing_and_skipping_section_dependencies/list-collector-add.page";
import ListCollectorPage from "../../../generated_pages/routing_and_skipping_section_dependencies/list-collector.page";
import NamePage from "../../../generated_pages/routing_and_skipping_section_dependencies/name-block.page";
import PrimaryPersonSummaryPage from "../../../generated_pages/routing_and_skipping_section_dependencies/primary-person-summary.page";
import ReasonNoConfirmationPage from "../../../generated_pages/routing_and_skipping_section_dependencies/reason-no-confirmation.page";
import RepeatingAgePage from "../../../generated_pages/routing_and_skipping_section_dependencies/repeating-age.page";
import RepeatingSexPage from "../../../generated_pages/routing_and_skipping_section_dependencies/repeating-sex.page";
import SecurityPage from "../../../generated_pages/routing_and_skipping_section_dependencies/security.page";
import SkipAgePage from "../../../generated_pages/routing_and_skipping_section_dependencies/skip-age.page";
import SkipEnableSectionPage from "../../../generated_pages/routing_and_skipping_section_dependencies/skip-household-section.page";
import EnableSectionPage from "../../../generated_pages/routing_and_skipping_section_dependencies/enable-section.page";
import SkipConfirmationPage from "../../../generated_pages/routing_and_skipping_section_dependencies/skip-confirmation.page";
import SkipConfirmationSectionSummaryPage from "../../../generated_pages/routing_and_skipping_section_dependencies/skip-confirmation-section-summary.page";
import SkipSectionSummaryPage from "../../../generated_pages/routing_and_skipping_section_dependencies/skip-section-summary.page";
import RepeatingIsDependentPage from "../../../generated_pages/routing_and_skipping_section_dependencies/repeating-is-dependent.page";
import RepeatingIsSmokerPage from "../../../generated_pages/routing_and_skipping_section_dependencies/repeating-is-smoker.page";

import HubPage from "../../../base_pages/hub.page";
import { click } from "../../../helpers";

describe("Routing and skipping section dependencies", () => {
describe("Given the routing and skipping section dependencies questionnaire", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import CalculatedSummarySectionSummaryPage from "../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/calculated-summary-section-summary.page";
import CurrencyTotalPlaybackPage from "../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/currency-total-playback.page";
import DependentQuestionSectionSummaryPage from "../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/dependent-question-section-summary.page";
import FirstQuestionBlockPage from "../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/first-question-block.page";
import FruitPage from "../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/fruit.page";
import SecondQuestionBlockPage from "../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/second-question-block.page";
import VegetablesPage from "../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/vegetables.page";
import SkipQuestionPage from "../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/skip-butter-block.page";
import ButterPage from "../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/butter-block.page";

import HubPage from "../base_pages/hub.page";
import { click } from "../helpers";
import CalculatedSummarySectionSummaryPage from "../../../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/calculated-summary-section-summary.page";
import CurrencyTotalPlaybackPage from "../../../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/currency-total-playback.page";
import DependentQuestionSectionSummaryPage from "../../../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/dependent-question-section-summary.page";
import FirstQuestionBlockPage from "../../../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/first-question-block.page";
import FruitPage from "../../../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/fruit.page";
import SecondQuestionBlockPage from "../../../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/second-question-block.page";
import VegetablesPage from "../../../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/vegetables.page";
import SkipQuestionPage from "../../../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/skip-butter-block.page";
import ButterPage from "../../../generated_pages/routing_and_skipping_section_dependencies_calculated_summary/butter-block.page";

import HubPage from "../../../base_pages/hub.page";
import { click } from "../../../helpers";

describe("Routing and skipping section dependencies based on calculated summaries", () => {
describe("Given the section dependencies based on a calculated summary questionnaire", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import RoutingCheckboxContains from "../generated_pages/routing_checkbox_contains/country-checkbox.page";
import ContainsAllPage from "../generated_pages/routing_checkbox_contains/country-interstitial-all.page";
import ContainsAnyPage from "../generated_pages/routing_checkbox_contains/country-interstitial-any.page";
import SubmitPage from "../generated_pages/routing_checkbox_contains/submit.page";
import { click } from "../helpers";
import RoutingCheckboxContains from "../../../generated_pages/routing_checkbox_contains/country-checkbox.page";
import ContainsAllPage from "../../../generated_pages/routing_checkbox_contains/country-interstitial-all.page";
import ContainsAnyPage from "../../../generated_pages/routing_checkbox_contains/country-interstitial-any.page";
import SubmitPage from "../../../generated_pages/routing_checkbox_contains/submit.page";
import { click } from "../../../helpers";
describe("Routing Checkbox Contains Condition.", () => {
beforeEach(async () => {
await browser.openQuestionnaire("test_routing_checkbox_contains.json");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import QuestionPage from "../generated_pages/skip_condition_block/do-you-want-to-skip.page";
import SkipPage from "../generated_pages/skip_condition_block/should-skip.page";
import SubmitPage from "../generated_pages/skip_condition_block/submit.page";
import { click } from "../helpers";
import QuestionPage from "../../../generated_pages/skip_condition_block/do-you-want-to-skip.page";
import SkipPage from "../../../generated_pages/skip_condition_block/should-skip.page";
import SubmitPage from "../../../generated_pages/skip_condition_block/submit.page";
import { click } from "../../../helpers";
describe("Skip Conditions - Block", () => {
const schema = "test_skip_condition_block.json";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import QuestionPage from "../generated_pages/skip_condition_group/do-you-want-to-skip.page";
import SkipPage from "../generated_pages/skip_condition_group/should-skip.page";
import SubmitPage from "../generated_pages/skip_condition_group/submit.page";
import { click } from "../helpers";
import QuestionPage from "../../../generated_pages/skip_condition_group/do-you-want-to-skip.page";
import SkipPage from "../../../generated_pages/skip_condition_group/should-skip.page";
import SubmitPage from "../../../generated_pages/skip_condition_group/submit.page";
import { click } from "../../../helpers";
describe("Skip Conditions - Group", () => {
const schema = "test_skip_condition_group.json";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import ListCollectorPage from "../generated_pages/skip_condition_list/list-collector.page.js";
import ListCollectorAddPage from "../generated_pages/skip_condition_list/list-collector-add.page.js";
import LessThanTwoInterstitialPage from "../generated_pages/skip_condition_list/less-than-two-interstitial.page.js";
import TwoInterstitialPage from "../generated_pages/skip_condition_list/two-interstitial.page.js";
import MoreThanTwoInterstitialPage from "../generated_pages/skip_condition_list/more-than-two-interstitial.page.js";
import { click } from "../helpers";
import ListCollectorPage from "../../../generated_pages/skip_condition_list/list-collector.page.js";
import ListCollectorAddPage from "../../../generated_pages/skip_condition_list/list-collector-add.page.js";
import LessThanTwoInterstitialPage from "../../../generated_pages/skip_condition_list/less-than-two-interstitial.page.js";
import TwoInterstitialPage from "../../../generated_pages/skip_condition_list/two-interstitial.page.js";
import MoreThanTwoInterstitialPage from "../../../generated_pages/skip_condition_list/more-than-two-interstitial.page.js";
import { click } from "../../../helpers";
describe("Feature: Routing on lists", () => {
describe("Given I start skip condition list survey", () => {
beforeEach(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import FoodPage from "../generated_pages/skip_condition_not_set/food-block.page";
import DrinkPage from "../generated_pages/skip_condition_not_set/drink-block.page";
import SubmitPage from "../generated_pages/skip_condition_not_set/submit.page";
import { click } from "../helpers";
import FoodPage from "../../../generated_pages/skip_condition_not_set/food-block.page";
import DrinkPage from "../../../generated_pages/skip_condition_not_set/drink-block.page";
import SubmitPage from "../../../generated_pages/skip_condition_not_set/submit.page";
import { click } from "../../../helpers";
describe("Skip Conditions - Not Set", () => {
beforeEach("Load the survey", async () => {
await browser.openQuestionnaire("test_skip_condition_not_set.json");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import FoodPage from "../generated_pages/skip_condition_set/food-block.page";
import DrinkPage from "../generated_pages/skip_condition_set/drink-block.page";
import SubmitPage from "../generated_pages/skip_condition_set/submit.page";
import { click } from "../helpers";
import FoodPage from "../../../generated_pages/skip_condition_set/food-block.page";
import DrinkPage from "../../../generated_pages/skip_condition_set/drink-block.page";
import SubmitPage from "../../../generated_pages/skip_condition_set/submit.page";
import { click } from "../../../helpers";
describe("Skip Conditions - Set", () => {
beforeEach("Load the survey", async () => {
await browser.openQuestionnaire("test_skip_condition_set.json");
Expand Down
Loading

0 comments on commit 705ba93

Please sign in to comment.