Skip to content

Commit

Permalink
Create scaffold for different users
Browse files Browse the repository at this point in the history
  • Loading branch information
Sital999 committed Nov 8, 2024
1 parent 0cf8788 commit ddc059e
Show file tree
Hide file tree
Showing 14 changed files with 219 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { setAllureEpic } from '@helpers/allure';
import { CCVT } from '@mock/index';
import { expect, test } from '@playwright/test';

test.beforeEach(async () => {
await setAllureEpic('2. Constitutional Delegates');
});

test.describe('Delegate Registration', () => {
test('2E. Must be able to view their registration status', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

});

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

test.beforeEach(async () => {
await setAllureEpic('2. Constitutional Delegates');
});

test.describe('Delegate View Vote', () => {

test('2F. Must be able to view vote result and its count', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('2G. Must be able to view own vote during open poll', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('2I. Should not be able to view poll result before poll closing', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});
});

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

test.beforeEach(async () => {
await setAllureEpic('2. Constitutional Delegates');
});

test.describe('Delegate Vote', () => {
test('2A. Must be able to vote No so that poll reruns', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('2B. Must be able to vote No, Yes or Abstain', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('2C. Must be able to choose not to vote', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});
test('2D. Should be able to vote remotely', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('2H. Should be able to change vote during open poll', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('2J. Must have only one vote per poll', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

});

17 changes: 17 additions & 0 deletions integration_test/tests/3-alternates/alternate.registration.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { setAllureEpic } from '@helpers/allure';
import { CCVT } from '@mock/index';
import { expect, test } from '@playwright/test';

test.beforeEach(async () => {
await setAllureEpic('3. Alternates');
});

test.describe('Alternate Registration', () => {

test('3A. Must be able to view their registration status', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

});

22 changes: 22 additions & 0 deletions integration_test/tests/3-alternates/alternates.viewvote.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { setAllureEpic } from '@helpers/allure';
import { CCVT } from '@mock/index';
import { expect, test } from '@playwright/test';

test.beforeEach(async () => {
await setAllureEpic('3. Alternates');
});

test.describe('Alternate View Vote', () => {

test('3C. Must be able to view vote result and its count.', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('3D. Must be able to view own vote during open poll', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

});

26 changes: 26 additions & 0 deletions integration_test/tests/3-alternates/alternates.vote.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { setAllureEpic } from '@helpers/allure';
import { CCVT } from '@mock/index';
import { expect, test } from '@playwright/test';

test.beforeEach(async () => {
await setAllureEpic('3. Alternates');
});

test.describe('Alternate Vote', () => {

test('3A. Must not be able to vote while delegate is present.', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('3E. Should be able to change vote during open poll', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('3F. Must have only one vote per poll', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});
});

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

test.beforeEach(async () => {
await setAllureEpic('4. Community Members');
});

test.describe('View Poll Status', () => {

test('4G. Must be able to view vote result and its count.', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

});

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

test.beforeEach(async () => {
await setAllureEpic('4. Community Members');
});

test.describe('View Voter Profile', () => {

test('4C. Must be able to view voters profile.', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});


test('4D. Must be able to view delegate workspace name in profile.', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('4E. Could associate email with delegate profiles.', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('4F. Must have vote data linked to voter profile.', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

test('4I. Should be able to view public information of voter.', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

});

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

test.beforeEach(async () => {
await setAllureEpic('4. Community Members');
});

test.describe('View Vote Status', () => {

test('4H. Should be able to view poll status', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(CCVT.title);
});

});

0 comments on commit ddc059e

Please sign in to comment.