Skip to content

Commit

Permalink
fix: integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Suevalov committed Apr 24, 2020
1 parent 4684abd commit 927e3b4
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions cypress/integration/JsonEditor.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
describe('JSON Editor', () => {
const selectors = {
getInput: () => {
return cy.findByTestId('json-editor-code-mirror').get('textarea');
return cy.get('[data-test-id="json-editor-code-mirror"] textarea');
},
getCode: () => {
return cy.findByTestId('json-editor-code-mirror').get('.CodeMirror-code');
return cy.get('[data-test-id="json-editor-code-mirror"] .CodeMirror-code');
},
getRedoButton: () => {
return cy.findByTestId('json-editor-redo');
Expand Down Expand Up @@ -110,7 +110,7 @@ describe('JSON Editor', () => {
{ id: 1, type: 'setValue', value: { foo: { bar: 'xyz' } } }
]);

checkCode('{\n   "something": "new"\n}');
checkCode('{\n    "something": "new"\n}');
selectors.getRedoButton().should('be.disabled');
selectors.getUndoButton().should('be.disabled');
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/MarkdownEditorHistory.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Markdown Editor / History', () => {
const selectors = {
getInput: () => {
return cy.findByTestId('markdown-textarea').get('textarea');
return cy.get('[data-test-id="markdown-textarea"] textarea');
},
getToggleAdditionalActionsButton: () => {
return cy.findByTestId('markdown-action-button-toggle-additional');
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/MarkdownEditorInsertLink.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Markdown Editor / Insert Link Dialog', () => {
const selectors = {
getInput: () => {
return cy.findByTestId('markdown-textarea').get('textarea');
return cy.get('[data-test-id="markdown-textarea"] textarea');
},
getDialogTitle() {
return cy.findByTestId('dialog-title').within(() => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/MarkdownEditorInsertTable.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Markdown Editor / Insert Table Dialog', () => {
const selectors = {
getInput: () => {
return cy.findByTestId('markdown-textarea').get('textarea');
return cy.get('[data-test-id="markdown-textarea"] textarea');
},
getDialogTitle() {
return cy.findByTestId('dialog-title').within(() => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/MarkdownEditorSimpleActions.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Markdown Editor / Simple Actions', () => {
const selectors = {
getInput: () => {
return cy.findByTestId('markdown-textarea').get('textarea');
return cy.get('[data-test-id="markdown-textarea"] textarea');
},
getHeadingsSelectorButton: () => {
return cy.findByTestId('markdown-action-button-heading');
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/MarkdownEditorSpecialCharacter.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Markdown Editor / Insert Special Character Dialog', () => {
const selectors = {
getInput: () => {
return cy.findByTestId('markdown-textarea').get('textarea');
return cy.get('[data-test-id="markdown-textarea"] textarea');
},
getDialogTitle() {
return cy.findByTestId('dialog-title').within(() => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/MarkdownEmbedExternal.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Markdown Editor / Embed External Dialog', () => {
const selectors = {
getInput: () => {
return cy.findByTestId('markdown-textarea').get('textarea');
return cy.get('[data-test-id="markdown-textarea"] textarea');
},
getDialogTitle() {
return cy.findByTestId('dialog-title').within(() => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/MarkdownOrganizeLinks.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Markdown Editor / Organize Links', () => {
const selectors = {
getInput: () => {
return cy.findByTestId('markdown-textarea').get('textarea');
return cy.get('[data-test-id="markdown-textarea"] textarea');
},
getToggleAdditionalActionsButton: () => {
return cy.findByTestId('markdown-action-button-toggle-additional');
Expand Down

0 comments on commit 927e3b4

Please sign in to comment.