Skip to content

Commit 139cad4

Browse files
committed
test: fix tests due to temp changes
1 parent 59c4faa commit 139cad4

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

packages/design-system/tests/component/rich-text-editor/RichTextEditor.spec.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,8 @@ describe('RichTextEditor', () => {
435435

436436
cy.findByRole('button', { name: 'OK' }).click()
437437

438+
cy.wait(1000) // Wait for the image to be rendered
439+
438440
cy.get(`#${editorContentId}`).then((el) => {
439441
const html = el[0].innerHTML
440442
expect(html).to.include(
@@ -467,6 +469,8 @@ describe('RichTextEditor', () => {
467469

468470
cy.findByRole('button', { name: 'OK' }).click()
469471

472+
cy.wait(1000) // Wait for the image to be rendered
473+
470474
cy.get(`#${editorContentId}`).then((el) => {
471475
const html = el[0].innerHTML
472476
expect(html).to.include(
@@ -499,6 +503,8 @@ describe('RichTextEditor', () => {
499503

500504
cy.findByRole('button', { name: 'OK' }).click()
501505

506+
cy.wait(1000) // Wait for the image to be rendered
507+
502508
cy.get(`#${editorContentId}`).then((el) => {
503509
const html = el[0].innerHTML
504510
expect(html).to.include(
@@ -531,6 +537,8 @@ describe('RichTextEditor', () => {
531537

532538
cy.findByRole('button', { name: 'OK' }).click()
533539

540+
cy.wait(1000) // Wait for the image to be rendered
541+
534542
cy.get(`#${editorContentId}`).then((el) => {
535543
const html = el[0].innerHTML
536544
expect(html).to.include(

tests/e2e-integration/e2e/sections/dataset/Dataset.spec.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ describe('Dataset', () => {
408408

409409
cy.findByText('Upload Files').should('exist')
410410
cy.get('#edit-files-menu').should('exist')
411-
cy.findAllByRole('button', { name: 'Access File' }).should('exist')
411+
cy.findAllByRole('button', { name: 'Access File' }).should('not.exist') // TODO: change this to 'exist' when access datafile supports bearer tokens, downloading of files temporary disabled for draft datasets
412412
cy.findAllByRole('button', { name: 'File Options' }).should('exist')
413413
})
414414
})
@@ -435,7 +435,8 @@ describe('Dataset', () => {
435435
})
436436
})
437437

438-
it('loads the restricted files when the user is logged in as owner', () => {
438+
// TODO: Bring back this test when access datafile supports bearer tokens, downloading of files temporary disabled for draft datasets
439+
it.skip('loads the restricted files when the user is logged in as owner', () => {
439440
cy.wrap(DatasetHelper.createWithFiles(FileHelper.createManyRestricted(1)))
440441
.its('persistentId')
441442
.then((persistentId: string) => {
@@ -517,10 +518,11 @@ describe('Dataset', () => {
517518

518519
cy.get('#edit-files-menu').should('exist')
519520

520-
cy.findByRole('button', { name: 'Access File' }).as('accessButton')
521-
cy.get('@accessButton').should('exist')
522-
cy.get('@accessButton').click()
523-
cy.findByText('Embargoed').should('exist')
521+
// TODO: Bring back this part of the test when access datafile supports bearer tokens, downloading of files temporary disabled for draft datasets
522+
// cy.findByRole('button', { name: 'Access File' }).as('accessButton')
523+
// cy.get('@accessButton').should('exist')
524+
// cy.get('@accessButton').click()
525+
// cy.findByText('Embargoed').should('exist')
524526
})
525527
})
526528

tests/e2e-integration/e2e/sections/file/File.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('File', () => {
2727
cy.findByRole('tab', { name: 'Versions' }).should('exist')
2828
cy.findByText('Metadata').should('exist')
2929

30-
cy.findByRole('button', { name: 'Access File' }).should('exist')
30+
cy.findByRole('button', { name: 'Access File' }).should('not.exist') // TODO: change this to 'exist' when access datafile supports bearer tokens, downloading of files temporary disabled for draft datasets
3131
})
3232
})
3333

0 commit comments

Comments
 (0)