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

improve behavior of docker containers and document local cypress testing #529

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

TimidRobot
Copy link
Member

@TimidRobot TimidRobot commented Apr 12, 2024

Description

improve behavior of docker containers and document local cypress testing

  • Resolves issue where NGINX (http://localhost:8888) would result in 403 after build
  • Document how to run Cypress tests locally
  • Improve node caching behavior (store cache in repo so it isn't lost every time the container is stopped)
  • Rendered readme:

Tests

Now with documented local Cypress tests!

Cypress test results
====================================================================================================

  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:        13.7.3                                                                         │
  │ Browser:        Electron 118 (headless)                                                        │
  │ Node Version:   v20.12.2 (/usr/local/bin/node)                                                 │
  │ Specs:          2 found (AttributionDetails..cy.js, Stepper..cy.js)                            │
  │ Searched:       tests/cypress/integration//**/*.cy.{js,jsx,ts,tsx}                             │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running:  AttributionDetails..cy.js                                                       (1 of 2)


  Attribution Details Step.vue
    Mark Your Work section appears and is hidden at the correct moments
      ✓ The "Mark Your Work" section should be invisible at the beginning (519ms)
      ✓ It should appear when the user selects a license from the dropdown and clicks Next (924ms)
      ✓ It should disappear when the user clicks Back. (949ms)
      ✓ When the user clicks back again, and then uses the steps (i.e. clicking I need help on the first step) to choose the license, the "Mark Your Work" section should appear again when the last step is selected. (1641ms)
    Mark Your Work section correctly shows the license in the correct format:
      ✓ When the user selects "CC BY", the license is shown correctly in all tabs (1392ms)
      ✓ When the user changes attribution type, the license changes from Short to Full, accordingly (942ms)
    The license code can be copied to the clipboard
      ✓ When the user clicks on "Copy", the button text changes to "Copied", and the clipboard contains the license text. (1018ms)
    Year Of Creation Input field available or not
      ✓ not visible if the license is not CC-BY type (819ms)
      ✓ visible if the license is of type CC-BY (534ms)
    Attribution details are updated correctly
      ✓ When the user adds information in the attribution details, the license code is updated accordingly (2354ms)
      ✓ When the user adds information in the attribution details, the year of Creation field is updated accordingly (2964ms)


  11 passing (14s)


  (Results)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        11                                                                               │
  │ Passing:      11                                                                               │
  │ Failing:      0                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  0                                                                                │
  │ Video:        false                                                                            │
  │ Duration:     14 seconds                                                                       │
  │ Spec Ran:     AttributionDetails..cy.js                                                        │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running:  Stepper..cy.js                                                                  (2 of 2)


  Stepper.vue
    ✓ Clicking the info button (1880ms)
    User can select licenses using the dropdown
      ✓ Selecting CC0 (883ms)
      ✓ Selecting CC BY-NC-ND (565ms)
    User can select a license using the steps
      ✓ Selecting CC0 (1085ms)
      ✓ Selecting CC BY (1361ms)
      ✓ Selecting CC BY-NC-ND (1149ms)
      ✓ Can select CC BY-ND (1197ms)
    "Back", "Done" and "Start again" buttons work correctly
      ✓ User can select CC BY-ND, go back and change selection to CC BY-SA (1674ms)
      ✓ User can select CCO using the License Dropdown, go back and select CC BY-NC-SA using steps (2105ms)
      ✓ User can start the selection process over by clicking "Start again" Button (2621ms)
      ✓ Chooser auto-scrolls to "Mark Your Work" section when "Done" is clicked (1255ms)


  11 passing (16s)


  (Results)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        11                                                                               │
  │ Passing:      11                                                                               │
  │ Failing:      0                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  0                                                                                │
  │ Video:        false                                                                            │
  │ Duration:     16 seconds                                                                       │
  │ Spec Ran:     Stepper..cy.js                                                                   │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


====================================================================================================

  (Run Finished)


       Spec                                              Tests  Passing  Failing  Pending  Skipped  
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✔  AttributionDetails..cy.js                00:14       11       11        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  Stepper..cy.js                           00:16       11       11        -        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✔  All specs passed!                        00:30       22       22        -        -        -

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main or master).
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin

For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@TimidRobot TimidRobot self-assigned this Apr 12, 2024
@TimidRobot TimidRobot requested review from a team as code owners April 12, 2024 16:37
@TimidRobot TimidRobot requested review from akmadian and removed request for a team April 12, 2024 16:37
Copy link

netlify bot commented Apr 12, 2024

Deploy Preview for creativecommons-chooser ready!

Name Link
🔨 Latest commit 5c12439
🔍 Latest deploy log https://app.netlify.com/sites/creativecommons-chooser/deploys/661964cb60824f00080360c2
😎 Deploy Preview https://deploy-preview-529--creativecommons-chooser.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@TimidRobot TimidRobot merged commit d489b91 into main Apr 12, 2024
5 checks passed
@TimidRobot TimidRobot deleted the docker-improvements branch April 12, 2024 17:44
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.

2 participants