Skip to content
Snippets Groups Projects

templates/top-navigation: Update action buttons layout

1 unresolved thread

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)

Before: image

After: image image


Migrated from D3319 (view on Phabricator)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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?

  • Author Maintainer

    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.

  • Please register or sign in to reply
  • Looks good.

    One question above ;)

  • Merge request was accepted

  • Antoine R. Dumont approved this merge request

    approved this merge request

  • Author Maintainer

    Merge request was merged

  • Please register or sign in to reply
    Loading