Skip to content
Snippets Groups Projects
Commit 87eae735 authored by Zoltan Runyo's avatar Zoltan Runyo
Browse files

ICSHWI-7853: Fix component tests

parent 0a5a4015
No related branches found
No related tags found
1 merge request!64ICSHWI-7718: Highlight table row in case of IOC discrepancy: IOC name check...
......@@ -157,7 +157,6 @@ defineFeature(feature, (test) => {
then('the user should be redirected to the Host Details page', async () => {
expect(await screen.findByText('Syslog info')).toBeInTheDocument()
expect(await screen.findByText('Open in CSEntry')).toBeInTheDocument()
});
});
......
......@@ -137,9 +137,7 @@ defineFeature(feature, (test) => {
});
then('the user should be redirected to the new IOC details page', async () => {
expect(await screen.findByText(/manage ioc/i)).toBeInTheDocument();
expect(await screen.findByText(/TEST-IOC-1/i)).toBeInTheDocument();
expect(await screen.findByText(/target host/i)).toBeInTheDocument();
expect(await screen.findByText(/manage deployment/i)).toBeInTheDocument();
});
});
});
......@@ -55,8 +55,8 @@ export function useWindowDimensions() {
}
export function parseHostUrl(url) {
const hostName = url.split('.', 2)[0];
const network = url.split('.', 2)[1];
const hostName = url?.split('.', 2)[0];
const network = url?.split('.', 2)[1];
return {hostName: hostName, network: network.includes('cslab') ? "CSLab" : (network.includes('tn') ? "TN" : null)};
return {hostName: hostName, network: network?.includes('cslab') ? "CSLab" : (network?.includes('tn') ? "TN" : null)};
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment