Skip to content

Commit

Permalink
fix: added tests for the fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
pgagnidze committed Apr 21, 2023
1 parent cbc96a4 commit b3d35ae
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 179 deletions.
4 changes: 2 additions & 2 deletions src/OwloopsStringifyExtension.ts
Expand Up @@ -247,14 +247,14 @@ function filterArrayByString(selectors: Schema.Selector[], value: string) {

function handleSelectors(
selectors: Schema.Selector[],
flow: Schema.UserFlow
flow?: Schema.UserFlow
): string | undefined {
// Remove Aria selectors in favor of DOM selectors
const nonAriaSelectors = filterArrayByString(selectors, "aria/");
let preferredSelector;

// Give preference to user-specified selectors
if (flow.selectorAttribute) {
if (flow?.selectorAttribute) {
preferredSelector = filterArrayByString(
nonAriaSelectors,
flow.selectorAttribute
Expand Down
50 changes: 0 additions & 50 deletions test/LineWriterImpl.ts

This file was deleted.

0 comments on commit b3d35ae

Please sign in to comment.