Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue-book test #1548

Open
asvae opened this issue Mar 10, 2022 · 1 comment
Open

vue-book test #1548

asvae opened this issue Mar 10, 2022 · 1 comment
Labels
blocked Blocked by another issue d3: medium No cheats. Monsters a bit faster. implementation Requires implementation tests Refers to testing v3: wish to have This is something user want, but can live without it

Comments

@asvae
Copy link
Member

asvae commented Mar 10, 2022

The idea is to have an automated test, that would go through vue-book and check there are no errors on any of the pages. This is meant as a relatively low effort test, as it's a singular effort that will require very little support in the future.

We might not keep this test in CI and run it before release for now.

  • We have e2e folder with cypress attached, that might be a good point to start.
  • Ideally we want that to be done in context of circleci (delegate that or move to another task if too big for one task).
  • Documenting our e2e approach in notion would be a great boon as well.

Here's implementation from different project, we might be able to reuse it (done for playwright, but should be similar enough for cypress):

const browser = await create_spec_browser();
const context = await browser.newContext();
const page = await context.newPage();
page.setViewportSize(default_viewport);
await page.goto(book_endpoint)

let errorCount = 0
let currentDemo = ''
page.on('console', msg => {
  if (msg.type() === 'error') {
    console.error(`${currentDemo}: ${msg.text()}`)
    errorCount++
  }
})

const files = await page.$$('.BookComponentListItem')
for (const index in files ) {
  await files[index].click()
  currentDemo = await files[index].textContent()
  await sleep(500)
}
expect(errorCount).toBe(0)
await sleep(5000)
@asvae asvae added tests Refers to testing implementation Requires implementation groomed labels Mar 10, 2022
@LighthouseKeeperYN LighthouseKeeperYN self-assigned this Mar 29, 2022
@LighthouseKeeperYN LighthouseKeeperYN removed their assignment May 15, 2022
@asvae asvae removed the groomed label Jun 8, 2022
@asvae
Copy link
Member Author

asvae commented Feb 28, 2023

We can wait for #2924 before that.

@asvae asvae added v3: wish to have This is something user want, but can live without it d3: medium No cheats. Monsters a bit faster. blocked Blocked by another issue labels Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by another issue d3: medium No cheats. Monsters a bit faster. implementation Requires implementation tests Refers to testing v3: wish to have This is something user want, but can live without it
Projects
No open projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants