-
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.
Merge pull request #162 from FalkorDB/e2e
fix #141 e2e
- Loading branch information
Showing
5 changed files
with
65 additions
and
21 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,13 @@ | ||
import { test } from '@playwright/test'; | ||
|
||
test('create graph', 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.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.getByText("falkorDB").first().click() | ||
}); |
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 { expect, 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(); | ||
}); |
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,18 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto('http://localhost:3000/'); | ||
}); | ||
|
||
test('connect', async ({ page }) => { | ||
await page.getByRole('button').click(); | ||
await page.waitForURL('http://localhost:3000/login'); | ||
expect(page.url()).toBe('http://localhost:3000/login'); | ||
|
||
}); | ||
|
||
test('themes', async ({ page }) => { | ||
await page.getByLabel('system mode').click(); | ||
await page.getByLabel('dark mode').click(); | ||
expect(page.getByLabel('light mode')).toBeVisible(); | ||
}); |
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 |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import { test } from '@playwright/test'; | ||
import { expect, test } from '@playwright/test'; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto('http://localhost:3000/'); | ||
await page.goto('http://localhost:3000/login'); | ||
}); | ||
|
||
test('connect', async ({ page }) => { | ||
test('login', async ({ page }) => { | ||
await page.getByRole('button', { name: 'Connect' }).click(); | ||
await page.getByRole('button', { name: 'Connect' }).click(); | ||
|
||
await page.getByText('Select Graph...').click(); | ||
await page.waitForURL("http://localhost:3000/graph"); | ||
expect(page.url()).toBe("http://localhost:3000/graph"); | ||
}); |
This file was deleted.
Oops, something went wrong.