Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,26 @@ describe('Cluster Dashboard', () => {
describe('Details Card', () => {
it('has all fields populated', async () => {
expect(clusterDashboardView.detailsCard.isDisplayed()).toBe(true);
const expectedItems = [
'Cluster API Address',
'Cluster ID',
'Provider',
'OpenShift Version',
'Update Channel',
];
const items = clusterDashboardView.detailsCardList.$$('dt');
const values = clusterDashboardView.detailsCardList.$$('dd');

expect(items.count()).toBe(5);
expect(values.count()).toBe(5);
expect(items.get(0).getText()).toEqual('Cluster API Address');
expect(items.get(1).getText()).toEqual('Cluster ID');
expect(items.get(2).getText()).toEqual('Provider');
expect(items.get(3).getText()).toEqual('OpenShift Version');
expect(items.get(4).getText()).toEqual('Update Channel');
for (let i = 0; i < 5; i++) {
expect(items.count()).toBe(expectedItems.length);
expect(values.count()).toBe(expectedItems.length);
expectedItems.forEach((label: string, i: number) => {
expect(items.get(i).getText()).toBe(label);
const text = values.get(i).getText();
expect(text.length).not.toBe(0);
expect(text).not.toBe('Not available');
}
// `Update Channel` is expected to be `Not available` in CI.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: With this PR, the console suite no longer cares if the channel is set or not, right? So this comment could be "Allow for Update Channel to be Not available in CI", or some such to match the code and stay fresh even if for whatever reason channels start getting set again in CI.

if (label !== 'Update Channel') {
expect(text).not.toBe('Not available');
}
});
});
it('has View settings link', () => {
const link = clusterDashboardView.detailsCard.$('[href="/settings/cluster/"]');
Expand Down