πŸš€ Socket Launch Week πŸš€ Day 4: Introducing Historical Analytics.Learn More β†’
Socket
Sign inDemoInstall
Socket

@instructure/ui-test-locator

Package Overview
Dependencies
Maintainers
40
Versions
1287
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instructure/ui-test-locator

A locator component for finding components by their defined selector in tests.

10.16.1
latest
Source
npm
Version published
Maintainers
40
Created
Source

category: packages

ui-test-locator

npm MIT License Code of Conduct

A locator component for finding components by their defined selector in tests.

Installation

npm install @instructure/ui-test-locator

Usage

---
  type: code
---
// MyComponent.js
import { testable } from '@instructure/ui-testable'

@testable()
export class MyComponent extends React.Component {
  ...
}

// MyComponentLocator.js
import { locator } from '@instructure/ui-test-locator'
import { MyComponent } from './MyComponent'

export const MyComponentLocator = locator(MyComponent.selector)

// MyComponent.test.js
import { MyComponent } from './MyComponent'
import { MyComponentLocator } from './MyComponentLocator.js'

it('should render', () => {
  await mount(<MyComponent />)

  const myComponent = await MyComponentLocator.find()

  expect(myComponent).to.exist()
})

FAQs

Package last updated on 22 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts