Skip to content

Commit

Permalink
test: update steps
Browse files Browse the repository at this point in the history
  • Loading branch information
PraveenAsokan committed Aug 12, 2024
1 parent a1e108b commit 88b4e43
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 40 deletions.
3 changes: 2 additions & 1 deletion cucumber-messages.ndjson
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{"testRunStarted":{"timestamp":{"seconds":1718657511,"nanos":525000000}}}
{"testRunStarted":{"timestamp":{"seconds":1723452518,"nanos":607000000}}}
{"testRunFinished":{"timestamp":{"seconds":1723452572,"nanos":126000000}}}
2 changes: 1 addition & 1 deletion cucumber-report.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<div id="content">
</div>
<script>
window.CUCUMBER_MESSAGES = [{"testRunStarted":{"timestamp":{"seconds":1718269963,"nanos":41000000}}},{"testRunFinished":{"success":false,"timestamp":{"seconds":1718270013,"nanos":656000000}}}];
window.CUCUMBER_MESSAGES = [{"testRunStarted":{"timestamp":{"seconds":1723452518,"nanos":607000000}}},{"testRunFinished":{"success":false,"timestamp":{"seconds":1723452572,"nanos":126000000}}}];
</script>
<script>
/*! For license information please see main.js.LICENSE.txt */
Expand Down
6 changes: 1 addition & 5 deletions cypress/e2e/component_tests/muon_cta/muon_cta.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@

import {Given, Then} from '@badeball/cypress-cucumber-preprocessor';
import {Then} from '@badeball/cypress-cucumber-preprocessor';

Given('Launch the {string} component {string} type in the browser', (component, type) => {
cy.launchComponent(component, type);
cy.wait(3000)
});

Then('Validate the elements and attributes in the {string} component', (type) => {

Expand Down
7 changes: 1 addition & 6 deletions cypress/e2e/component_tests/muon_detail/muon_detail.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
/* eslint-disable no-undef */
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';
import { When, Then } from '@badeball/cypress-cucumber-preprocessor';


Given('Launch the {string} component {string} type in the browser', (component, type) => {
cy.launchComponent(component, type);
cy.wait(3000)
});

When('User clicks to expand the detail', () => {
cy.get('muon-detail').find('div[slot="heading"]').click();
});
Expand Down
18 changes: 11 additions & 7 deletions cypress/e2e/component_tests/muon_form.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,33 @@ Feature: muon form component

Scenario Outline: muon form standard component with valid

Given Launch the muon-form component standard type in the browser
Given Launch the '<component>' component '<type>' type in the browser
When User enters values in all fields
Then User clicks on submit and validate the '<validation>' form
And User resets the form

Examples:
|validation |
|valid |
|component |type |validation |
|muon-form |standard |valid |

Scenario Outline: muon form standard component with invalid

Given Launch the muon-form component standard type in the browser
Given Launch the '<component>' component '<type>' type in the browser
When User clicks on submit and validate the '<validation>' form
And User resets the form

Examples:
|validation |
|invalid |
|component |type |validation |
|muon-form |standard |invalid |

Scenario: muon form standard component with focusing error field and enter submission

Given Launch the muon-form component standard type in the browser
Given Launch the '<component>' component '<type>' type in the browser
When User enter the value only in first field and press enter
Then Validate that the remaining fields are highlighted with error message

Examples:
|component |type |
|muon-form |standard |


7 changes: 1 addition & 6 deletions cypress/e2e/component_tests/muon_icon/muon_icon.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
/* eslint-disable no-undef */
import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';

Given('Launch the {string} component {string} type in the browser', (component, type) => {
cy.launchComponent(component, type);
cy.wait(3000)
});
import { Then } from '@badeball/cypress-cucumber-preprocessor';


Then('Validate the svg element', () => {
Expand Down
7 changes: 1 addition & 6 deletions cypress/e2e/component_tests/muon_image/muon_image.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
/* eslint-disable no-undef */
{/* <reference types="cypress" /> */}

import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
import { Then } from '@badeball/cypress-cucumber-preprocessor';
import {imageElement} from '../../../support/web_elements';


Given('Launch the {string} component {string} type in the browser', (component, type) => {
cy.launchComponent(component, type);
cy.wait(3000)
});

Then('Validate the image src and elements in {string} type', (type) => {

const placeholder = '(src).thumb.48.48.png';
Expand Down
8 changes: 1 addition & 7 deletions cypress/e2e/component_tests/muon_inputter/muon_inputter.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
/* eslint-disable no-undef */

import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';
import { When, Then } from '@badeball/cypress-cucumber-preprocessor';
import {inputElement} from '../../../support/web_elements';


Given('Launch the {string} component {string} type in the browser', (component, type) => {
cy.launchComponent(component, type);
cy.wait(3000)
});


When('User enter the input', () => {
cy.clearInput();
cy.enterValue('Cypress test');
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"chromatic": "6.17.3",
"cypress": "12.15.0",
"cypress-tags": "1.1.2",
"env-cmd": "^10.1.0",
"esbuild": "0.17.10",
"eslint": "8.39.0",
"eslint-plugin-jsdoc": "43.1.1",
Expand Down

0 comments on commit 88b4e43

Please sign in to comment.