Skip to content

Commit

Permalink
ci(e2e): fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
heristop committed Sep 23, 2024
1 parent 10f885b commit d26f04f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ onMounted(() => {
? 'bg-stone-200 dark:bg-stone-600'
: 'border border-dashed border-stone-200/75 hover:bg-stone-100 dark:hover:bg-stone-800',
]"
aria-label="Custom Configuration"
@click="activeTab = 'custom'"
>
Custom Configuration
Expand Down Expand Up @@ -515,8 +516,7 @@ onMounted(() => {
<TButton
:is-active="false"
:disabled="isConfigLoading"
class="mt-4 md:mt-0 bg-stone-100 dark:bg-stone-600 hover:bg-stone-200 dark:hover:bg-stone-500
border-stone-300 dark:border-stone-500 transition-all duration-300"
class="mt-4 md:mt-0 bg-stone-100 dark:bg-stone-600 hover:bg-stone-200 dark:hover:bg-stone-500border-stone-300 dark:border-stone-500 transition-all duration-300"
aria-label="Upload File"
@click="($refs.fileInput as HTMLInputElement).click()"
>
Expand Down
15 changes: 9 additions & 6 deletions tests/e2e/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,23 @@ test.describe('TreemapFlow Page Tests', () => {
await fileInput.setInputFiles('public/configs/bug-tracking.json')

// Click the button to trigger the file upload
/* await uploadFileButton.click();
// await uploadFileButton.click();

// Wait for a reasonable amount of time to ensure the file is uploaded and configuration is loaded
await page.waitForTimeout(5000);
// await page.waitForTimeout(5000);

// Add assertions to verify the file is uploaded and configuration is loaded
await expect(page.locator('text=File Config')).toBeVisible({ timeout: 10000 });
// await expect(page.locator('text=File Config')).toBeVisible({ timeout: 10000 });

const resetButton = page.locator('button[aria-label="Go to home"]')
await resetButton.click() */
// const resetButton = page.locator('button[aria-label="Go to home"]')
// await resetButton.click()
})

test('Load custom configuration from user input', async ({ page }) => {
const loadConfigButton = page.locator('button[aria-label="Load Sample Data"]')
const loadConfigTab = page.locator('button[aria-label="Custom Configuration"]')
await loadConfigTab.click()

const loadConfigButton = page.locator('button[aria-label="Load Custom Configuration"]')

// Click the button to load custom configuration from user input
await loadConfigButton.click()
Expand Down

0 comments on commit d26f04f

Please sign in to comment.