Skip to content

Commit

Permalink
Fix test (.vlc-input-field-block part 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
brenner-company committed Mar 23, 2021
1 parent 80f37bf commit 644d095
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions cypress/support/commands/case-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function addSubcase(type, newShortTitle, longTitle, step, stepName) {

// Set the type
if (type) {
cy.get('.vlc-input-field-block').eq(0)
cy.get('.auk-radio-list')
.within(() => {
cy.contains(type).scrollIntoView()
.click();
Expand All @@ -100,7 +100,7 @@ function addSubcase(type, newShortTitle, longTitle, step, stepName) {

// Set the short title
if (newShortTitle) {
cy.get('.vlc-input-field-block').eq(1)
cy.get('.vlc-input-field-block').eq(0)
.within(() => {
cy.get('.auk-textarea').click()
.clear()
Expand All @@ -110,7 +110,7 @@ function addSubcase(type, newShortTitle, longTitle, step, stepName) {

// Set the long title
if (longTitle) {
cy.get('.vlc-input-field-block').eq(2)
cy.get('.vlc-input-field-block').eq(1)
.within(() => {
cy.get('.auk-textarea').click()
.clear()
Expand All @@ -120,7 +120,7 @@ function addSubcase(type, newShortTitle, longTitle, step, stepName) {

// Set the step type
if (step) {
cy.get('.vlc-input-field-block').eq(3)
cy.get('.vlc-input-field-block').eq(2)
.within(() => {
cy.get('.ember-power-select-trigger').click();
});
Expand All @@ -140,7 +140,7 @@ function addSubcase(type, newShortTitle, longTitle, step, stepName) {

// Set the step name
if (stepName) {
cy.get('.vlc-input-field-block').eq(4)
cy.get('.vlc-input-field-block').eq(3)
.within(() => {
cy.get('.ember-power-select-trigger').click();
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/commands/document-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function addNewDocumentsInUploadModal(files, model) {
cy.get('.vl-uploaded-document').eq(index)
.within(() => {
cy.get('input[type="radio"]').should('exist'); // the radio buttons should be loaded before the within or the .length returns 0
cy.get('.vlc-input-field-block').eq(1)
cy.get('.auk-radio-list')
.within(($t) => {
if ($t.find(`input[type="radio"][value="${file.fileType}"]`).length) {
cy.get('input[type="radio"]').check(file.fileType, {
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/commands/publication-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function addPublicationDocuments(files) {
cy.get('.vl-uploaded-document').eq(index)
.within(() => {
cy.get('input[type="radio"]').should('exist'); // the radio buttons should be loaded before the within or the .length returns 0
cy.get('.vlc-input-field-block').eq(1)
cy.get('.auk-radio-list')
.within(($t) => {
if ($t.find(`input[type="radio"][value="${file.fileType}"]`).length) {
cy.get('input[type="radio"]').check(file.fileType, {
Expand Down

0 comments on commit 644d095

Please sign in to comment.