Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reordered data so oc would be the first cli on the cli page. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1812139
- Loading branch information
1 parent
55dadbc
commit 7baa945
Showing
2 changed files
with
112 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { CommandLineTools } from '../../public/components/command-line-tools'; | ||
|
||
describe('CommandLineTools', () => { | ||
let wrapper; | ||
const obj = { | ||
data: [ | ||
{ | ||
apiVersion: 'console.openshift.io/v1', | ||
|
||
kind: 'ConsoleCLIDownload', | ||
|
||
metadata: { | ||
creationTimestamp: '2020-03-16T12:31:49Z', | ||
generation: 1, | ||
|
||
name: 'helm-download-links', | ||
|
||
resourceVersion: '10488', | ||
|
||
selfLink: '/apis/console.openshift.io/v1/consoleclidownloads/helm-download-links', | ||
|
||
uid: '4984e824-96b7-465a-a67b-46b407aee972', | ||
}, | ||
spec: { | ||
description: | ||
'Helm 3 is a package manager for Kubernetes applications which enables defining,↵installing, and upgrading applications packaged as Helm Charts.↵Helm 3 is a [Technology Preview](https://access.redhat.com/support/offerings/techpreview) feature on OpenShift 4.↵', | ||
|
||
displayName: 'helm - Helm 3 CLI', | ||
links: [], | ||
}, | ||
}, | ||
{ | ||
apiVersion: 'console.openshift.io/v1', | ||
|
||
kind: 'ConsoleCLIDownload', | ||
metadata: { | ||
creationTimestamp: '2020-03-16T12:38:38Z', | ||
|
||
generation: 1, | ||
|
||
name: 'oc-cli-downloads', | ||
|
||
resourceVersion: '18788', | ||
|
||
selfLink: '/apis/console.openshift.io/v1/consoleclidownloads/oc-cli-downloads', | ||
|
||
uid: '42c1f210-3181-4745-bd45-a14ad350ecef', | ||
}, | ||
spec: { | ||
description: | ||
'With the OpenShift command line interface, you can create applications and manage OpenShift projects from a terminal.↵↵The oc binary offers the same capabilities as the kubectl binary, but it is further extended to natively support OpenShift Container Platform features.↵', | ||
|
||
displayName: 'oc - OpenShift Command Line Interface (CLI)', | ||
links: [], | ||
}, | ||
}, | ||
], | ||
loadError: '', | ||
loaded: true, | ||
}; | ||
|
||
describe('When ordering is correct', () => { | ||
beforeEach(() => { | ||
wrapper = shallow(<CommandLineTools obj={obj} />); | ||
}); | ||
|
||
it('shows oc first', () => { | ||
expect( | ||
wrapper | ||
.find('.co-section-heading') | ||
.first() | ||
.text(), | ||
).toEqual('oc - OpenShift Command Line Interface (CLI)'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters