Skip to content
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

Report PDF upload Cypress test #1864

Merged
merged 5 commits into from
Aug 18, 2023
Merged

Report PDF upload Cypress test #1864

merged 5 commits into from
Aug 18, 2023

Conversation

phildominguez-gsa
Copy link
Contributor

@phildominguez-gsa phildominguez-gsa commented Aug 17, 2023

Closes #1580

In this PR:

  • Adding steps to the full-submission test to include the audit report PDF upload
  • Removing the disabling of the upload button, since incomplete forms are already handled and it messed with the Cypress test

Testing: Cypress tests should pass and PDF uploading should still work locally.

PR checklist: submitters

  • Link to an issue if possible. If there’s no issue, describe what your branch does. Even if there is an issue, a brief description in the PR is still useful.
  • List any special steps reviewers have to follow to test the PR. For example, adding a local environment variable, creating a local test file, etc.
  • For extra credit, submit a screen recording like this one.
  • Make sure you’ve merged main into your branch shortly before creating the PR. (You should also be merging main into your branch regularly during development.)
  • Make sure that whatever feature you’re adding has tests that cover the feature. This includes test coverage to make sure that the previous workflow still works, if applicable.
  • Do manual testing locally. Our tests are not good enough yet to allow us to skip this step.
  • If Git surgery is necessary at any point, repeat the testing after it’s finished.
  • Once a PR is merged, keep an eye on it until it’s deployed to dev, and do enough testing on dev to verify that it deployed successfully, the feature works as expected, and the happy path for the broad feature area (such as submission) still works.

PR checklist: reviewers

  • Pull the branch to your local environment and run make docker clean; make docker-first-run && docker compose up; then run docker compose exec web /bin/bash -c "python manage.py test"
  • Manually test out the changes locally.
  • Check that the PR has appropriate tests. Look out for changes in HTML/JS/JSON Schema logic that may need to be captured in Python tests even though the logic isn’t in Python.
  • If Git surgery is necessary at any point (such as during a merge party), repeat the testing after it’s finished.

The larger the PR, the stricter we should be about these points.

@phildominguez-gsa phildominguez-gsa self-assigned this Aug 17, 2023
@phildominguez-gsa phildominguez-gsa temporarily deployed to dev August 17, 2023 19:42 — with GitHub Actions Inactive
@phildominguez-gsa phildominguez-gsa temporarily deployed to meta August 17, 2023 19:42 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Aug 17, 2023

Terraform plan for meta

Plan: 4 to add, 0 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # module.environments["dev"].local_file.cf_org will be created
  + resource "local_file" "cf_org" {
      + content              = <<-EOT
            cf_org_name = "gsa-tts-oros-fac"
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../dev/orgname.auto.tfvars"
      + id                   = (known after apply)
    }

  # module.environments["preview"].local_file.cf_org will be created
  + resource "local_file" "cf_org" {
      + content              = <<-EOT
            cf_org_name = "gsa-tts-oros-fac"
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../preview/orgname.auto.tfvars"
      + id                   = (known after apply)
    }

  # module.environments["production"].local_file.cf_org will be created
  + resource "local_file" "cf_org" {
      + content              = <<-EOT
            cf_org_name = "gsa-tts-oros-fac"
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../production/orgname.auto.tfvars"
      + id                   = (known after apply)
    }

  # module.environments["staging"].local_file.cf_org will be created
  + resource "local_file" "cf_org" {
      + content              = <<-EOT
            cf_org_name = "gsa-tts-oros-fac"
        EOT
      + content_base64sha256 = (known after apply)
      + content_base64sha512 = (known after apply)
      + content_md5          = (known after apply)
      + content_sha1         = (known after apply)
      + content_sha256       = (known after apply)
      + content_sha512       = (known after apply)
      + directory_permission = "0777"
      + file_permission      = "0644"
      + filename             = "./../staging/orgname.auto.tfvars"
      + id                   = (known after apply)
    }

Plan: 4 to add, 0 to change, 0 to destroy.

✅ Plan applied in Deploy to Development and Management Environment #117

@github-actions
Copy link
Contributor

github-actions bot commented Aug 17, 2023

Terraform plan for dev

No changes. Your infrastructure matches the configuration.
No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

✅ Plan applied in Deploy to Development and Management Environment #117

@phildominguez-gsa phildominguez-gsa temporarily deployed to meta August 17, 2023 19:45 — with GitHub Actions Inactive
@phildominguez-gsa phildominguez-gsa temporarily deployed to dev August 17, 2023 19:45 — with GitHub Actions Inactive
Copy link
Contributor

@jperson1 jperson1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A great triumph over the trials of cypress-file-upload

@phildominguez-gsa phildominguez-gsa merged commit 372aaed into main Aug 18, 2023
@phildominguez-gsa phildominguez-gsa deleted the pd/1580-pdf-upload branch August 18, 2023 16:00
@phildominguez-gsa phildominguez-gsa temporarily deployed to meta August 18, 2023 16:27 — with GitHub Actions Inactive
@phildominguez-gsa phildominguez-gsa temporarily deployed to dev August 18, 2023 16:27 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cypress tests on the PDF upload
2 participants