Skip to content

Commit

Permalink
Merge pull request #16 from cardanoapi/refactor/convention-organizers
Browse files Browse the repository at this point in the history
Refactor/convention organizers
  • Loading branch information
kneerose authored Nov 12, 2024
2 parents 921d6c9 + 459d507 commit c7872fc
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 112 deletions.
14 changes: 13 additions & 1 deletion integration_test/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default defineConfig({
/* Retry on CI only */
retries: environments.ci ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? parseInt(process.env.TEST_WORKERS || '1' ) : 1,
workers: process.env.CI ? parseInt(process.env.TEST_WORKERS || '1') : 1,
/*use Allure Playwright's testPlanFilter() to determine the grep parameter*/
grep: testPlanFilter(),
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
Expand All @@ -40,14 +40,26 @@ export default defineConfig({

/* Configure projects for major browsers */
projects: [
{
name: 'auth setup',
testMatch: '**/auth.setup.ts',
},
{
name: 'loggedin (desktop)',
use: { ...devices['Desktop Chrome'] },
testMatch: '**/*.loggedin.spec.ts',
dependencies: environments.ci ? ['auth setup'] : [],
},
{
name: 'independent (desktop)',
use: { ...devices['Desktop Chrome'] },
testIgnore:['**/*.loggedin.spec.ts'],
},

{
name: 'mobile',
use: { ...devices['Pixel 5'] },
testIgnore:['**/*.loggedin.spec.ts'],
},

/* Test against mobile viewports. */
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import { organizerWallet } from '@constants/staticWallets';
import { setAllureEpic } from '@helpers/allure';
import { CCVT } from '@mock/index';
import { expect } from '@playwright/test';
import { test } from '@fixtures/walletExtension';

test.beforeEach(async () => {
await setAllureEpic('1. Convention Organizers');
});

test.use({ storageState: '.auth/organizer.json', wallet: organizerWallet });

test.describe('Invitation', () => {
test('1B. Could invite delegates', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});
test('1C. Could invite alternates', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});
});

test.describe('Poll results', () => {
test('1A. Must not edit poll results.', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('1J. Must display vote count durin open poll.', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('1K. Should display vote count after poll ending.', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('1L. Must open polls only after delegates are ready.', async ({
page,
}) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('1M. Must close polls once voting is completed.', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});
});

test.describe('Delegate and Alternate Profile', () => {
test('1F. Must have access to update delegate and alternate profile', async ({
page,
}) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('1I. Must have access to create delegate and alternate profile', async ({
page,
}) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});
});

test.describe('Voting Power', () => {
test('1D. Should transfer voting power from delegate to alternate.', async ({
page,
}) => {
await page.goto('/');

await expect(page).toHaveTitle(CCVT.title);
});

test('1E. Should transfer voting power from alternate to delegate.', async ({
page,
}) => {
await page.goto('/');

await expect(page).toHaveTitle(CCVT.title);
});
});

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit c7872fc

Please sign in to comment.