-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #965 from geonetwork/ME-fix-new-record-crash
fix(ME): do not return null on text fields for new records
- Loading branch information
Showing
5 changed files
with
62 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
describe('create', () => { | ||
beforeEach(() => { | ||
cy.login('admin', 'admin', false) | ||
cy.visit('/catalog/search') | ||
}) | ||
|
||
describe('create new record', () => { | ||
it('should create the record without error', () => { | ||
// First create a record and its draft | ||
cy.get('[data-cy="create-record"]').click() | ||
|
||
// eslint-disable-next-line cypress/no-unnecessary-waiting | ||
cy.wait(1200) // waiting for draft saving to kick in | ||
|
||
// Check that the record is correctly displayed | ||
cy.get('gn-ui-record-form').should('be.visible') | ||
|
||
cy.get('gn-ui-record-form') | ||
.children() | ||
.eq(0) | ||
.children() | ||
.should('have.length', 3) | ||
|
||
cy.get('[data-test="previousNextPageButtons"]') | ||
.children() | ||
.eq(0) | ||
.should('contain.text', 'Come back later') | ||
cy.get('[data-test="previousNextPageButtons"]') | ||
.children() | ||
.eq(1) | ||
.should('contain.text', 'Next') | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters