Skip to content

Commit

Permalink
Fix for CS
Browse files Browse the repository at this point in the history
  • Loading branch information
carstingaxion committed Oct 7, 2024
1 parent a1f8574 commit d46fc40
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
18 changes: 6 additions & 12 deletions test/e2e/tests/editor/events.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('Events in the Editor', () => {

let venueSelector;

test.beforeEach(async ({ admin, page }) => {
Expand All @@ -13,16 +12,14 @@ test.describe('Events in the Editor', () => {

venueSelector = await page.getByLabel('Venue Selector');
venueSelector.waitFor();
await expect( venueSelector ).toBeVisible();
await expect(venueSelector).toBeVisible();
});

test('An admin should be able to publish an online event', async ({
editor,
page,
pageUtils,
// pageUtils,
}) => {


await venueSelector.selectOption('Online event');
await page
.getByPlaceholder('Add link to online event')
Expand All @@ -32,9 +29,8 @@ test.describe('Events in the Editor', () => {
// await pageUtils.pressKeys( 'primary+s' );
await page.reload();

await expect( venueSelector ).toBeVisible();
await expect( venueSelector ).toHaveText( 'Online event' );

await expect(venueSelector).toBeVisible();
await expect(venueSelector).toHaveText('Online event');
});

test('An admin should be able to publish an offline event', async ({
Expand All @@ -47,9 +43,7 @@ test.describe('Events in the Editor', () => {
// await pageUtils.pressKeys( 'primary+s' );
await page.reload();

await expect( venueSelector ).toBeVisible();
await expect( venueSelector ).toHaveText( 'Turin' );

await expect(venueSelector).toBeVisible();
await expect(venueSelector).toHaveText('Turin');
});

});
6 changes: 4 additions & 2 deletions test/e2e/tests/frontend/rsvp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
const { test, expect } = require('@wordpress/e2e-test-utils-playwright');

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

test('A logged in user can perform RSVP action', async ({ page }) => {
await page.goto('/');
// Be explicit witn the header,
// because "TT5" has an "Events" demo link in its footer.
await page.locator('header').getByRole('link', { name: 'Events' }).click({ force: true }); // Imported from of https://github.com/GatherPress/gatherpress-demo-data
await page
.locator('header')
.getByRole('link', { name: 'Events' })
.click({ force: true }); // Imported from of https://github.com/GatherPress/gatherpress-demo-data

await page
.getByRole('link', { name: 'RSVP' })
Expand Down

0 comments on commit d46fc40

Please sign in to comment.