Skip to content

Commit

Permalink
groups tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FahadDarw committed Aug 28, 2024
1 parent dc4bcd4 commit 5681b78
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import projectTaskList from "../../pages/projectTaskList";
import { decisionPage } from '../../pages/decisionPage';
import { Logger } from '../../support/logger';

describe('Decisions Tests', () => {
describe('Groups Tests', () => {

let projectId;

Expand Down Expand Up @@ -59,7 +59,7 @@ describe('Group Creation Tests', () => {
Logger.log("Click on create a group");
projectTaskList.clickCreateGroupBtn();

Logger.log("enerting which trust will the group join");
Logger.log("Entering the trust details for the group to join");
cy.get('.autocomplete__wrapper > #SearchQuery').type('Greater Manchester Academies Trust (10058252)')
cy.get('.autocomplete__wrapper > #SearchQuery').type('{enter}')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,55 +34,55 @@ export default class ProjectTaskList extends BasePage {
urnField: '[data-cy="UKPRN"]',
continueButton: '[data-cy="submit-btn"]',
conversionSelection: '[id="available-conversion-\\[0\\]"]',
confirmandcontinue: '[data-cy="select-common-submitbutton"]'
confirmAndContinue: '[data-cy="select-common-submitbutton"]'

}

static path = 'task-list'
static path1 = 'groups/project-list'
static taskListPath = 'task-list';
static groupsProjectListPath = 'groups/project-list';

static selectAssignProject() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
cy.get(this.selectors.assignProjectButton).click()
}

static getAssignedUser() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
return cy.get(this.selectors.assignedUser)
}

static getNotificationMessage() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
return cy.get(this.selectors.notificationMessage)
}

static selectSchoolOverview() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
cy.get(this.selectors.schoolOverviewLink).click()
}

static getSchoolOverviewStatus() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
return cy.get(this.selectors.schoolOverviewStatus)
}

static selectBudget() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
cy.get(this.selectors.budgetLink).click()
}

static getBudgetStatus() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
return cy.get(this.selectors.budgetStatus)
}

static selectPupilForecast() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
cy.get(this.selectors.pupilForecastLink).click()
}

static selectConversionDetails() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
cy.get(this.selectors.conversionDetailsLink).click()
}

Expand All @@ -91,47 +91,47 @@ export default class ProjectTaskList extends BasePage {
}

static getConversionDetailsStatus() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
return cy.get(this.selectors.conversionDetailsStatus)
}

static selectRationale() {
cy.checkPath(this.path)
cy.checkPath(this.pataskListPathth)
cy.get(this.selectors.rationaleLink).click()
}

static getRationaleStatus() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
return cy.get(this.selectors.rationaleStatus)
}

static selectRisksAndIssues() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
cy.get(this.selectors.riskAndIssuesLink).click()
}

static getRisksAndIssuesStatus() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
return cy.get(this.selectors.riskAndIssuesStatus)
}

static selectLA() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
cy.get(this.selectors.LALink).click()
}

static getLAStatus() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
return cy.get(this.selectors.LAStatus)
}

static selectOfsted() {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
cy.get(this.selectors.ofstedLink).click()
}

static selectKeyStage(keyStageNumber) {
cy.checkPath(this.path)
cy.checkPath(this.taskListPath)
cy.get(this.selectors.keyStageLink(keyStageNumber)).click()
}

Expand All @@ -152,7 +152,7 @@ export default class ProjectTaskList extends BasePage {
}

static clickGroupsLink() {
cy.checkPath(this.path1);
cy.checkPath(this.groupsProjectListPath);
cy.get(this.selectors.groupsLink).click();
return this;
}
Expand All @@ -175,7 +175,7 @@ export default class ProjectTaskList extends BasePage {

static selectConversion() {
cy.get(this.selectors.conversionSelection).click();
cy.get(this.selectors.confirmandcontinue).click();
cy.get(this.selectors.confirmAndContinue).click();
return this;
}

Expand All @@ -191,7 +191,7 @@ export default class ProjectTaskList extends BasePage {
}

static deleteGroup() {
cy.get('[data-cy="tes"]').click();
cy.get('[data-cy="delete-btn"]').click();
cy.get('#delete-group-confirmation').click();
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
<p>There are currently no schools or academies in this group</p>
<span class="govuk-!-margin-right-2">
<a class="govuk-link govuk-button pt-3" asp-page="@Links.ProjectGroups.ConfirmToDeleteGroup.Page"
data-cy="tes" asp-route-id="@Model.Id" asp-route-urn="@Model.ProjectGroup.ReferenceNumber"
data-cy="delete-btn" asp-route-id="@Model.Id" asp-route-urn="@Model.ProjectGroup.ReferenceNumber"
asp-route-trustName="@Model.ProjectGroup.TrustName">Delete this group</a>
</span>
</div>
Expand Down

0 comments on commit 5681b78

Please sign in to comment.