creativecommons / chooser

The new and improved CC license selection tool.
https://chooser-beta.creativecommons.org
MIT License
97 stars 124 forks source link

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

Closed TimidRobot closed 3 months ago

TimidRobot commented 3 months ago

Description

improve behavior of docker containers and document local cypress testing

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

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. ```
netlify[bot] commented 3 months ago

Deploy Preview for creativecommons-chooser ready!

Name Link
Latest commit 5c124397b1e188b05e16edbc62bf3805a6912e82
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.