mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
console: fix ET e2e cypress test
This PR fixes the e2e tests for ET. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9584 GitOrigin-RevId: 39189f6a8d0819f71d09e8dddfedb8656947708d
This commit is contained in:
parent
27b13fb679
commit
c55aa10515
@ -117,14 +117,14 @@ describe('Create event trigger with shortest possible path', () => {
|
||||
cy.log(
|
||||
'**--- Click on Edit trigger operation and modfiy the trigger operation'
|
||||
);
|
||||
cy.findAllByRole('button', { name: 'Edit' }).eq(1).click();
|
||||
cy.get('[data-test=edit-operations]').click();
|
||||
cy.get('[name=update]').click();
|
||||
cy.get('[name=column-id]').click();
|
||||
cy.findByRole('button', { name: 'Save' }).click();
|
||||
|
||||
// modify the retry config
|
||||
cy.log('**--- Click on Edit retry config and modify the config');
|
||||
cy.findAllByRole('button', { name: 'Edit' }).eq(1).click();
|
||||
cy.get('[data-test=edit-retry-config]').click();
|
||||
cy.get('[name=num_retries]').clear().type('10');
|
||||
cy.get('[name=interval_sec]').clear().type('5');
|
||||
cy.get('[name=timeout_sec]').clear().type('70');
|
||||
@ -132,7 +132,7 @@ describe('Create event trigger with shortest possible path', () => {
|
||||
|
||||
// add headers
|
||||
cy.log('**--- Click on Edit retry config and add header');
|
||||
cy.findAllByRole('button', { name: 'Edit' }).eq(2).click();
|
||||
cy.get('[data-test=edit-header]').click();
|
||||
cy.findByPlaceholderText('key').type('x-hasura-user-id');
|
||||
cy.findByPlaceholderText('value').type('1234');
|
||||
cy.findByRole('button', { name: 'Save' }).click();
|
||||
|
@ -45,6 +45,8 @@ class Editor extends React.Component {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { dataTest } = this.props;
|
||||
|
||||
return (
|
||||
<Button
|
||||
mode="default"
|
||||
@ -52,6 +54,7 @@ class Editor extends React.Component {
|
||||
className="mr-sm"
|
||||
onClick={this.toggleEditor}
|
||||
disabled={readOnlyMode}
|
||||
data-test={dataTest}
|
||||
>
|
||||
{isEditing ? collapseButtonText || 'Close' : expandButtonText || 'Edit'}
|
||||
</Button>
|
||||
|
@ -86,6 +86,7 @@ const HeadersEditor = (props: HeaderEditorProps) => {
|
||||
property="headers"
|
||||
service="modify-trigger"
|
||||
saveFunc={save}
|
||||
dataTest="edit-header"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
@ -187,6 +187,7 @@ export const OperationEditor: React.FC<OperationEditorProps> = props => {
|
||||
service="modify-trigger"
|
||||
saveFunc={save}
|
||||
expandCallback={reset}
|
||||
dataTest="edit-operations"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -66,6 +66,7 @@ const RetryConfEditor = (props: RetryConfEditorProps) => {
|
||||
saveFunc={save}
|
||||
service="modify-trigger"
|
||||
expandCallback={reset}
|
||||
dataTest="edit-retry-config"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user