Spaces:
Running
Running
| import unittest | |
| from pathlib import Path | |
| class PriorityScopeTest(unittest.TestCase): | |
| def test_no_deadline_prioritized_scope_is_wired(self): | |
| source = Path("app.js").read_text(encoding="utf-8") | |
| self.assertIn('value="no-deadline-prioritized"', source) | |
| self.assertIn("Sem prazo e priorizado", source) | |
| self.assertIn('!filled(card.deadline) && card.isPrioritized', source) | |
| def test_prioritized_state_depends_only_on_prioritization_date(self): | |
| source = Path("app.js").read_text(encoding="utf-8") | |
| self.assertIn( | |
| "function prioritizationRequestIsPrioritized(request) {\n" | |
| " return filled(prioritizationDateValue(request));\n" | |
| "}", | |
| source, | |
| ) | |
| def test_eav_sheet_hides_esjl_only_columns(self): | |
| source = Path("app.js").read_text(encoding="utf-8") | |
| for column in ( | |
| "Finalidade aluguel", | |
| "Contrato", | |
| "Retorno 1", | |
| "Retorno 2", | |
| "Data Retorno 1", | |
| "Data Retorno 2", | |
| ): | |
| self.assertIn(f' "{column}",', source) | |
| self.assertIn("return isEsjlInstance ? new Set() : new Set(eavDefaultHiddenColumns);", source) | |
| self.assertNotIn("hideEavOnlyColumns", source) | |
| if __name__ == "__main__": | |
| unittest.main() | |