fix: tests
This commit is contained in:
parent
6d762b41ad
commit
86cbb1ca4c
2 changed files with 5 additions and 5 deletions
|
|
@ -33,8 +33,8 @@ export class Application extends React.Component {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const storageHidedCards = localStorage.getItem('hidedCards');
|
const storageHidedCards = localStorage.getItem('hidedCards');
|
||||||
const hidedCards = storageHidedCards != null && storageHidedCards !== '' ? storageHidedCards.split(',') : [];
|
const hidedCards = storageHidedCards != null && storageHidedCards !== '' ? storageHidedCards.split(',') : [];
|
||||||
const fahrenheitChecked = Boolean(localStorage.getItem('fahrenheitChecked')) || false
|
const fahrenheitChecked = Boolean(localStorage.getItem('fahrenheitChecked')) || false;
|
||||||
const isExpanded = JSON.parse(localStorage.getItem('isExpanded')) || {}
|
const isExpanded = JSON.parse(localStorage.getItem('isExpanded')) || {};
|
||||||
const intervalId = setInterval(() => {
|
const intervalId = setInterval(() => {
|
||||||
if (!this.state.isShowBtnInstall && !this.state.isError)
|
if (!this.state.isShowBtnInstall && !this.state.isError)
|
||||||
this.loadSensors();
|
this.loadSensors();
|
||||||
|
|
@ -172,7 +172,7 @@ export class Application extends React.Component {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.fail((e) => {
|
.fail((e) => {
|
||||||
this.getLmSensorsInstallCmd(index + 1);
|
this.getLmSensorsInstallCmd(index + 1);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -260,7 +260,7 @@ export class Application extends React.Component {
|
||||||
{alert != null ? <Alert variant={alert.variant}>{alert.msg}</Alert> : <></>}
|
{alert != null ? <Alert variant={alert.variant}>{alert.msg}</Alert> : <></>}
|
||||||
{isShowBtnInstall ? <Button onClick={this.handleInstallSensors}>{_('Install')}</Button> : <></>}
|
{isShowBtnInstall ? <Button onClick={this.handleInstallSensors}>{_('Install')}</Button> : <></>}
|
||||||
{hidedCards.length > 0 ? <Button onClick={() => this.handleShowHidedCards()}>{_('Show hided cards')}</Button> : <></>}
|
{hidedCards.length > 0 ? <Button onClick={() => this.handleShowHidedCards()}>{_('Show hided cards')}</Button> : <></>}
|
||||||
|
|
||||||
{sensors !== null
|
{sensors !== null
|
||||||
? Object.entries(sensors).map((key, keyIndex) => {
|
? Object.entries(sensors).map((key, keyIndex) => {
|
||||||
if (hidedCards.includes(key[0])) {
|
if (hidedCards.includes(key[0])) {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ class TestApplication(testlib.MachineCase):
|
||||||
|
|
||||||
self.login_and_go("/sensors")
|
self.login_and_go("/sensors")
|
||||||
# verify expected heading
|
# verify expected heading
|
||||||
b.wait_text(".pf-v5-c-card__title", "Sensors")
|
b.wait_text(".pf-v5-c-card__title-text", "Sensors")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue