Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4305 from zherman0/bz1796522
Bug 1796522: Show multiple resources in one stream
- Loading branch information
Showing
3 changed files
with
71 additions
and
53 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
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,45 @@ | ||
import { browser, $, element, by, ExpectedConditions as until } from 'protractor'; | ||
import { appHost, checkLogs, checkErrors, testName } from '../protractor.conf'; | ||
import { execSync } from 'child_process'; | ||
|
||
describe('Events', () => { | ||
const name = `${testName}-pod`; | ||
const testpod = { | ||
apiVersion: 'v1', | ||
kind: 'Pod', | ||
metadata: { | ||
name, | ||
namespace: testName, | ||
}, | ||
spec: { | ||
containers: [ | ||
{ | ||
name: 'hello-openshift', | ||
image: 'openshift/hello-openshift', | ||
}, | ||
], | ||
}, | ||
}; | ||
beforeAll(() => { | ||
execSync(`echo '${JSON.stringify(testpod)}' | kubectl create -n ${testName} -f -`); | ||
}); | ||
afterEach(() => { | ||
checkLogs(); | ||
checkErrors(); | ||
}); | ||
afterAll(() => { | ||
try { | ||
execSync(`kubectl delete pods ${name} -n ${testName}`); | ||
} catch (error) { | ||
console.error(`\nFailed to delete pods ${name}:\n${error}`); | ||
} | ||
}); | ||
describe('Events', () => { | ||
it('event view displays created pod', async () => { | ||
await browser.get(`${appHost}/ns/${testName}/events`); | ||
await browser.wait(until.presenceOf(element(by.linkText(name)))); | ||
await browser.wait(until.presenceOf($(`[data-test-id=${name}]`))); | ||
expect($(`[data-test-id=${name}]`).getText()).toEqual(name); | ||
}); | ||
}); | ||
}); |
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