Skip to content

Commit

Permalink
add graph test
Browse files Browse the repository at this point in the history
  • Loading branch information
Anchel123 committed Apr 9, 2024
1 parent 44fe5e7 commit 5c947d2
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions e2e/graph.spec.ts
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();
});

0 comments on commit 5c947d2

Please sign in to comment.