Skip to content

Commit

Permalink
DATAUP-187 Review edits (#1880)
Browse files Browse the repository at this point in the history
* Updates from review

* oops

* fix hover and tests
  • Loading branch information
eamahanna committed Oct 22, 2020
1 parent a367654 commit 86f459d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
9 changes: 9 additions & 0 deletions kbase-extension/static/kbase/css/kbaseNarrative.css
Original file line number Diff line number Diff line change
Expand Up @@ -3316,6 +3316,15 @@ button.kb-data-obj {
border: none;
}

.ftp-file-header {
margin-bottom: 5px;
margin-top: 8px;
}

.globus-link:hover {
text-decoration: none;
}

.kb-import-content .upload-options button {
background: #fff;
border: 1px solid #c4c4c4;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div class="row" style="margin-bottom: 5px">
<div class="row ftp-file-header">
<div class="pull-left">
<div class="upload-options">
Other ways to upload:
{{#if userInfo.globusLinked}}
<button class="globus_linked">
<a class="globus_acl_link" href="{{globusUrl}}" target="_blank" aria-label="opens new window to upload via globus">Upload with Globus</a>
</button>
<a id="globusLinked" class="globus_acl_link globus-link" href="{{globusUrl}}" target="_blank" aria-label="opens new window to upload via globus">
<button tabindex="-1" class="globus_linked">Upload with Globus</button>
</a>
{{else}}
<button class="globus_not_linked">
<a href="https://docs.kbase.us/data/globus" rel="noopener noreferrer" target="_blank" aria-label="opens new window to kbase globus upload docs">Upload with Globus</a>
</button>
<a id="globusNotLinked" class="globus-link" href="https://docs.kbase.us/data/globus" rel="noopener noreferrer" target="_blank" aria-label="opens new window to kbase globus upload docs">
<button tabindex="-1" class="globus_not_linked">Upload with Globus</button>
</a>
{{/if}}
<button class="web_upload_div">Upload with URL</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,20 @@ define ([
});
await linkedStagingViewer.render()
.then(() => {
var $globusButton = $node.find('.globus_linked');
var $globusButton = $node.find('#globusLinked');
expect($globusButton).toBeDefined();
expect($globusButton.html()).toContain('Upload with Globus');
expect($globusButton.html()).toContain('https://app.globus.org/file-manager?destination_id=c3c0a65f-5827-4834-b6c9-388b0b19953a&amp;destination_path=' + fakeUser);
expect($globusButton.attr('href')).toEqual('https://app.globus.org/file-manager?destination_id=c3c0a65f-5827-4834-b6c9-388b0b19953a&destination_path=' + fakeUser);
done();
});
});

it('Should render properly without a Globus linked account', async () => {
await stagingViewer.render();
var $globusButton = $targetNode.find('.globus_not_linked');
var $globusButton = $targetNode.find('#globusNotLinked');
expect($globusButton).toBeDefined();
expect($globusButton.html()).toContain('Upload with Globus');
expect($globusButton.html()).toContain('https://docs.kbase.us/data/globus');
expect($globusButton.attr('href')).toEqual('https://docs.kbase.us/data/globus');
});

it('Should render a url button', async () => {
Expand Down

0 comments on commit 86f459d

Please sign in to comment.