Skip to content

How to Test Major Changes to CSS

Wesley Bomar edited this page Apr 28, 2022 · 10 revisions

Steps

Confirm identical build output for project(s) on default branch versus the branch to test.

When checking out branches, do not forget to git submodule update, otherwise the test will fail.

  1. Clean out any previous testing you may have done with these steps.
    git rm -rf taccsite_cms/static/site_cms/css/build-for-compare
    rm -rf node_modules
  2. Confirm CSS on default branch builds for frontera-cms.

    Follow default branch's instructions to build for Frontera CMS. (No need to collectstatic.)

  3. Copy build output to new directory, and stage the change with Git.
    rm -rf taccsite_cms/static/site_cms/css/build-for-compare
    cp -r taccsite_cms/static/site_cms/css/build taccsite_cms/static/site_cms/css/build-for-compare
    git add taccsite_cms/static/site_cms/css/build-for-compare
  4. Confirm CSS on new branch builds for frontera-cms.

    Follow this branch's instructions to build for Frontera CMS. (No need to collectstatic.)

  5. Replace that copied old build output with new build output (do not stage).
    rm -rf taccsite_cms/static/site_cms/css/build-for-compare
    cp -r taccsite_cms/static/site_cms/css/build taccsite_cms/static/site_cms/css/build-for-compare
  6. Compare the build outputs via git status.
    pwd # confirm you are at CMS repo root
    git status
  7. Confirm you see only relevant staged changes.
    • (via git status) You should only see "Changes to be committed" for build-for-compare/.
    • (via git status) You should not see "Changes not staged for commit" for build-for-compare/.
  8. Clean out new branch's built CSS.
    git rm -rf taccsite_cms/static/site_cms/css/build-for-compare
    rm -rf node_modules
  9. Confirm CSS on default branch builds for core-cms.

    Follow default branch's instructions to build for Frontera CMS. (No need to collectstatic.)

  10. Copy build output to new directory, and stage the change with Git.
    rm -rf taccsite_cms/static/site_cms/css/build-for-compare
    cp -r taccsite_cms/static/site_cms/css/build taccsite_cms/static/site_cms/css/build-for-compare
    git add taccsite_cms/static/site_cms/css/build-for-compare
  11. Confirm CSS new branch builds for core-cms.

    Follow this branch's instructions to build for Frontera CMS. (No need to collectstatic.)

  12. Replace that copied old build output with new build output (do not stage).
    rm -rf taccsite_cms/static/site_cms/css/build-for-compare
    cp -r taccsite_cms/static/site_cms/css/build taccsite_cms/static/site_cms/css/build-for-compare
  13. Compare the build outputs via git status.
    git status
  14. Confirm you see only staged changes.
    • (via git status) You should only see "Changes to be committed" for build-for-compare/.
    • (via git status) You should not see "Changes not staged for commit" for build-for-compare/.
  15. Repeat as desired for each project.