@@ -8,7 +8,7 @@ fields, suites, comments, and file attachments to your test cases.
88## Adding QaseID to a Test
99
1010To associate a QaseID with a test in Cucumber.js, use the ` @QaseId ` tag in your Gherkin feature files. This tag accepts
11- a single integer or multiple integers separated by commas representing the test' s ID(s) in Qase.
11+ a single integer or multiple integers separated by commas representing the test" s ID(s) in Qase.
1212
1313### Example
1414
@@ -33,7 +33,7 @@ Feature: User Authentication
3333## Adding a Title to a Test
3434
3535You can provide a custom title for your test using the ` @Title ` tag. The tag accepts a string, which will be used as
36- the test' s title in Qase. If no title is provided, the scenario name will be used by default.
36+ the test" s title in Qase. If no title is provided, the scenario name will be used by default.
3737
3838### Example
3939
@@ -70,7 +70,7 @@ enhance test case information in Qase.
7070Feature: User Authentication
7171
7272 @QaseId=1
73- @QaseFields={' severity':' high',' priority':' medium',' description':' Login functionality test' }
73+ @QaseFields={" severity":" high"," priority":" medium"," description":" Login functionality test" }
7474 Scenario: Successful login
7575 Given I am on the login page
7676 When I enter valid credentials
@@ -136,7 +136,7 @@ parameter names and values.
136136Feature: User Authentication
137137
138138 @QaseId=1
139- @QaseParameters={' browser':' chrome',' environment':' staging' }
139+ @QaseParameters={" browser":" chrome"," environment":" staging" }
140140 Scenario: Successful login
141141 Given I am on the login page
142142 When I enter valid credentials
@@ -156,8 +156,8 @@ group parameter names and values.
156156Feature: User Authentication
157157
158158 @QaseId=1
159- @QaseParameters={' browser':' chrome',' environment':' staging' }
160- @QaseGroupParameters={' test_group':' authentication',' test_type':' smoke' }
159+ @QaseParameters={" browser":" chrome"," environment":" staging" }
160+ @QaseGroupParameters={" test_group":" authentication"," test_type":" smoke" }
161161 Scenario: Successful login
162162 Given I am on the login page
163163 When I enter valid credentials
@@ -185,23 +185,23 @@ Feature: User Authentication
185185
186186``` javascript
187187// step_definitions/login_steps.js
188- const { Given , When , Then } = require (' @cucumber/cucumber' );
188+ const { Given , When , Then } = require (" @cucumber/cucumber" );
189189
190- Given (' I am on the login page' , async function () {
190+ Given (" I am on the login page" , async function () {
191191 // Step implementation
192- await this .page .goto (' https://example.com/login' );
192+ await this .page .goto (" https://example.com/login" );
193193});
194194
195- When (' I enter valid credentials' , async function () {
195+ When (" I enter valid credentials" , async function () {
196196 // Step implementation
197- await this .page .fill (' #username' , ' testuser' );
198- await this .page .fill (' #password' , ' password' );
199- await this .page .click (' #login-button' );
197+ await this .page .fill (" #username" , " testuser" );
198+ await this .page .fill (" #password" , " password" );
199+ await this .page .click (" #login-button" );
200200});
201201
202- Then (' I should be logged in' , async function () {
202+ Then (" I should be logged in" , async function () {
203203 // Step implementation
204- await this .page .waitForSelector (' .dashboard' );
204+ await this .page .waitForSelector (" .dashboard" );
205205});
206206```
207207
@@ -216,32 +216,32 @@ attaching files with content, paths, or media types.
216216
217217``` javascript
218218// step_definitions/login_steps.js
219- const { Given , When , Then } = require (' @cucumber/cucumber' );
219+ const { Given , When , Then } = require (" @cucumber/cucumber" );
220220
221- Given (' I am on the login page' , async function () {
222- await this .page .goto (' https://example.com/login' );
221+ Given (" I am on the login page" , async function () {
222+ await this .page .goto (" https://example.com/login" );
223223
224224 // Attach screenshot
225225 const screenshot = await this .page .screenshot ();
226- await this .attach (screenshot, ' image/png' );
226+ await this .attach (screenshot, " image/png" );
227227});
228228
229- When (' I enter valid credentials' , async function () {
230- await this .page .fill (' #username' , ' testuser' );
231- await this .page .fill (' #password' , ' password' );
229+ When (" I enter valid credentials" , async function () {
230+ await this .page .fill (" #username" , " testuser" );
231+ await this .page .fill (" #password" , " password" );
232232
233233 // Attach text content
234- await this .attach (' Credentials entered successfully' , ' text/plain' );
234+ await this .attach (" Credentials entered successfully" , " text/plain" );
235235
236- await this .page .click (' #login-button' );
236+ await this .page .click (" #login-button" );
237237});
238238
239- Then (' I should be logged in' , async function () {
240- await this .page .waitForSelector (' .dashboard' );
239+ Then (" I should be logged in" , async function () {
240+ await this .page .waitForSelector (" .dashboard" );
241241
242242 // Attach JSON data
243- const userData = { username: ' testuser' , status: ' logged_in' };
244- await this .attach (JSON .stringify (userData, null , 2 ), ' application/json' );
243+ const userData = { username: " testuser" , status: " logged_in" };
244+ await this .attach (JSON .stringify (userData, null , 2 ), " application/json" );
245245});
246246```
247247
0 commit comments