Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@wssheldon
Copy link
Contributor

@wssheldon wssheldon commented Feb 6, 2023

@wssheldon wssheldon added enhancement New feature or request tests UI/UX javascript Pull requests that update Javascript code labels Feb 6, 2023
:sort-by.sync="sortBy"
:sort-desc.sync="descending"
:loading="loading"
data-testid="incident-data-table"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We may want to consider a single SOT for these data-testid strings as an Enum that we can use here and in tests Pages


async function register(authPage: AuthPage): Promise<void> {
let email = generateRandomString() + "@example.com"
let password = generateRandomString()

Check failure

Code scanning / CodeQL

Insecure randomness

This uses a cryptographically insecure random number generated at [Math.random()](1) in a security context.
@@ -0,0 +1,9 @@
export const orgSlug = "default"

export enum Routes {
Copy link
Contributor Author

@wssheldon wssheldon Feb 6, 2023

Choose a reason for hiding this comment

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

Would be nice if we could import these directly from the Vue router. I was unable to import the routes because of an issue with this line and others upon import (can't use this outside module, or similar error):

const authProviderSlug =
  import.meta.env.VITE_DISPATCH_AUTHENTICATION_PROVIDER_SLUG || "dispatch-auth-provider-basic"

readonly EditRunWorkflow: Locator
readonly EditDelete: Locator

constructor(page: Page, incident: string = `dispatch-${orgSlug}-${orgSlug}-2`) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The default incident here is a bit fragile to it being present in the table, there's probably a better way.

@wssheldon wssheldon merged commit ecc8d7a into master Feb 6, 2023
@wssheldon wssheldon deleted the tests/playwright-improvements branch February 6, 2023 17:49
@wssheldon wssheldon changed the title Refact E2E tests to use Page Object Model (POM), fixtures, and add additional tests Refactor E2E tests to use Page Object Model (POM), fixtures, and add additional tests Feb 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request javascript Pull requests that update Javascript code tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants