Page MenuHomeSoftware Heritage

Save Code Now Admin: Use different views for each tab
ClosedPublic

Authored by vlorentz on Mar 29 2022, 4:16 PM.

Details

Summary

In particular, this preserves the tab when refreshing the page or going
through browser history

This is similar to D7439. Also no redirect, because this is only available
internally, so only a couple of us use this

Diff Detail

Repository
rDWAPPS Web applications
Branch
tabs
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 27929
Build 43734: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 43733: arc lint + arc unit

Unit TestsFailed

TimeTest
45 msJenkins > "before each" hook for "should select or unselect a table row by clicking on it"::Tests / Cypress tests / Run cypress tests / Test Admin Origin Save Urls Filtering "before each" hook for "should select or unselect a table row by clicking on it"
TypeError: this.Urls.admin_origin_save is not a function Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Test Admin Origin Save Urls...`
43 msJenkins > should display admin-origin-save and deposit in sidebar::Tests / Cypress tests / Run cypress tests / Test Admin Login/logout should display admin-origin-save and deposit in sidebar
TypeError: this.Urls.admin_origin_save is not a function at Context.eval (http://localhost:5004/__cypress/tests?p=cypress/integration/admin.spec.js:125:42)
46 msJenkins > should prevent unauthorized access after logout::Tests / Cypress tests / Run cypress tests / Test Admin Login/logout should prevent unauthorized access after logout
TypeError: this.Urls.admin_origin_save is not a function at Context.eval (http://localhost:5004/__cypress/tests?p=cypress/integration/admin.spec.js:151:24)
22,565 msJenkins > should redirect to default page::Tests / Cypress tests / Run cypress tests / Test Admin Login/logout should redirect to default page
AssertionError: Timed out retrying after 20000ms: expected '/admin/origin/save/requests/' to equal '/admin/origin/save/' at Context.eval (http://localhost:5004/__cypress/tests?p=cypress/integration/admin.spec.js:119:29)
26 msJenkins > should reject a save code now request with note::Tests / Cypress tests / Run cypress tests / Test Admin Origin Save should reject a save code now request with note
TypeError: this.Urls.admin_origin_save is not a function at Context.eval (http://localhost:5004/__cypress/tests?p=cypress/integration/admin.spec.js:243:24)
View Full Test Results (5 Failed · 935 Passed · 5 Skipped)

Event Timeline

Build has FAILED

Patch application report for D7458 (id=27013)

Could not rebase; Attempt merge onto f8e4ad3a51...

Merge made by the 'recursive' strategy.
 assets/src/bundles/admin/origin-save.js            |  8 --
 swh/web/add_forge_now/views.py                     |  8 +-
 swh/web/admin/origin_save.py                       | 12 ++-
 swh/web/admin/urls.py                              |  2 +-
 .../{create-request.html => common.html}           |  0
 ...eate-request-create.html => creation_form.html} |  2 +-
 .../{create-request-help.html => help.html}        |  2 +-
 .../{create-request-list.html => list.html}        |  2 +-
 swh/web/templates/admin/origin-save/common.html    | 41 +++++++++
 swh/web/templates/admin/origin-save/filters.html   | 76 +++++++++++++++++
 .../requests.html}                                 | 99 +---------------------
 swh/web/templates/layout.html                      |  2 +-
 12 files changed, 137 insertions(+), 117 deletions(-)
 rename swh/web/templates/add_forge_now/{create-request.html => common.html} (100%)
 rename swh/web/templates/add_forge_now/{create-request-create.html => creation_form.html} (99%)
 rename swh/web/templates/add_forge_now/{create-request-help.html => help.html} (98%)
 rename swh/web/templates/add_forge_now/{create-request-list.html => list.html} (95%)
 create mode 100644 swh/web/templates/admin/origin-save/common.html
 create mode 100644 swh/web/templates/admin/origin-save/filters.html
 rename swh/web/templates/admin/{origin-save.html => origin-save/requests.html} (51%)
Changes applied before test
commit 98d09d376a341daf6e203aefa016a0b0ffe84ac1
Merge: f8e4ad3a 061fff67
Author: Jenkins user <jenkins@localhost>
Date:   Tue Mar 29 14:17:28 2022 +0000

    Merge branch 'diff-target' into HEAD

commit 061fff67c3b2c331264eaab209a5c3065ea0ae07
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Mar 29 16:08:49 2022 +0200

    Save Code Now Admin: Use different views for each tab
    
    In particular, this preserves the tab when refreshing the page or going
    through browser history

commit 20731a4e2f77fcb0948dc7ebd9ec98e7dc06c5b6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Mar 29 13:37:51 2022 +0200

    Add Forge Now: Shorten template names

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1627/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1627/console

Build has FAILED

Patch application report for D7458 (id=27017)

Could not rebase; Attempt merge onto f8e4ad3a51...

Updating f8e4ad3a..7f3ce49f
Fast-forward
 assets/src/bundles/admin/origin-save.js            |  8 --
 swh/web/add_forge_now/views.py                     |  8 +-
 swh/web/admin/origin_save.py                       | 12 ++-
 swh/web/admin/urls.py                              |  2 +-
 .../{create-request.html => common.html}           |  0
 ...eate-request-create.html => creation_form.html} |  2 +-
 .../{create-request-help.html => help.html}        |  2 +-
 .../{create-request-list.html => list.html}        |  2 +-
 swh/web/templates/admin/origin-save/common.html    | 41 +++++++++
 swh/web/templates/admin/origin-save/filters.html   | 76 +++++++++++++++++
 .../requests.html}                                 | 99 +---------------------
 swh/web/templates/layout.html                      |  2 +-
 12 files changed, 137 insertions(+), 117 deletions(-)
 rename swh/web/templates/add_forge_now/{create-request.html => common.html} (100%)
 rename swh/web/templates/add_forge_now/{create-request-create.html => creation_form.html} (99%)
 rename swh/web/templates/add_forge_now/{create-request-help.html => help.html} (98%)
 rename swh/web/templates/add_forge_now/{create-request-list.html => list.html} (95%)
 create mode 100644 swh/web/templates/admin/origin-save/common.html
 create mode 100644 swh/web/templates/admin/origin-save/filters.html
 rename swh/web/templates/admin/{origin-save.html => origin-save/requests.html} (51%)
Changes applied before test
commit 7f3ce49f70d0dfd61e8091adef25cc0604a67bd7
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Mar 29 16:08:49 2022 +0200

    Save Code Now Admin: Use different views for each tab
    
    In particular, this preserves the tab when refreshing the page or going
    through browser history

commit 013bb5c9527faa5878fec36f6d5a7d66b1194e34
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Mar 29 13:37:51 2022 +0200

    Add Forge Now: Shorten template names

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1630/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1630/console

Harbormaster returned this revision to the author for changes because remote builds failed.Mar 29 2022, 4:43 PM
Harbormaster failed remote builds in B27933: Diff 27017!

Build is green

Patch application report for D7458 (id=27022)

Could not rebase; Attempt merge onto f8e4ad3a51...

Updating f8e4ad3a..6eb7004e
Fast-forward
 assets/src/bundles/admin/origin-save.js            |  8 --
 cypress/integration/admin.spec.js                  | 12 +--
 swh/web/add_forge_now/views.py                     |  8 +-
 swh/web/admin/origin_save.py                       | 12 ++-
 swh/web/admin/urls.py                              |  2 +-
 .../{create-request.html => common.html}           |  0
 ...eate-request-create.html => creation_form.html} |  2 +-
 .../{create-request-help.html => help.html}        |  2 +-
 .../{create-request-list.html => list.html}        |  2 +-
 swh/web/templates/admin/origin-save/common.html    | 41 +++++++++
 swh/web/templates/admin/origin-save/filters.html   | 76 +++++++++++++++++
 .../requests.html}                                 | 99 +---------------------
 swh/web/templates/layout.html                      |  2 +-
 13 files changed, 143 insertions(+), 123 deletions(-)
 rename swh/web/templates/add_forge_now/{create-request.html => common.html} (100%)
 rename swh/web/templates/add_forge_now/{create-request-create.html => creation_form.html} (99%)
 rename swh/web/templates/add_forge_now/{create-request-help.html => help.html} (98%)
 rename swh/web/templates/add_forge_now/{create-request-list.html => list.html} (95%)
 create mode 100644 swh/web/templates/admin/origin-save/common.html
 create mode 100644 swh/web/templates/admin/origin-save/filters.html
 rename swh/web/templates/admin/{origin-save.html => origin-save/requests.html} (51%)
Changes applied before test
commit 6eb7004eadc204c3d20fd12ed74ed7cbc4391876
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Mar 29 16:08:49 2022 +0200

    Save Code Now Admin: Use different views for each tab
    
    In particular, this preserves the tab when refreshing the page or going
    through browser history

commit 013bb5c9527faa5878fec36f6d5a7d66b1194e34
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Mar 29 13:37:51 2022 +0200

    Add Forge Now: Shorten template names

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1633/ for more details.

anlambert added a subscriber: anlambert.
anlambert added inline comments.
cypress/integration/admin.spec.js
2 ↗(On Diff #27022)

-2022

swh/web/templates/admin/origin-save/common.html
4

-2022

This revision is now accepted and ready to land.Mar 29 2022, 5:24 PM
This revision was landed with ongoing or failed builds.Mar 29 2022, 5:46 PM
This revision was automatically updated to reflect the committed changes.

Build was aborted

Patch application report for D7458 (id=27052)

Rebasing onto 013bb5c952...

Current branch diff-target is up to date.
Changes applied before test
commit f82d436fad7feec26d78d141511ce4990ece7483
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Mar 29 16:08:49 2022 +0200

    Save Code Now Admin: Use different views for each tab
    
    In particular, this preserves the tab when refreshing the page or going
    through browser history

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1635/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1635/console