templates/top-navigation: Update action buttons layout
Remove the Actions dropdown and replace with simple buttons instead: "Download", "New snapshot" and "Show metadata".
Hide the "Download as git" and "Show metadata" action for non staff users.
Related to #2326 (closed)
Migrated from D3319 (view on Phabricator)
Merge request reports
Activity
Some references in the commit message have been migrated:
- T2326 is now #2326 (closed)
Build is green
Patch application report for D3319 (id=11757)
Rebasing onto 93584735...
Current branch diff-target is up to date.
Changes applied before test
commit 8e0fa87b22d7196d72ab580882a61804e7c84912 Author: Antoine Lambert <antoine.lambert@inria.fr> Date: Fri Jun 19 15:28:16 2020 +0200 templates/top-navigation: Update action buttons layout Remove the Actions dropdown and replace with simple buttons instead: "Download", "New snapshot" and "Show metadata". Hide the "Download as git" and "Show metadata" action for non staff users. Related to #2326
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/208/ for more details.
13 13 'done': 'rgb(92, 184, 92)' 14 14 }; 15 15 16 function checkVaultCookingTask(objectType) { 17 cy.contains('button', 'Actions') 18 .click(); 16 function adminLogin() { 17 cy.visit('/admin/') 18 .get('input[name="username"]') 19 .type('admin') 20 .get('input[name="password"]') 21 .type('admin') 22 .get('form') 23 .submit(); 24 } I read in the cypress doc that it'd be best to avoid using the ui to login and use internal authentication api instead. I tried to start something about it but failed to make it ok ¯_(ツ)_/¯ so far.
I guess, we'll tackle this later.
Although, note that we kinda use this snippet in multiple locations now (each time we need to login in the admin page so that'd be deposit, the main admin page test and here i guess).
Maybe there we could define this as a main function we can reuse?
What do you think?
I read in the cypress doc that it'd be best to avoid using the ui to login and use internal authentication api instead. I tried to start something about it but failed to make it ok ¯_(ツ)_/¯ so far.
I guess, we'll tackle this later.
I do not think we need to do that. The idea to go through the UI is to ensure the login process does not break as the webapp code evolves.
Although, note that we kinda use this snippet in multiple locations now (each time we need to login in the admin page so that'd be deposit, the main admin page test and here i guess).
Maybe there we could define this as a main function we can reuse?
What do you think?
Ack, will put that function in the
cypress/utils/index.js
file.