From d46735ceaa4367365ece5b39760820b31c7d50bc Mon Sep 17 00:00:00 2001 From: Anssi Juvonen Date: Fri, 13 Dec 2024 20:01:54 +0200 Subject: [PATCH] Don't show toasts in CI --- e2e/log.spec.ts | 6 ------ e2e/stats.spec.ts | 4 ---- src/components/ToastContainer.vue | 8 +------- src/stores/appStateStore.ts | 10 ++++++---- src/views/LogView.vue | 2 +- 5 files changed, 8 insertions(+), 22 deletions(-) diff --git a/e2e/log.spec.ts b/e2e/log.spec.ts index ce545eb..825151f 100644 --- a/e2e/log.spec.ts +++ b/e2e/log.spec.ts @@ -17,12 +17,6 @@ test('logs veggies', async ({page}) => { 'This Week 2 Veggies', ); - const elements = await page.getByTestId('toast-message').all(); - for (const element of elements) { - await element.click(); - } - - await expect(page.getByTestId('toast-message')).toBeHidden(); await page.getByTestId('navbar-link-settings').click(); await page.getByTestId('navbar-link-log').click(); await expect(page.getByTestId('category-status-chart-center-label')).toHaveText( diff --git a/e2e/stats.spec.ts b/e2e/stats.spec.ts index 02817a3..49007e9 100644 --- a/e2e/stats.spec.ts +++ b/e2e/stats.spec.ts @@ -7,10 +7,6 @@ test("shows current week's veggies", async ({page}) => { await page.getByText(/^apple$/).click(); await page.getByText('Apricot').click(); await page.getByText('Avocado').click(); - const elements = await page.getByTestId('toast-message').all(); - for (const element of elements) { - await element.click(); - } await page.getByTestId('navbar-link-stats').click(); await expect(page.getByTestId('tag-apple')).toBeVisible(); await expect(page.getByTestId('tag-apricot')).toBeVisible(); diff --git a/src/components/ToastContainer.vue b/src/components/ToastContainer.vue index 1cabd03..6d1a102 100644 --- a/src/components/ToastContainer.vue +++ b/src/components/ToastContainer.vue @@ -8,13 +8,7 @@ const {messages} = storeToRefs(appStateStore); const {removeToastMessage} = appStateStore;