But if we browse the directory through its identifier and the origin info is provided as query parameter (https://archive.softwareheritage.org/browse/directory/ec4ae097465d9ea51589537ea94b2ea50e8d134d/?origin=https://hal.archives-ouvertes.fr/hal-02309043), the "Add origin info" checkbox is missing.
Related to T2141
Details
- Reviewers
vlorentz anlambert - Group Reviewers
Reviewers - Commits
- rDWAPPS20a6073cd4d5: browse/directory: Add missing 'Add origin info' checkbox in permalinks tab
Diff Detail
- Repository
- rDWAPPS Web applications
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/928/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/928/console
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/536/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/536/console
I fixed the build issue in master, and retriggered the builds of this diff. The errors should disappear.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/930/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/539/ for more details.
- Adding 'Add Origin info' checkbox which was missing
- Adding tests to check permalink-box content
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/955/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/564/ for more details.
Thanks!
Just one comment:
swh/web/tests/browse/views/test_directory.py | ||
---|---|---|
73 | I would rather you test swh-id-option-origin-directory, which checks the presence of the field instead of the form. For now it's the same thing, but we might add other fields in the future. |
swh/web/tests/browse/views/test_directory.py | ||
---|---|---|
62–68 | The test looks good but let's try to avoid hardcoding directory sha1 and origin url. @given(directory()) def test_permalink_box_context(client, tests_data, directory): origin_url = random.choice(tests_data['origins'])['url'] url = reverse('browse-directory', url_args={'sha1_git': directory}, query_params={'origin': origin_url}) resp = client.get(url) assert resp.status_code == 200 assert_contains(resp, '<form id="swh-id-options">') | |
73 | I agree with @vlorentz |
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/963/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/572/ for more details.
Looks good to me ! Before I can accept the diff, please rebase to master, squash the commits and use a better commit message, something like:
browse/directory: Add missing 'Add origin info' checkbox in permalinks tab Closes T2141
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/974/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/583/ for more details.