diff --git a/src/app/AppLayout/AppLayout.tsx b/src/app/AppLayout/AppLayout.tsx index 3ff314067..a8d482ba8 100644 --- a/src/app/AppLayout/AppLayout.tsx +++ b/src/app/AppLayout/AppLayout.tsx @@ -398,6 +398,7 @@ export const AppLayout: React.FC = ({ children }) => { 0 ? 'attention' : unreadNotificationsCount === 0 ? 'read' : 'unread' diff --git a/src/app/TargetView/TargetSelect.tsx b/src/app/TargetView/TargetSelect.tsx index 97fc4d30e..99ea58ca4 100644 --- a/src/app/TargetView/TargetSelect.tsx +++ b/src/app/TargetView/TargetSelect.tsx @@ -17,7 +17,6 @@ import { LoadingView } from '@app/Shared/Components/LoadingView'; import { Target } from '@app/Shared/Services/api.types'; import { getTargetRepresentation, includesTarget, isEqualTarget } from '@app/Shared/Services/api.utils'; import { ServiceContext } from '@app/Shared/Services/Services'; -import { NoTargetSelected } from '@app/TargetView/NoTargetSelected'; import { SerializedTarget } from '@app/TargetView/SerializedTarget'; import { useSubscriptions } from '@app/utils/hooks/useSubscriptions'; import { getFromLocalStorage } from '@app/utils/LocalStorage'; diff --git a/src/itest/RecordingWorkflow.test.ts b/src/itest/RecordingWorkflow.test.ts index 9f8c3ff9d..bf9039e88 100644 --- a/src/itest/RecordingWorkflow.test.ts +++ b/src/itest/RecordingWorkflow.test.ts @@ -78,6 +78,8 @@ describe('Recording workflow steps', function () { const active = await recordings.getRecordings(); assert.equal(active.length, 1); + await cryostat.closeNotificationAlerts(); + await recordings.deleteRecording(active[0]); await sleep(10000); assert.equal((await recordings.getRecordings()).length, 0); diff --git a/src/itest/util.ts b/src/itest/util.ts index 262d85e3a..9d28950c8 100644 --- a/src/itest/util.ts +++ b/src/itest/util.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Builder, By, WebDriver, WebElement, WebElementPromise, until, Actions } from 'selenium-webdriver'; +import { Builder, By, WebDriver, WebElement, WebElementPromise, until } from 'selenium-webdriver'; import firefox from 'selenium-webdriver/firefox'; const DEFAULT_FIND_ELEMENT_TIMEOUT = 5000; @@ -95,16 +95,26 @@ export class Cryostat { if (skipButton) await skipButton.click(); } + async closeNotificationAlerts(): Promise { + const notiBadge = await this.driver.wait(until.elementLocated(By.id('notification-badge'))); + + // Toggle to open/close + await notiBadge.click(); + return await notiBadge.click(); + } + async getLatestNotification(): Promise { const latestNotification = await this.driver.wait( - until.elementLocated(By.className('pf-c-alert-group pf-m-toast')), + until.elementLocated(By.className('pf-v5-c-alert-group pf-m-toast')), ); return { title: await getDirectTextContent( this.driver, - await latestNotification.findElement(By.css('li:last-of-type .pf-c-alert__title')), + await latestNotification.findElement(By.css('li:last-of-type .pf-v5-c-alert__title')), ), - description: await latestNotification.findElement(By.css('li:last-of-type .pf-c-alert__description')).getText(), + description: await latestNotification + .findElement(By.css('li:last-of-type .pf-v5-c-alert__description')) + .getText(), }; } } @@ -164,10 +174,7 @@ export class Dashboard { const addCardButton = await getElementById(this.driver, 'dashboard-add-btn'); // Can't use click() directly because the button is wrapped by a Tooltip const actions = this.driver.actions(); - actions - .move({ origin: addCardButton }) - .click() - .perform(); + await actions.move({ origin: addCardButton }).click().perform(); const twoPartCards = [CardType.AUTOMATED_ANALYSIS, CardType.JFR_METRICS_CHART, CardType.MBEAN_METRICS_CHART]; switch (cardType) { @@ -237,7 +244,7 @@ export class Recordings { } async getRecordings(): Promise { - const tableXPath = "//div[@class='recording-table--inner-container pf-c-scroll-inner-wrapper']"; + const tableXPath = "//div[@class='recording-table--inner-container pf-v5-c-scroll-inner-wrapper']"; return this.driver.findElements(By.xpath(`${tableXPath}//tbody`)); } diff --git a/src/test/Settings/__snapshots__/AutoRefresh.test.tsx.snap b/src/test/Settings/__snapshots__/AutoRefresh.test.tsx.snap index b0592a727..9fbdda044 100644 --- a/src/test/Settings/__snapshots__/AutoRefresh.test.tsx.snap +++ b/src/test/Settings/__snapshots__/AutoRefresh.test.tsx.snap @@ -33,7 +33,7 @@ Array [ className="pf-v5-l-split__item" >