parent
f2a11ba1de
commit
2bb8e01d2d
3 changed files with 11 additions and 15 deletions
|
|
@ -47,8 +47,8 @@
|
||||||
"webpack-cli": "^3.3.5"
|
"webpack-cli": "^3.3.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@patternfly/patternfly": "2.71.7",
|
"@patternfly/patternfly": "4.23.3",
|
||||||
"@patternfly/react-core": "3.158.3",
|
"@patternfly/react-core": "4.32.1",
|
||||||
"core-js": "3.6.5",
|
"core-js": "3.6.5",
|
||||||
"react": "16.13.1",
|
"react": "16.13.1",
|
||||||
"react-dom": "16.13.1"
|
"react-dom": "16.13.1"
|
||||||
|
|
|
||||||
14
src/app.jsx
14
src/app.jsx
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
import cockpit from 'cockpit';
|
import cockpit from 'cockpit';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Alert, Card, CardHead, CardHeader, CardHeadMain, Title } from '@patternfly/react-core';
|
import { Alert, Card, CardTitle, CardBody } from '@patternfly/react-core';
|
||||||
import './app.scss';
|
import './app.scss';
|
||||||
|
|
||||||
const _ = cockpit.gettext;
|
const _ = cockpit.gettext;
|
||||||
|
|
@ -37,17 +37,13 @@ export class Application extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<CardHead>
|
<CardTitle>Starter Kit</CardTitle>
|
||||||
<CardHeadMain>
|
<CardBody>
|
||||||
<Title headingLevel="h2" size="3xl">Starter Kit</Title>
|
|
||||||
</CardHeadMain>
|
|
||||||
</CardHead>
|
|
||||||
<CardHeader>
|
|
||||||
<Alert
|
<Alert
|
||||||
variant="default"
|
variant="info"
|
||||||
title={ cockpit.format(_("Running on $0"), this.state.hostname) }
|
title={ cockpit.format(_("Running on $0"), this.state.hostname) }
|
||||||
/>
|
/>
|
||||||
</CardHeader>
|
</CardBody>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,16 +20,16 @@ class TestApplication(testlib.MachineCase):
|
||||||
|
|
||||||
self.login_and_go("/starter-kit")
|
self.login_and_go("/starter-kit")
|
||||||
# verify expected heading
|
# verify expected heading
|
||||||
b.wait_text("h2.pf-c-title", "Starter Kit")
|
b.wait_text(".pf-c-card__title", "Starter Kit")
|
||||||
|
|
||||||
# verify expected host name
|
# verify expected host name
|
||||||
hostname = m.execute("hostname").strip()
|
hostname = m.execute("hostname").strip()
|
||||||
b.wait_in_text("h4.pf-c-alert__title", "Running on " + hostname)
|
b.wait_in_text(".pf-c-alert__title", "Running on " + hostname)
|
||||||
|
|
||||||
# change current hostname
|
# change current hostname
|
||||||
m.execute("echo new-%s > /etc/hostname" % hostname)
|
m.execute("echo new-%s > /etc/hostname" % hostname)
|
||||||
# verify new hostname name
|
# verify new hostname name
|
||||||
b.wait_in_text("h4.pf-c-alert__title", "Running on new-" + hostname)
|
b.wait_in_text(".pf-c-alert__title", "Running on new-" + hostname)
|
||||||
|
|
||||||
# change language to German
|
# change language to German
|
||||||
b.switch_to_top()
|
b.switch_to_top()
|
||||||
|
|
@ -48,7 +48,7 @@ class TestApplication(testlib.MachineCase):
|
||||||
b.go("/starter-kit")
|
b.go("/starter-kit")
|
||||||
b.enter_page("/starter-kit")
|
b.enter_page("/starter-kit")
|
||||||
# page label (from js) should be translated
|
# page label (from js) should be translated
|
||||||
b.wait_in_text("h4.pf-c-alert__title", "Läuft auf")
|
b.wait_in_text(".pf-c-alert__title", "Läuft auf")
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
testlib.test_main()
|
testlib.test_main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue