Skip to content

Commit 05decd1

Browse files
Merge pull request #601 from centrica-engineering/feature/tag-fix
test: update given
2 parents 6739e9e + a6a240c commit 05decd1

File tree

9 files changed

+1979
-1359
lines changed

9 files changed

+1979
-1359
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ build-storybook.log
2020
# browserstack
2121
/results
2222
/log
23-
local.log
23+
local.log
24+
cucumber-messages.ndjson
25+
cucumber-report.html
26+
npm_install_debug.log

browserstack.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,27 @@
22
"browsers": [
33
{
44
"browser": "chrome",
5-
"os": "Windows 10",
5+
"os": "OS X Monterey",
66
"versions": ["latest"]
77
},
88
{
99
"browser": "firefox",
1010
"os": "OS X Monterey",
1111
"versions": ["latest"]
12-
},
13-
{
14-
"browser": "edge",
15-
"os": "Windows 10",
16-
"versions": ["latest"]
1712
}
1813
],
1914

2015
"run_settings": {
2116
"cypress_config_file": "./cypress.config.js",
2217
"npm_dependencies": {
2318
"@badeball/cypress-cucumber-preprocessor": "^15.1.4",
24-
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",
25-
"browserstack-cypress-cli": "^1.29.2",
19+
"@bahmutov/cypress-esbuild-preprocessor": "2.2.0",
20+
"browserstack-cypress-cli": "^1.30.0",
2621
"allure-commandline": "^2.27.0",
2722
"allure-cypress": "^2.15.1",
2823
"@percy/cypress": "3.1.2",
29-
"cypress": "^12.15.0"
24+
"cypress": "12.15.0",
25+
"esbuild": "0.17.10"
3026
},
3127
"cypress_version": "10",
3228
"project_name": "muon-regression",
@@ -36,13 +32,15 @@
3632
"nonGlobalStepDefinitions": true
3733
}
3834
},
35+
"spec_timeout": 5,
3936
"parallels": "4",
40-
"exclude": ["packages/*","allure-results/*"]
37+
"exclude": []
4138
},
4239
"connection_settings": {
4340
"local": true,
4441
"local_mode": "always-on",
4542
"local_identifier": "CypressLocalConnection"
4643
},
47-
"disable_usage_reporting": false
44+
"disable_usage_reporting": false,
45+
"key": "auth"
4846
}

cypress/e2e/component_tests/muon_cta/muon_cta.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11

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

4+
Given('Launch the {string} component {string} type in the browser', (component, type) => {
5+
cy.launchComponent(component, type);
6+
cy.wait(3000)
7+
});
48

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

cypress/e2e/component_tests/muon_detail/muon_detail.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';
33

44

5+
Given('Launch the {string} component {string} type in the browser', (component, type) => {
6+
cy.launchComponent(component, type);
7+
cy.wait(3000)
8+
});
9+
510
When('User clicks to expand the detail', () => {
611
cy.get('muon-detail').find('div[slot="heading"]').click();
712
});

cypress/e2e/component_tests/muon_icon/muon_icon.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
/* eslint-disable no-undef */
22
import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
33

4+
Given('Launch the {string} component {string} type in the browser', (component, type) => {
5+
cy.launchComponent(component, type);
6+
cy.wait(3000)
7+
});
8+
49

510
Then('Validate the svg element', () => {
611
cy.get('muon-icon')

cypress/e2e/component_tests/muon_image/muon_image.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
55
import {imageElement} from '../../../support/web_elements';
66

7+
8+
Given('Launch the {string} component {string} type in the browser', (component, type) => {
9+
cy.launchComponent(component, type);
10+
cy.wait(3000)
11+
});
12+
713
Then('Validate the image src and elements in {string} type', (type) => {
814

915
const placeholder = '(src).thumb.48.48.png';

cypress/e2e/component_tests/muon_inputter/muon_inputter.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';
44
import {inputElement} from '../../../support/web_elements';
55

66

7+
Given('Launch the {string} component {string} type in the browser', (component, type) => {
8+
cy.launchComponent(component, type);
9+
cy.wait(3000)
10+
});
11+
12+
713
When('User enter the input', () => {
814
cy.clearInput();
915
cy.enterValue('Cypress test');

0 commit comments

Comments
 (0)