Skip to content

Commit

Permalink
Improve the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thesan committed Feb 6, 2024
1 parent b4b13b7 commit 6c4f3d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ export const SpecificParametersUpdatePalletFrozenStatus: Story = {
await createProposal(async () => {
const nextButton = getButtonByText(modal, 'Create proposal')

await userEvent.click(modal.getByTestId('crt-feature-select'))
await userEvent.click(modal.getByText('Enable'))
expect(
await modal.findByText(
/The ProjectToken pallet is currently enabled, so presently this proposal would fail due to execution constraints./
Expand All @@ -1431,7 +1431,7 @@ export const SpecificParametersUpdatePalletFrozenStatus: Story = {
expect(await modal.findByText(/Warning/))
expect(nextButton).toBeDisabled()

await userEvent.click(modal.getByTestId('crt-feature-select'))
await userEvent.click(modal.getByText('Disable'))
await waitFor(() => expect(nextButton).toBeEnabled())
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@ export const UpdatePalletFrozenStatus = () => {
<Row>
<InlineToggleWrap>
<Label>Creator Tokens</Label>
<ToggleCheckbox
falseLabel="Disable"
trueLabel="Enable"
name="updatePalletFrozenStatus.enable"
id="crt-feature-select"
/>
<ToggleCheckbox falseLabel="Disable" trueLabel="Enable" name="updatePalletFrozenStatus.enable" />
<Tooltip tooltipText="You have the flexibility to enable or disable CRT feature.">
<TooltipDefault />
</Tooltip>
Expand Down

0 comments on commit 6c4f3d6

Please sign in to comment.