forked from trent_larson/crowd-funder-for-time-pwa
adjust tests for new onboarding messages
This commit is contained in:
@@ -4,6 +4,7 @@ import { deleteContact, generateAndRegisterEthrUser, importUser } from './testUt
|
||||
test('Check activity feed', async ({ page }) => {
|
||||
// Load app homepage
|
||||
await page.goto('./');
|
||||
await page.getByTestId('closeOnboardingAndFinish').click();
|
||||
|
||||
// Check that initial 10 activities have been loaded
|
||||
await page.locator('ul#listLatestActivity li:nth-child(10)');
|
||||
@@ -75,6 +76,7 @@ test('Check ID generation', async ({ page }) => {
|
||||
test('Check setting name & sharing info', async ({ page }) => {
|
||||
// Load homepage to trigger ID generation (?)
|
||||
await page.goto('./');
|
||||
await page.getByTestId('closeOnboardingAndFinish').click();
|
||||
// Check 'someone must register you' notice
|
||||
await expect(page.getByText('someone must register you.')).toBeVisible();
|
||||
await page.getByRole('button', { name: /Show them/}).click();
|
||||
@@ -116,6 +118,7 @@ test('Check User 0 can register a random person', async ({ page }) => {
|
||||
expect(newDid).toContain('did:ethr:');
|
||||
|
||||
await page.goto('./');
|
||||
await page.getByTestId('closeOnboardingAndFinish').click();
|
||||
await page.getByRole('heading', { name: 'Unnamed/Unknown' }).click();
|
||||
await page.getByPlaceholder('What was given').fill('Gave me access!');
|
||||
await page.getByRole('button', { name: 'Sign & Send' }).click();
|
||||
|
||||
@@ -48,6 +48,7 @@ test('Create new project, then search for it', async ({ page }) => {
|
||||
|
||||
// Create new project
|
||||
await page.goto('./projects');
|
||||
await page.getByTestId('closeOnboardingAndFinish').click();
|
||||
await page.getByRole('link', { name: 'Projects', exact: true }).click();
|
||||
await page.locator('button > svg.fa-plus').click();
|
||||
await page.getByPlaceholder('Idea Name').fill(finalTitle);
|
||||
|
||||
@@ -42,6 +42,9 @@ test('Create 10 new projects', async ({ page }) => {
|
||||
// Create new projects
|
||||
for (let i = 0; i < projectCount; i++) {
|
||||
await page.goto('./projects');
|
||||
if (i === 0) {
|
||||
await page.getByTestId('closeOnboardingAndFinish').click();
|
||||
}
|
||||
await page.getByRole('link', { name: 'Projects', exact: true }).click();
|
||||
await page.getByRole('button').click();
|
||||
await page.getByPlaceholder('Idea Name').fill(finalTitles[i]); // Add random suffix
|
||||
|
||||
@@ -19,6 +19,7 @@ test('Record something given', async ({ page }) => {
|
||||
|
||||
// Record something given
|
||||
await page.goto('./');
|
||||
await page.getByTestId('closeOnboardingAndFinish').click();
|
||||
await page.getByRole('heading', { name: 'Unnamed/Unknown' }).click();
|
||||
await page.getByPlaceholder('What was given').fill(finalTitle);
|
||||
await page.getByRole('spinbutton').fill(randomNonZeroNumber.toString());
|
||||
|
||||
@@ -30,6 +30,9 @@ test('Record 9 new gifts', async ({ page }) => {
|
||||
for (let i = 0; i < giftCount; i++) {
|
||||
// Record something given
|
||||
await page.goto('./');
|
||||
if (i === 0) {
|
||||
await page.getByTestId('closeOnboardingAndFinish').click();
|
||||
}
|
||||
await page.getByRole('heading', { name: 'Unnamed/Unknown' }).click();
|
||||
await page.getByPlaceholder('What was given').fill(finalTitles[i]);
|
||||
await page.getByRole('spinbutton').fill(finalNumbers[i].toString());
|
||||
|
||||
@@ -49,6 +49,7 @@ test('Add contact, record gift, confirm gift', async ({ page }) => {
|
||||
|
||||
// Confirm that home shows contact in "Record Something…"
|
||||
await page.goto('./');
|
||||
await page.getByTestId('closeOnboardingAndFinish').click();
|
||||
await expect(page.locator('#sectionRecordSomethingGiven ul li').filter({ hasText: contactName }).nth(0)).toBeVisible();
|
||||
|
||||
// Record something given by new contact
|
||||
@@ -78,6 +79,7 @@ test('Add contact, record gift, confirm gift', async ({ page }) => {
|
||||
|
||||
// Go to home view and look for gift
|
||||
await page.goto('./');
|
||||
await page.getByTestId('closeOnboardingAndFinish').click();
|
||||
await page.locator('li').filter({ hasText: finalTitle }).locator('a').click();
|
||||
|
||||
// Confirm gift as user 00
|
||||
|
||||
@@ -14,6 +14,7 @@ test('Record an offer', async ({ page }) => {
|
||||
|
||||
// Select a project
|
||||
await page.goto('./discover');
|
||||
await page.getByTestId('closeOnboardingAndFinish').click();
|
||||
await page.locator('ul#listDiscoverResults li:nth-child(1)').click();
|
||||
|
||||
// Record an offer
|
||||
|
||||
Reference in New Issue
Block a user