def _apply_rules_and_check(self, example):
        rule_builder = self.components.rule_builder

        self.home()
        history_id = self.current_history_id()
        inputs, _, _ = load_data_dict(history_id,
                                      {"input": example["test_data"]},
                                      self.dataset_populator,
                                      self.dataset_collection_populator)
        self.dataset_populator.wait_for_history(history_id)
        self.home()
        self._tool_open_apply_rules()
        self.screenshot("tool_apply_rules_landing")
        self.tool_parameter_edit_rules()
        rule_builder._.wait_for_visible()
        self.screenshot("tool_apply_rules_builder_landing")
        self.rule_builder_set_source(json.dumps(example["rules"]))
        self.screenshot("tool_apply_rules_after")
        rule_builder.main_button_ok.wait_for_and_click()
        self.tool_form_execute()
        output_hid = example["output_hid"]
        self.history_panel_wait_for_hid_ok(output_hid)
        output_hdca = self.dataset_populator.get_history_collection_details(
            history_id, hid=output_hid, wait=False)
        example["check"](output_hdca, self.dataset_populator)
Exemplo n.º 2
0
 def workflow_run_setup_inputs(self, content):
     history_id = self.current_history_id()
     test_data = yaml.safe_load(content)["test_data"]
     inputs, _, _ = load_data_dict(history_id, test_data,
                                   self.dataset_populator,
                                   self.dataset_collection_populator)
     self.dataset_populator.wait_for_history(history_id)
     return history_id, inputs
Exemplo n.º 3
0
    def _apply_rules_and_check(self, example):
        rule_builder = self.components.rule_builder

        self.home()
        history_id = self.current_history_id()
        inputs, _, _ = load_data_dict(history_id, {"input": example["test_data"]}, self.dataset_populator, self.dataset_collection_populator)
        self.dataset_populator.wait_for_history(history_id)
        self.home()
        self.tool_open("__APPLY_RULES__", outer=True)  # may appear twice in panel, grab top-level link
        self.screenshot("tool_apply_rules_landing")
        self.tool_parameter_edit_rules()
        rule_builder._.wait_for_visible()
        self.screenshot("tool_apply_rules_builder_landing")
        self.rule_builder_set_source(json.dumps(example["rules"]))
        self.screenshot("tool_apply_rules_after")
        rule_builder.main_button_ok.wait_for_and_click()
        self.tool_form_execute()
        output_hid = example["output_hid"]
        self.history_panel_wait_for_hid_ok(output_hid)
        output_hdca = self.dataset_populator.get_history_collection_details(history_id, hid=output_hid, wait=False)
        example["check"](output_hdca, self.dataset_populator)
Exemplo n.º 4
0
 def workflow_run_setup_inputs(self, content):
     history_id = self.current_history_id()
     test_data = yaml.safe_load(content)["test_data"]
     inputs, _, _ = load_data_dict(history_id, test_data, self.dataset_populator, self.dataset_collection_populator)
     self.dataset_populator.wait_for_history(history_id)
     return history_id, inputs