Skip to content

Commit

Permalink
chore: Add e2e test for resource identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Angi-Kinas committed Nov 25, 2024
1 parent d8b1ea9 commit 5b948e2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions apps/metadata-editor-e2e/src/e2e/edit.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,31 @@ describe('editor form', () => {
.eq(1)
.as('aboutSection')
})
describe('resource identifier', () => {
it('shows the resource identifier', () => {
cy.get('@aboutSection')
.find('gn-ui-form-field-simple')
.first()
.find('input')
.invoke('val')
.should('eq', 'UWWTD_WASTE_WATER_TREATMENT')
})
it('edits and saves the resource identifiert', () => {
cy.editor_wrapPreviousDraft()
cy.get('gn-ui-form-field-simple').first().find('input').clear()
cy.get('gn-ui-form-field-simple')
.first()
.find('input')
.type('Test - resource identifier')
cy.editor_publishAndReload()
cy.get('@saveStatus').should('eq', 'record_up_to_date')
cy.get('gn-ui-form-field-simple')
.first()
.find('input')
.invoke('val')
.should('eq', 'Test - resource identifier')
})
})
describe('resource updated', () => {
beforeEach(() => {
cy.get('@aboutSection')
Expand Down

0 comments on commit 5b948e2

Please sign in to comment.