Skip to content

test scripts for event scenarios#713

Merged
mauteri merged 9 commits intoGatherPress:mainfrom
prashantabellad:events
Jul 1, 2024
Merged

test scripts for event scenarios#713
mauteri merged 9 commits intoGatherPress:mainfrom
prashantabellad:events

Conversation

@01Prayag
Copy link
Copy Markdown
Contributor

@01Prayag 01Prayag commented Jun 28, 2024

Description of the Change

Test descriptions:

  1. the user should for publish the online event
  2. the user should for publish the offline event
  3. verify the logged in user view RSVP button on home page and perform RSVP action
  4. verify the non-logged in user view RSVP button on home page and perform RSVP action

How to test the Change

Changelog Entry

Added - New tests for event functionality
Security - Vulnerability

Credits

@prashantabellad , @01Prayag

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@01Prayag
Copy link
Copy Markdown
Contributor Author

01Prayag commented Jul 1, 2024

The test videos of creating event and perform the RSVP action
non loged in user perform rsvp.webm
logged in user perform rsvp.webm
create offline event.webm
create online event.webm


})

test('01-e2e test for publish the offline event', async({page})=>{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to publish" instead of "for publish"


const event_title = await page.getByLabel('Add title').fill(`online T-Event: ${currentDate}`);

await page.getByLabel('Block: Event Date').locator('div').nth(4).isVisible();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 4th? There should not be any need to use nth()

await page.getByRole('button', { name: 'Publish', exact: true }).click();
await page.getByLabel('Editor publish').getByRole('button', { name: 'Publish', exact: true }).click();

await page.getByText(`${event_title} is now live.`).isVisible({timeout:60000})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comment what is being asserted


await page.getByText('Attending').nth(1).isVisible({timeout:30000});

await page.locator('.gatherpress-rsvp-response__items').first().isVisible();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comment what is being asserted

const currentDate = new Date().toISOString().split('T')[0]; // format YYYY-MM-DD
const event_title = await page.getByLabel('Add title').fill(`offline T-Event:${currentDate}`);

await page.getByLabel('Block: Event Date').locator('div').nth(4).isVisible();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why nth() is used?

@mauteri mauteri merged commit 307ac29 into GatherPress:main Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants