Skip to content

Commit

Permalink
Fixes ESLint problems
Browse files Browse the repository at this point in the history
  • Loading branch information
elsamaryv committed Nov 8, 2024
1 parent 7572497 commit 05633ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions app/javascript/components/miq-ae-class/class-form.schema.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { componentTypes, validatorTypes } from '@@ddf';
import { IsRequired } from '@data-driven-forms/carbon-component-mapper';

const createSchema = (fqname) => ({
fields: [
Expand All @@ -11,7 +10,7 @@ const createSchema = (fqname) => ({
initialValue: fqname,
maxLength: 128,
validate: [{ type: validatorTypes.REQUIRED }],
isReadOnly: true,
isReadOnly: true,
},
{
component: componentTypes.TEXT_FIELD,
Expand Down
5 changes: 3 additions & 2 deletions app/javascript/components/miq-ae-class/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ const MiqAeClass = ({ classRecord, fqname }) => {
});
} else {
const initialValues = {
fqname: fqname,
fqname,
name: classRecord && classRecord.name,
display_name: classRecord && classRecord.display_name,
description: classRecord && classRecord.description
description: classRecord && classRecord.description,
};
setData({ ...data, isLoading: false, initialValues });
}
Expand Down Expand Up @@ -149,6 +149,7 @@ MiqAeClass.propTypes = {
display_name: PropTypes.string,
description: PropTypes.string,
}),
fqname: PropTypes.string.isRequired,
};

MiqAeClass.defaultProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ describe('Automation > Embedded Automate > Explorer', () => {
});

describe('Class Form', () => {

it('Creates and edits an automate class', () => {
// Creates a Domain
cy.get('[title="Datastore"]').click({force: true});
Expand All @@ -43,7 +42,7 @@ describe('Automation > Embedded Automate > Explorer', () => {
cy.get('[name="name"]').type('TestNS');
cy.get('[name="description"]').type('This is a test NS');
cy.get('.bx--btn--primary').contains('Add').click(); // submits Namespace

// Creates a Class
cy.get('[title="Datastore"]').click({force: true});
cy.get('[title="Automate Domain: TestDomain"]').click({force: true}); // clicks on Domain
Expand All @@ -57,7 +56,7 @@ describe('Automation > Embedded Automate > Explorer', () => {
// checks for the success message
cy.get('#flash_msg_div .alert.alert-success').should('exist')
.and('be.visible').and('contain', 'Class "TestClass" was added');

// Edits a class
cy.get('[title="Automate Class: TC (TestClass)"]').click({force: true}); // clicks on the class
cy.get('[title="Configuration"]').click({force: true});
Expand Down

0 comments on commit 05633ed

Please sign in to comment.