Skip to content

Commit

Permalink
Lint & Fix CS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
carstingaxion committed Aug 18, 2024
1 parent 3aab03d commit 45fdc50
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 36 deletions.
1 change: 0 additions & 1 deletion test/e2e/tests/editor/blocks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
const { test, expect } = require('@wordpress/e2e-test-utils-playwright');

test.describe('Blocks & Patterns in the Editor', () => {

test.beforeEach(async ({ admin }) => {
await admin.createNewPost();
});
Expand Down
23 changes: 11 additions & 12 deletions test/e2e/tests/editor/events.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
const { test } = require('@wordpress/e2e-test-utils-playwright');

test.describe('Events in the Editor', () => {

let eventTitle: string;
const currentDate = new Date().toISOString().split('T')[0]; // format YYYY-MM-DD

test.beforeEach(async ({ admin, page }) => {

await admin.createNewPost({ postType: 'gatherpress_venue', title: 'Offline Event Location' });
await admin.createNewPost({
postType: 'gatherpress_venue',
title: 'Offline Event Location',
});
await admin.createNewPost({ postType: 'gatherpress_event' });

await page
Expand All @@ -21,19 +22,16 @@ test.describe('Events in the Editor', () => {
await page.getByRole('heading', { name: 'Date & time' }).isVisible();

// Open the Document -> Event settings panel.
const panelToggle = page.getByRole( 'button', {
const panelToggle = page.getByRole('button', {
name: 'Event settings',
} );
});

if (
( await panelToggle.getAttribute( 'aria-expanded' ) ) === 'false'
) {
if ((await panelToggle.getAttribute('aria-expanded')) === 'false') {
await panelToggle.click();
}
});

test.afterEach(async ({ page, requestUtils }) => {

// Click again to close the element, to let upcoming tests not get flaky.
await page.getByRole('button', { name: 'Event settings' }).click();

Expand Down Expand Up @@ -70,17 +68,18 @@ test.describe('Events in the Editor', () => {
.fill('www.google.com');
});


test('An admin should be able to publish an offline event', async ({
page,
}) => {
await page.getByLabel('Venue Selector').selectOption('Offline Event Location');
await page
.getByLabel('Venue Selector')
.selectOption('Offline Event Location');

Check failure on line 76 in test/e2e/tests/editor/events.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests

[chromium] › editor/events.spec.ts:71:2 › Events in the Editor › An admin should be able to publish an offline event

1) [chromium] › editor/events.spec.ts:71:2 › Events in the Editor › An admin should be able to publish an offline event TimeoutError: locator.selectOption: Timeout 10000ms exceeded. Call log: - waiting for getByLabel('Venue Selector') - locator resolved to <select id="inspector-select-control-1" class="components-select-control__input css-l4hgcf e1mv6sxx2">…</select> - attempting select option action - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #1 - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #2 - waiting 20ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #3 - waiting 100ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #4 - waiting 100ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #5 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #6 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #7 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #8 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #9 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #10 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #11 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #12 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #13 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #14 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #15 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #16 - waiting 500ms 74 | await page 75 | .getByLabel('Venue Selector') > 76 | .selectOption('Offline Event Location'); | ^ 77 | eventTitle = await page 78 | .getByLabel('Add title') 79 | .fill(`offline T-Event:${currentDate}`); at /home/runner/work/gatherpress/gatherpress/test/e2e/tests/editor/events.spec.ts:76:5

Check failure on line 76 in test/e2e/tests/editor/events.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests

[chromium] › editor/events.spec.ts:71:2 › Events in the Editor › An admin should be able to publish an offline event

1) [chromium] › editor/events.spec.ts:71:2 › Events in the Editor › An admin should be able to publish an offline event Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.selectOption: Timeout 10000ms exceeded. Call log: - waiting for getByLabel('Venue Selector') - locator resolved to <select id="inspector-select-control-1" class="components-select-control__input css-l4hgcf e1mv6sxx2">…</select> - attempting select option action - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #1 - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #2 - waiting 20ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #3 - waiting 100ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #4 - waiting 100ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #5 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #6 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #7 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #8 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #9 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #10 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #11 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #12 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #13 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #14 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #15 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #16 - waiting 500ms 74 | await page 75 | .getByLabel('Venue Selector') > 76 | .selectOption('Offline Event Location'); | ^ 77 | eventTitle = await page 78 | .getByLabel('Add title') 79 | .fill(`offline T-Event:${currentDate}`); at /home/runner/work/gatherpress/gatherpress/test/e2e/tests/editor/events.spec.ts:76:5

Check failure on line 76 in test/e2e/tests/editor/events.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests

[chromium] › editor/events.spec.ts:71:2 › Events in the Editor › An admin should be able to publish an offline event

1) [chromium] › editor/events.spec.ts:71:2 › Events in the Editor › An admin should be able to publish an offline event Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.selectOption: Timeout 10000ms exceeded. Call log: - waiting for getByLabel('Venue Selector') - locator resolved to <select id="inspector-select-control-1" class="components-select-control__input css-l4hgcf e1mv6sxx2">…</select> - attempting select option action - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #1 - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #2 - waiting 20ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #3 - waiting 100ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #4 - waiting 100ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #5 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #6 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #7 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #8 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #9 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #10 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #11 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #12 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #13 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #14 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #15 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #16 - waiting 500ms 74 | await page 75 | .getByLabel('Venue Selector') > 76 | .selectOption('Offline Event Location'); | ^ 77 | eventTitle = await page 78 | .getByLabel('Add title') 79 | .fill(`offline T-Event:${currentDate}`); at /home/runner/work/gatherpress/gatherpress/test/e2e/tests/editor/events.spec.ts:76:5

Check failure on line 76 in test/e2e/tests/editor/events.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests

[firefox] › editor/events.spec.ts:71:2 › Events in the Editor › An admin should be able to publish an offline event

2) [firefox] › editor/events.spec.ts:71:2 › Events in the Editor › An admin should be able to publish an offline event TimeoutError: locator.selectOption: Timeout 10000ms exceeded. Call log: - waiting for getByLabel('Venue Selector') - locator resolved to <select id="inspector-select-control-1" class="components-select-control__input css-l4hgcf e1mv6sxx2">…</select> - attempting select option action - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #1 - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #2 - waiting 20ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #3 - waiting 100ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #4 - waiting 100ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #5 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #6 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #7 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #8 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #9 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #10 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #11 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #12 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #13 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #14 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #15 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #16 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #17 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #18 - waiting 500ms 74 | await page 75 | .getByLabel('Venue Selector') > 76 | .selectOption('Offline Event Location'); | ^ 77 | eventTitle = await page 78 | .getByLabel('Add title') 79 | .fill(`offline T-Event:${currentDate}`); at /home/runner/work/gatherpress/gatherpress/test/e2e/tests/editor/events.spec.ts:76:5

Check failure on line 76 in test/e2e/tests/editor/events.spec.ts

View workflow job for this annotation

GitHub Actions / e2e-tests

[firefox] › editor/events.spec.ts:71:2 › Events in the Editor › An admin should be able to publish an offline event

2) [firefox] › editor/events.spec.ts:71:2 › Events in the Editor › An admin should be able to publish an offline event Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.selectOption: Timeout 10000ms exceeded. Call log: - waiting for getByLabel('Venue Selector') - locator resolved to <select id="inspector-select-control-1" class="components-select-control__input css-l4hgcf e1mv6sxx2">…</select> - attempting select option action - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #1 - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #2 - waiting 20ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #3 - waiting 100ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #4 - waiting 100ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #5 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #6 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #7 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #8 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #9 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #10 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #11 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #12 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #13 - waiting 500ms - waiting for element to be visible and enabled - did not find some options - retrying select option action, attempt #14 - waiting 500ms 74 | await page 75 | .getByLabel('Venue Selector') > 76 | .selectOption('Offline Event Location'); | ^ 77 | eventTitle = await page 78 | .getByLabel('Add title') 79 | .fill(`offline T-Event:${currentDate}`); at /home/runner/work/gatherpress/gatherpress/test/e2e/tests/editor/events.spec.ts:76:5
eventTitle = await page
.getByLabel('Add title')
.fill(`offline T-Event:${currentDate}`);
});

/*
/*
test('A user should be able to publish an online event', async ({
page,
}) => {
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/tests/editor/venues.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
const { test } = require('@wordpress/e2e-test-utils-playwright');

test.describe('Venues in the Editor', () => {

test.beforeEach(async ({ admin }) => {
await admin.createNewPost({ postType: 'gatherpress_venue' });
});
Expand All @@ -14,7 +13,6 @@ test.describe('Venues in the Editor', () => {
});

test('The admin should be able to create a new Venue.', async ({
admin,
page,
}) => {
await page.getByLabel('Add title').isVisible();
Expand Down
8 changes: 1 addition & 7 deletions test/e2e/tests/frontend/rsvp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
const { test } = require('@wordpress/e2e-test-utils-playwright');

test.describe('RSVP to an event', () => {

/*
/*
test('02-verify the non-logged in user view RSVP button on home page and perform RSVP action', async ({
page,
}) => {
Expand Down Expand Up @@ -40,8 +39,6 @@ test.describe('RSVP to an event', () => {
.first()
.screenshot({ path: 'attending.png' });
}); */


/*
test('02-verify the logged in user view RSVP button on home page and perform RSVP action', async ({
page,
Expand Down Expand Up @@ -72,7 +69,4 @@ test.describe('RSVP to an event', () => {
.first()
.screenshot({ path: 'attending.png' });
}); */

});


6 changes: 1 addition & 5 deletions test/e2e/tests/site-editor/templates.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@
const { test } = require('@wordpress/e2e-test-utils-playwright');

test.describe('Templates', () => {

test('The events template can be edited', async ({
admin,
}) => {
test('The events template can be edited', async ({ admin }) => {
await admin.visitSiteEditor({
postId: 'twentytwentyfour//single-gatherpress_event',
postType: 'wp_template',
canvas: 'edit',
showWelcomeGuide: false,
});

});
});
13 changes: 4 additions & 9 deletions test/e2e/tests/wp-admin/settings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
const { test, expect } = require('@wordpress/e2e-test-utils-playwright');

test.describe('Settings', () => {

test('A link to the plugin settings page is present under the Events menu', async ({
page,
admin,
Expand All @@ -14,14 +13,10 @@ test.describe('Settings', () => {
const menu = page.locator('li', {
has: page.getByRole('link', { name: 'Events' }),
});
const settingsMenu = menu.getByRole(
'link',
{
name: 'Settings',
}
);
const settingsMenuUrl =
await settingsMenu.getAttribute('href');
const settingsMenu = menu.getByRole('link', {
name: 'Settings',
});
const settingsMenuUrl = await settingsMenu.getAttribute('href');

await expect(settingsMenu).toBeVisible();
await expect(settingsMenuUrl).toContain(
Expand Down

0 comments on commit 45fdc50

Please sign in to comment.