diff --git a/playwright.config-local.ts b/playwright.config-local.ts index 73c78b7..0d48b5f 100644 --- a/playwright.config-local.ts +++ b/playwright.config-local.ts @@ -1,4 +1,4 @@ -import { defineConfig, devices } from '@playwright/test'; +import { defineConfig, devices } from "@playwright/test"; /** * Read environment variables from file. @@ -11,7 +11,7 @@ import { defineConfig, devices } from '@playwright/test'; * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ - testDir: './test-playwright', + testDir: "./test-playwright", /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ @@ -21,44 +21,44 @@ export default defineConfig({ /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: 'html', + reporter: "html", /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: 'http://localhost:8080', + baseURL: "http://localhost:8080", /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: 'on-first-retry', + trace: "on-first-retry", }, /* Configure projects for major browsers */ projects: [ { - name: 'chromium', + name: "chromium", use: { - ...devices['Desktop Chrome'], + ...devices["Desktop Chrome"], permissions: ["clipboard-read"], }, }, { - name: 'firefox', - use: { ...devices['Desktop Firefox'] }, + name: "firefox", + use: { ...devices["Desktop Firefox"] }, }, { - name: 'webkit', - use: { ...devices['Desktop Safari'] }, + name: "webkit", + use: { ...devices["Desktop Safari"] }, }, /* Test against mobile viewports. */ { - name: 'Mobile Chrome', - use: { ...devices['Pixel 5'] }, + name: "Mobile Chrome", + use: { ...devices["Pixel 5"] }, }, { - name: 'Mobile Safari', - use: { ...devices['iPhone 12'] }, + name: "Mobile Safari", + use: { ...devices["iPhone 12"] }, }, /* Test against branded browsers. */ @@ -67,8 +67,8 @@ export default defineConfig({ // use: { ...devices['Desktop Edge'], channel: 'msedge' }, // }, { - name: 'Google Chrome', - use: { ...devices['Desktop Chrome'], channel: 'chrome' }, + name: "Google Chrome", + use: { ...devices["Desktop Chrome"], channel: "chrome" }, }, ], diff --git a/src/components/OnboardingDialog.vue b/src/components/OnboardingDialog.vue index 0928f16..16c016b 100644 --- a/src/components/OnboardingDialog.vue +++ b/src/components/OnboardingDialog.vue @@ -41,6 +41,7 @@
@@ -154,7 +157,11 @@ import { Component, Vue } from "vue-facing-decorator"; import { NotificationIface } from "@/constants/app"; -import {db, retrieveSettingsForActiveAccount, updateAccountSettings} from "@/db/index"; +import { + db, + retrieveSettingsForActiveAccount, + updateAccountSettings, +} from "@/db/index"; import { OnboardPage } from "@/libs/util"; @Component({ diff --git a/src/views/HelpView.vue b/src/views/HelpView.vue index 39c010d..683d02c 100644 --- a/src/views/HelpView.vue +++ b/src/views/HelpView.vue @@ -562,7 +562,10 @@ import { useClipboard } from "@vueuse/core"; import * as Package from "../../package.json"; import QuickNav from "@/components/QuickNav.vue"; import { NotificationIface } from "@/constants/app"; -import {retrieveSettingsForActiveAccount, updateAccountSettings} from "@/db/index"; +import { + retrieveSettingsForActiveAccount, + updateAccountSettings, +} from "@/db/index"; @Component({ components: { QuickNav } }) export default class Help extends Vue { diff --git a/test-playwright/00-noid-tests.spec.ts b/test-playwright/00-noid-tests.spec.ts index c5d7016..23419e7 100644 --- a/test-playwright/00-noid-tests.spec.ts +++ b/test-playwright/00-noid-tests.spec.ts @@ -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(); diff --git a/test-playwright/20-create-project.spec.ts b/test-playwright/20-create-project.spec.ts index 45fdfc7..3bba4c5 100644 --- a/test-playwright/20-create-project.spec.ts +++ b/test-playwright/20-create-project.spec.ts @@ -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); diff --git a/test-playwright/25-create-project-x10.spec.ts b/test-playwright/25-create-project-x10.spec.ts index 89b29f9..d3b8875 100644 --- a/test-playwright/25-create-project-x10.spec.ts +++ b/test-playwright/25-create-project-x10.spec.ts @@ -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 diff --git a/test-playwright/30-record-gift.spec.ts b/test-playwright/30-record-gift.spec.ts index 391ce71..fc06a9f 100644 --- a/test-playwright/30-record-gift.spec.ts +++ b/test-playwright/30-record-gift.spec.ts @@ -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()); diff --git a/test-playwright/33-record-gift-x10.spec.ts b/test-playwright/33-record-gift-x10.spec.ts index 5e91673..08f0a74 100644 --- a/test-playwright/33-record-gift-x10.spec.ts +++ b/test-playwright/33-record-gift-x10.spec.ts @@ -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()); diff --git a/test-playwright/40-add-contact.spec.ts b/test-playwright/40-add-contact.spec.ts index 8e9c24b..ba565b3 100644 --- a/test-playwright/40-add-contact.spec.ts +++ b/test-playwright/40-add-contact.spec.ts @@ -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 diff --git a/test-playwright/50-record-offer.spec.ts b/test-playwright/50-record-offer.spec.ts index 56120ae..60bffd1 100644 --- a/test-playwright/50-record-offer.spec.ts +++ b/test-playwright/50-record-offer.spec.ts @@ -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