Test fixes

This commit is contained in:
2020-12-13 16:07:33 +00:00
parent e0615f318c
commit dfdbcb651f
7 changed files with 14628 additions and 6 deletions

3
.gitignore vendored
View File

@@ -109,5 +109,4 @@ com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
.vscode/
/package-lock.json
screenshots/
screenshots/

View File

@@ -614,7 +614,8 @@ class Payment(models.Model, RevisionMixin):
class RiskAssessment(models.Model, RevisionMixin):
event = models.OneToOneField('Event', on_delete=models.CASCADE)
# General
nonstandard_equipment = models.BooleanField(help_text="Does the event require any hired in equipment or use of equipment that is not covered by <a href='https://nottinghamtec.sharepoint.com/:f:/g/HealthAndSafety/Eo4xED_DrqFFsfYIjKzMZIIB6Gm_ZfR-a8l84RnzxtBjrA?e=Bf0Haw'>TEC's standard risk assessments and method statements?</a>")
nonstandard_equipment = models.BooleanField(help_text="Does the event require any hired in equipment or use of equipment that is not covered by <a href='https://nottinghamtec.sharepoint.com/:f:/g/HealthAndSafety/Eo4xED_DrqFFsfYIjKzMZIIB6Gm_ZfR-a8l84RnzxtBjrA?e=Bf0Haw'>"
"TEC's standard risk assessments and method statements?</a>")
nonstandard_use = models.BooleanField(help_text="Are TEC using their equipment in a way that is abnormal?<br><small>i.e. Not covered by TECs standard health and safety documentation</small>")
contractors = models.BooleanField(help_text="Are you using any external contractors?<small>i.e. Freelancers/Crewing Companies</small>")
other_companies = models.BooleanField(help_text="Are TEC working with any other companies on site?<small>e.g. TEC is providing the lighting while another company does sound</small>")

View File

@@ -207,6 +207,7 @@ class CreateRiskAssessment(FormPage):
'persons_responsible_structures': (regions.TextBox, (By.ID, 'id_persons_responsible_structures')),
'suspended_structures': (regions.RadioSelect, (By.ID, 'id_suspended_structures')),
'supervisor_consulted': (regions.CheckBox, (By.ID, 'id_supervisor_consulted')),
'outside': (regions.CheckBox, (By.ID, 'id_outside')),
}
@property

View File

@@ -688,7 +688,8 @@ class TestHealthAndSafety(BaseRigboardTest):
barrier_required=False,
nonstandard_emergency_procedure=False,
special_structures=False,
suspended_structures=False)
suspended_structures=False,
outside=False)
self.page = pages.EventDetail(self.driver, self.live_server_url, event_id=self.testEvent.pk).open()
# TODO Can I loop through all the boolean fields and test them at once?
@@ -707,6 +708,7 @@ class TestHealthAndSafety(BaseRigboardTest):
self.page.crew_fatigue = False
self.page.general_notes = "There are no notes."
self.page.big_power = False
self.page.outside = False
self.page.power_mic.search(self.profile.name)
self.page.power_mic.set_option(self.profile.name, True)
# TODO This should not be necessary, normally closes automatically

View File

@@ -495,7 +495,8 @@ class TestHSLogic(TestCase):
barrier_required=True,
nonstandard_emergency_procedure=True,
special_structures=False,
suspended_structures=False),
suspended_structures=False,
outside=False),
}
cls.checklists = {

14618
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -34,7 +34,7 @@
"gulp-sass": "^4.1.0",
"gulp-sourcemaps": "^2.6.5",
"gulp-terser": "^1.2.0",
"node-sass": "^4.14.1"
"node-sass": "^5.0.0"
},
"scripts": {
"gulp": "gulp"