Skip to content

Commit

Permalink
chore: fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
Angi-Kinas committed Dec 12, 2024
1 parent daa8222 commit 8827faa
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
17 changes: 13 additions & 4 deletions apps/metadata-editor-e2e/src/e2e/record-actions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,11 @@ describe('record-actions', () => {
.should('be.disabled')
cy.get('gn-ui-form-field-overviews')
.children()
.find('div')
.should('contain.text', ' This field will be enabled once published ')
.find('[data-test="disabled-message"]')
.should(
'contain.text',
' This field will be enabled once the data has been published '
)

// second page
cy.get('[data-test="previousNextPageButtons"]')
Expand All @@ -140,15 +143,21 @@ describe('record-actions', () => {
cy.get('gn-ui-form-field-online-resources')
.children()
.find('div')
.should('contain.text', ' This field will be enabled once published ')
.should(
'contain.text',
' This field will be enabled once the data has been published '
)

cy.get('gn-ui-form-field-online-link-resources')
.find('input')
.should('be.disabled')
cy.get('gn-ui-form-field-online-link-resources')
.children()
.find('div')
.should('contain.text', ' This field will be enabled once published ')
.should(
'contain.text',
' This field will be enabled once the data has been published '
)
})

it('back navigation should go to search after creating a record', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ <h3 class="text-[16px] font-bold text-main mb-[12px]" translate>
*ngIf="disabled$ | async"
class="p-4 text-sm border border-primary bg-primary-lightest rounded-lg"
translate
data-testid="disabled-message"
>
editor.record.form.field.draft.only.disabled
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ <h3 class="text-[16px] font-bold text-main mb-[12px]" translate>
*ngIf="disabled$ | async"
class="p-4 text-sm border border-primary bg-primary-lightest rounded-lg"
translate
data-test="disabled-message"
>
editor.record.form.field.draft.only.disabled
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*ngIf="disabled$ | async"
class="p-4 text-sm border border-primary bg-primary-lightest rounded-lg"
translate
data-test="disabled-message"
>
editor.record.form.field.draft.only.disabled
</div>
Expand Down

0 comments on commit 8827faa

Please sign in to comment.