Skip to content

Commit

Permalink
e2e-test: rename back to areas (#5765)
Browse files Browse the repository at this point in the history
I know, I'm a flip-flopper, but I think this is the right move as our
verbiage is `areas` everywhere else.
  • Loading branch information
midleman authored Dec 17, 2024
1 parent 4dc2ce6 commit 1df88e1
Show file tree
Hide file tree
Showing 64 changed files with 17 additions and 12 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"out-vscode-reh/**": true,
"extensions/**/dist/**": true,
"extensions/**/out/**": true,
"test/e2e/out/**": true,
"test/smoke/out/**": true,
"test/automation/out/**": true,
"test/integration/browser/out/**": true
Expand Down
6 changes: 5 additions & 1 deletion build/secrets/.secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@
"path": "detect_secrets.filters.common.is_baseline_file",
"filename": "build/secrets/.secrets.baseline"
},
{
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
"min_level": 2
},
{
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
},
Expand Down Expand Up @@ -1940,5 +1944,5 @@
}
]
},
"generated_at": "2024-12-16T16:39:50Z"
"generated_at": "2024-12-16T22:03:58Z"
}
4 changes: 2 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -1269,10 +1269,10 @@ export default tseslint.config(
'local/code-import-patterns': [
'warn',
{
'target': 'test/smoke/**',
'target': 'test/e2e/**',
'restrictions': [
'test/automation',
'test/smoke/**',
'test/e2e/**',
'@vscode/*',
'@parcel/*',
'@playwright/*',
Expand Down
4 changes: 2 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
*--------------------------------------------------------------------------------------------*/

import { defineConfig } from '@playwright/test';
import { CustomTestOptions } from './test/e2e/features/_test.setup';
import { CustomTestOptions } from './test/e2e/areas/_test.setup';
import type { GitHubActionOptions } from '@midleman/github-actions-reporter';
import { currentsReporter } from '@currents/playwright';

/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig<CustomTestOptions>({
globalSetup: './test/e2e/features/_global.setup.ts',
globalSetup: './test/e2e/areas/_global.setup.ts',
testDir: './test/e2e',
testIgnore: '**/example.test.ts',
testMatch: '*.test.ts',
Expand Down
2 changes: 1 addition & 1 deletion scripts/slack-skipped-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { execSync } = require('child_process');
const slackSkippedTests = (slackWebhookUrl) => {
try {
const skippedTests = execSync(
`grep -r --include \\*.test.ts -E "describe\\.skip|test\\.skip" test/e2e/features | sed 's/\\.test\\.ts.*$/.test.ts/'`
`grep -r --include \\*.test.ts -E "describe\\.skip|test\\.skip" test/e2e/areas | sed 's/\\.test\\.ts.*$/.test.ts/'`
).toString();

const slackMessage = {
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ This document provides guidelines and setup instructions for effectively running

### Test Code Location

- `test/e2e/features`
- `test/e2e/areas`

For instance, the e2e tests for the help pane are at `test/e2e/features/help/help.test.ts`
For instance, the e2e tests for the help pane are at `test/e2e/areas/help/help.test.ts`

### Test Helpers Location

- General helpers dir: `test/automation/src`
- Positron helpers dir: `test/automation/src/positron`

For each area under test, there is typically a companion class that assists with locating and interacting with elements (similar to POM pattern). For instance, the e2e tests for the help pane are at `test/e2e/features/help/help.test.ts`
For each area under test, there is typically a companion class that assists with locating and interacting with elements (similar to POM pattern). For instance, the e2e tests for the help pane are at `test/e2e/areas/help/help.test.ts`

### Test Template

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ const { test: base, expect: playwrightExpect } = playwright;
import { join } from 'path';
import * as os from 'os';
import * as fs from 'fs';

import path = require('path');
// eslint-disable-next-line local/code-import-patterns
import { rename, rm, access, mkdir } from 'fs/promises';
import { constants } from 'fs';
import { randomUUID } from 'crypto';

// Third-party packages
import { randomUUID } from 'crypto';
import archiver from 'archiver';

// Local imports
import { createLogger, createApp, TestTags } from '../helpers';
import { Application, Logger, PositronPythonFixtures, PositronRFixtures, PositronUserSettingsFixtures, UserSetting } from '../../automation';

// Constants
const TEMP_DIR = `temp-${randomUUID()}`;
const ROOT_PATH = process.cwd();
const LOGS_ROOT_PATH = join(ROOT_PATH, 'test-logs');
let SPEC_NAME = '';
let fixtureScreenshot: Buffer;

// Test fixtures
export const test = base.extend<TestFixtures, WorkerFixtures>({
suiteId: ['', { scope: 'worker', option: true }],

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1df88e1

Please sign in to comment.