Skip to content

Commit dee617d

Browse files
committed
wip
1 parent bae537f commit dee617d

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

tests/e2e/helpers/SnippetsTestHelper.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,17 @@ export class SnippetsTestHelper {
4949
* Fill the snippet form with the provided options
5050
*/
5151
async fillSnippetForm(options: SnippetFormOptions): Promise<void> {
52-
// Fill title
5352
await this.page.waitForSelector(SELECTORS.TITLE_INPUT);
5453
await this.page.fill(SELECTORS.TITLE_INPUT, options.name);
5554

56-
// Select snippet type
5755
if (options.type && options.type !== 'PHP') {
5856
await this.page.click(SELECTORS.SNIPPET_TYPE_SELECT);
5957
await this.page.click(`text=${SNIPPET_TYPES[options.type]}`);
6058
}
6159

62-
// Fill code
6360
await this.page.waitForSelector(SELECTORS.CODE_MIRROR_TEXTAREA);
6461
await this.page.fill(SELECTORS.CODE_MIRROR_TEXTAREA, options.code);
6562

66-
// Select location
6763
if (options.location) {
6864
await this.page.waitForSelector(SELECTORS.LOCATION_SELECT, { timeout: TIMEOUTS.SHORT });
6965
await this.page.click(SELECTORS.LOCATION_SELECT);

tests/e2e/helpers/constants.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
export const SELECTORS = {
2-
// Page elements
32
WPBODY_CONTENT: '#wpbody-content, .wrap, #wpcontent',
43
PAGE_TITLE: 'h1, .page-title',
54
ADD_NEW_BUTTON: '.page-title-action',
65

7-
// Form elements
86
TITLE_INPUT: '#title',
97
CODE_MIRROR_TEXTAREA: '.CodeMirror textarea',
108
SNIPPET_TYPE_SELECT: '#snippet-type-select-input',
119
LOCATION_SELECT: '.code-snippets-select-location',
1210

13-
// Messages
1411
SUCCESS_MESSAGE: '#message.notice',
1512
SUCCESS_MESSAGE_P: '#message.notice p',
1613

17-
// Buttons
1814
DELETE_CONFIRM_BUTTON: 'button.components-button.is-destructive.is-primary',
1915

20-
// Admin bar
2116
ADMIN_BAR: '#wpadminbar',
2217
} as const;
2318

0 commit comments

Comments
 (0)