-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scottx611x/acceptance testing #1534
Conversation
…ent browsers/platforms
…e especially slow)
…into scottx611x/acceptance_testing
obj.save() | ||
for ontology in ontologies: | ||
try: | ||
with transaction.atomic(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do DataMigrations already utilize transactions???
refinery/core/models.py
Outdated
@@ -757,11 +755,11 @@ def get_pre_isa_archive(self): | |||
data_set__uuid=self.uuid).investigation.pre_isarchive_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split nested lookup into 2 trys
refinery/factory_boy/utils.py
Outdated
analysis_uuid = uuid_builtin.uuid4() | ||
AnalysisFactory( | ||
uuid=analysis_uuid, | ||
name="Test Analysis - {}".format(analysis_uuid), | ||
project=project, | ||
data_set=dataset, | ||
workflow=workflow, | ||
status=status_choices[analysis_status_counter][0] | ||
status=random.choice(status_choices)[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double check if status field is needed (random is bad)
for obj in objects: | ||
obj.save() | ||
|
||
for file_extension in file_extensions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above for Ontologies
refinery/selenium_testing/tests.py
Outdated
# Manually create and save public group to sync Selenium and test | ||
# threads | ||
# Manually create and save public group to sync Selenium and gecko | ||
# driver threads | ||
create_public_group() | ||
ExtendedGroup.objects.public_group().save() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ONe of these lines is not necessary (probably create_public_group() )
…aticLiveServerTestCases
…finery-platform/refinery-platform into scottx611x/acceptance_testing
This reverts commit 673827a.
…ng `get_investigation()`
…from settings.base), but continue to use prod for rest of tests (as has been the case since #1534).
* Fresh install of cypress * cypress default config * Test homepage * Test statistics and about * Travis ready to go? * Travis ready to go? * Try explore and list, but they do not work * Add runserver * Wait for server to start * Util function in tests / hit right url on travis * Remove selenium from travis.yml * Remove all references to selenium * collectstatic * Test explore and list * noinput * start registration * mkdir static * Move grunt up so ui/production is available * Try adding --insecure so it will serve static? * mkdir not needed now that grunt comes first? * Travis is running test, but getting stuck trying to send email * These two failed on travis * Account approval and login are tested * Util functions done right * shell_plus > shell * Start testing profile page * Try to record cypress runs in travis * Different IP between dev and travis causing problems * cypress --record * Activate guest user * Load and add to public group * Add line to README * Empty stub tests * Change order in travis * visible_btn util function; link to dashboard * Fixtures. Make "visible" more flexible. * Test sorting and locking * And check that buttons toggle * data sets list test * TODO note * Add params to python utils so we can create a slugged dataset * This will fail on Travis, but is prereq for work with Scott tomorrow * Temporarily disable * Start preview test * test preview... but IDs are wrong? * preview spec with stronger assertions * fix typo * Move to before_script * Remove from readme; move to wiki * Replace hardcoded url with human-readable note * Flake8 is complaining now: not sure why it was not a problem earlier * delete the new user we created * Clean up DataSets * Split up grunt, and hopefully this is sufficient for Travis * Bring back all the selenium code * These cases are now covered by cypress * TODOs: Replace with cypress, eventually * selenium puppet * slug=None not needed in factory * Reenable production email. Expecting tests to run, up til the point where the cypress test wants to email * Make selenium_testing a module again * Run in dev mode on travis, so that puppet will use console for email, instead of smtp. hopefully. * New prod_except_email settings * tweak prod settings only when running server, as suggested by scott * On travis, runserver with dev settings (so we will get console email from settings.base), but continue to use prod for rest of tests (as has been the case since #1534).
Introduce
StaticLiveServerTestCases
andfactory_boy
object creation as a solid foundation for writing more acceptance testsRefactor older tests that interact with the ORM to inherit from
TransactionTestCase
to ensure a clean db after each test run, and to move away from the use of large tearDown() methods.