Skip to content

Commit ec2181e

Browse files
updated folder structure and names so it looks more specific
1 parent fb65afe commit ec2181e

File tree

8 files changed

+41
-32
lines changed

8 files changed

+41
-32
lines changed

features/rope-record/add-rope-record.feature renamed to features/rope-record/add-new-rope/add-new-rope.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@Hoist @Rope-Record
22
Feature: Rope Records
33

4-
Scenario: Add rope record
4+
Scenario: Add new rope
55
Given I navigate to the Rope record page
66
And I add a new rope
77
And I provide the following rope information - greg
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@Hoist @Rope-Detail
2+
Feature: Rope Detail
3+
4+
Background: Login
5+
Given I navigate to the Rope record page
6+
7+
Scenario: User edits the Breaking Load information
8+
Given I navigate to the Rope Detail Page for Serial number 'CUCSNO168681'
9+
And I provide the following information in the Breaking load form
10+
| Breaking load | "4" |
11+
Then I should be able to see the updated Breaking load data

features/rope-record/rope-detail/rope-detail.feature renamed to features/rope-record/rope-details/view/view-installed-rope-details.feature

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,4 @@ Feature: Rope Detail
2020
| Install details |
2121
| Attachments |
2222
| Construction details |
23-
24-
Scenario: User edits the Breaking Load information
25-
Given I navigate to the Rope Detail Page for Serial number 'CUCSNO168681'
26-
And I provide the following information in the Breaking load form
27-
| Breaking load | "4" |
28-
Then I should be able to see the updated Breaking load data
23+

src/steps/rope-record/rope.record.page.ts renamed to src/steps/rope-record/add-new-rope/add-new-rope.page.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { DataTable, Given, When } from '@cucumber/cucumber';
22

3-
import { SCREENSHOT_DIR } from '../../../constants';
4-
import { CreateRopeRecord } from '../../pages/CreateRopeRecord';
5-
import { HoistWorld, IHoistWorld } from '../../support/hoist-world';
6-
import { UniqueIdentifierGenerator } from '../../support/UniqueIdentifierGenerator';
3+
import { SCREENSHOT_DIR } from '../../../../constants';
4+
import { CreateRopeRecord } from '../../../pages/CreateRopeRecord';
5+
import { HoistWorld, IHoistWorld } from '../../../support/hoist-world';
6+
import { UniqueIdentifierGenerator } from '../../../support/UniqueIdentifierGenerator';
77

88
Given('I add a new rope', async function (this: IHoistWorld) {
99
const createRopeRecord = new CreateRopeRecord(this.page!);

src/steps/rope-record/rope-detail/rope-detail.ts renamed to src/steps/rope-record/rope-details/update/update-breaking-load-info.page.ts

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
1-
import { DataTable, Given, Then, When } from '@cucumber/cucumber';
2-
import { expect } from 'playwright/test';
1+
import { DataTable, Then, When } from '@cucumber/cucumber';
32

4-
import { CreateRopeRecord } from '../../../pages/CreateRopeRecord';
5-
import { IHoistWorld } from '../../../support/hoist-world';
6-
7-
Then(
8-
'the following sections should be visible:',
9-
async function (this: IHoistWorld, headersTable: DataTable) {
10-
const headers = headersTable.raw().flat();
11-
for (const Header of headers) {
12-
const header = this.page?.getByRole('heading', { name: Header });
13-
if (header) {
14-
await expect(header).toBeVisible();
15-
}
16-
}
17-
},
18-
);
19-
20-
Given('I click on the {string} tab', async function (this: IHoistWorld, tabName: string) {
21-
await this.page?.getByRole('tab', { name: tabName }).click();
22-
});
3+
import { CreateRopeRecord } from '../../../../pages/CreateRopeRecord';
4+
import { IHoistWorld } from '../../../../support/hoist-world';
235

246
When(
257
'I provide the following information in the Breaking load form',
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { DataTable, Given, Then } from '@cucumber/cucumber';
2+
import { expect } from 'playwright/test';
3+
4+
import { IHoistWorld } from '../../../../support/hoist-world';
5+
6+
Then(
7+
'the following sections should be visible:',
8+
async function (this: IHoistWorld, headersTable: DataTable) {
9+
const headers = headersTable.raw().flat();
10+
for (const Header of headers) {
11+
const header = this.page?.getByRole('heading', { name: Header });
12+
if (header) {
13+
await expect(header).toBeVisible();
14+
}
15+
}
16+
},
17+
);
18+
19+
Given('I click on the {string} tab', async function (this: IHoistWorld, tabName: string) {
20+
await this.page?.getByRole('tab', { name: tabName }).click();
21+
});

0 commit comments

Comments
 (0)