E2E tests (#6717)
Continuation of #6644 Now chromium browser is used in workspaces tests instead of firefox and screenshots after each test are properly saved in one folder when run from IDE and from terminal using `yarn test:e2e` command
This commit is contained in:
19
packages/twenty-e2e-testing/tests/companies.spec.ts
Normal file
19
packages/twenty-e2e-testing/tests/companies.spec.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { test, expect } from '../lib/fixtures/screenshot';
|
||||
import { config } from 'dotenv';
|
||||
import path = require('path');
|
||||
config({ path: path.resolve(__dirname, '..', '.env') });
|
||||
|
||||
test.describe('Basic check', () => {
|
||||
test('Checking if table in Companies is visible', async ({ page }) => {
|
||||
await expect(page.getByTestId('tooltip').nth(0)).toHaveText('Companies');
|
||||
await expect(page.getByTestId('tooltip').nth(0)).toBeVisible();
|
||||
expect(page.url()).toContain('/companies');
|
||||
await expect(page.locator('table')).toBeVisible();
|
||||
await expect(page.locator('tbody > tr')).toHaveCount(13); // shouldn't be hardcoded in case of tests on demo
|
||||
});
|
||||
|
||||
test('', async ({ page }) => {
|
||||
await page.getByRole('link', { name: 'Opportunities' }).click();
|
||||
await expect(page.locator('table')).toBeVisible();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user