-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { test } from '@playwright/test'; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto('http://localhost:3000/login'); | ||
await page.getByRole('button', { name: 'Connect' }).click(); | ||
await page.getByText('Select Graph...').click(); | ||
await page.getByRole('button', { name: 'Create new Graph...' }).click(); | ||
await page.getByPlaceholder('Graph name').fill('falkorDB'); | ||
await page.getByRole('button', { name: 'Create' }).click(); | ||
await page.waitForTimeout(2000) | ||
await page.getByPlaceholder('MATCH (n) OPTIONAL MATCH (n)').fill('CREATE (:Rider {name:\'Valentino Rossi\'})-[:rides]->(:Team {name:\'Yamaha\'}), (:Rider {name:\'Dani Pedrosa\'})-[:rides]->(:Team {name:\'Honda\'}), (:Rider {name:\'Andrea Dovizioso\'})-[:rides]->(:Team {name:\'Ducati\'})'); | ||
await page.getByRole('button').first().click(); | ||
await page.getByPlaceholder('MATCH (n) OPTIONAL MATCH (n)').click({ clickCount: 3 }); | ||
await page.getByPlaceholder('MATCH (n) OPTIONAL MATCH (n)').fill(''); | ||
}); | ||
|
||
test('delete graph', async ({ page }) => { | ||
await page.getByRole('button').nth(1).click(); | ||
await page.getByRole('button', { name: 'Delete graph' }).click(); | ||
await page.getByRole('button', { name: 'Delete' }).click(); | ||
await page.getByText('Select Graph...').click() | ||
}); | ||
|
||
test('tabs navigation', async ({ page }) => { | ||
await page.getByRole('button').first().click(); | ||
await page.getByRole('tab', {name: 'Graph'}).click(); | ||
await page.getByRole('tab', {name: 'Data'}).first().click(); | ||
await page.getByRole('tab', {name: 'Metadata'}).click(); | ||
}); |