From 2714804809337b3ba969aa4f132f6fd3fea192a8 Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 11:36:06 +0100
Subject: [PATCH 01/25] In beforeEach() block in Voluntary change the way of
accessing the project to be Page-Object-friendly with the existing
projectList page object as Nick has done
---
.../cypress/e2e/Core-journeys/voluntary-conversion.cy.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
index e28a10ef3..bcdf98a61 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
@@ -1,17 +1,18 @@
///
+import projectList from '../../pages/projectList'
+
+const projectName = 'Voluntary Cypress Project'
describe('Voluntary conversion', { tags: ['@dev', '@stage'] }, () => {
beforeEach(() => {
cy.callAcademisationApi('POST', `cypress-data/add-voluntary-project.cy`, "{}")
.then(() => {
- cy.login({ titleFilter: 'Cypress Project' })
- .then(() => {
- cy.get('[id="school-name-0"]').click();
- });
+ projectList.selectProject(projectName)
});
})
it('TC01: Voluntary conversion journey ', () => {
// Go wild Dan!
+
})
})
\ No newline at end of file
From 395e330de02d7433c219dd9f5912e4afbed25f00 Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 11:55:55 +0100
Subject: [PATCH 02/25] Add voluntaryProjectTaskList page object to pages
folder And create an elementsVisible() function
---
.../cypress/pages/voluntaryProjectTaskList.js | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
new file mode 100644
index 000000000..f1fe1b41d
--- /dev/null
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
@@ -0,0 +1,9 @@
+class VoluntaryProjectTaskList {
+ var projectName = 'Voluntary Cypress Project'
+ static voluntaryProjectElementsVisible()
+ {
+
+ }
+}
+
+export default new VoluntaryProjectTaskList
\ No newline at end of file
From fd974bed0c851b6ecce56d0b69bedcc9b6d0ebac Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 11:58:23 +0100
Subject: [PATCH 03/25] Add selectVoluntaryProject() function to projectList
page object
---
.../cypress/pages/projectList.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
index 675c93dde..6d7cb3d42 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
@@ -7,6 +7,13 @@ class ProjectList {
return cy.url().then(url => this.getIdFromUrl(url));
};
+ selectVoluntaryProject() {
+ cy.login({titleFilter: 'Voluntary Cypress Project'});
+ cy.get('[id="school-name-0"]').click();
+
+ return cy.url().then(url => this.getIdFromUrl(url));
+ };
+
getIdFromUrl(url) {
const urlSplit = url.toString().split('/');
for (let i = urlSplit.length - 1; i > 0; i--) {
From a44c6f9a1b1e766362b878da34811f13da3a8b9f Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 11:59:59 +0100
Subject: [PATCH 04/25] change function call in beforeEach() block in
voluntary-conversion.cy.js spec to
projectList.selectVoluntaryProject(projectName) so correct voluntary project
is being selected
---
.../cypress/e2e/Core-journeys/voluntary-conversion.cy.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
index bcdf98a61..1492c52ef 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
@@ -1,18 +1,19 @@
///
import projectList from '../../pages/projectList'
-const projectName = 'Voluntary Cypress Project'
+var projectName = 'Voluntary Cypress Project'
describe('Voluntary conversion', { tags: ['@dev', '@stage'] }, () => {
beforeEach(() => {
cy.callAcademisationApi('POST', `cypress-data/add-voluntary-project.cy`, "{}")
.then(() => {
- projectList.selectProject(projectName)
+ projectList.selectVoluntaryProject(projectName)
});
})
it('TC01: Voluntary conversion journey ', () => {
// Go wild Dan!
+
})
})
\ No newline at end of file
From 32cf3d0c98a187c65598cb0cf8f2ea7537fa278d Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 12:27:26 +0100
Subject: [PATCH 05/25] Changed function call to
selectVoluntaryProject(projectName)
---
.../cypress/e2e/Core-journeys/voluntary-conversion.cy.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
index 1492c52ef..0035f47e2 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
@@ -13,7 +13,7 @@ describe('Voluntary conversion', { tags: ['@dev', '@stage'] }, () => {
it('TC01: Voluntary conversion journey ', () => {
// Go wild Dan!
-
+
})
})
\ No newline at end of file
From 92f9919e91bff0e30f70f19049f4ec08efea9dde Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 12:28:27 +0100
Subject: [PATCH 06/25] Started to add detail to
voluntaryProjectElementsVisible() function in voluntaryProjectTaskList page
object
---
.../cypress/pages/voluntaryProjectTaskList.js | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
index f1fe1b41d..ac55af723 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
@@ -1,8 +1,24 @@
+var projectName = 'Voluntary Cypress Project'
+var routeType = 'Voluntary conversion'
+var projectOwner = ''
+var projectStatus = 'Approved with Conditions'
+
class VoluntaryProjectTaskList {
- var projectName = 'Voluntary Cypress Project'
+
static voluntaryProjectElementsVisible()
{
+ // Check Header section of main Project Page
+ cy.get('h1[data-cy]').contains(projectName)
+ cy.get('p[class="govuk-body govuk-!-margin-bottom-1"]').contains('Route: ' + routeType)
+ cy.get('p[class="govuk-body govuk-!-margin-bottom-5"]').contains('Project owner: ' + projectOwner)
+ cy.get('.empty').contains('Empty')
+ cy.get('a[class="govuk-link govuk-!-padding-left-50"]').contains('Change')
+ cy.get('#project-status-28470').contains(projectStatus)
+
+ // Check Project Tabs Section of main Project Page
+ cy.get('ul[class="moj-sub-navigation__list govuk-!-margin-top-6"]').should('have.length',5)
+
}
}
From 17b2cebc150633b9164fa034971e452a1af9d567 Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 12:36:09 +0100
Subject: [PATCH 07/25] Updated casing of voluntaryProjectTaskList and
projectList in imports in voluntary-conversion spec file and the class names
of the respective page objects themselves
---
.../cypress/e2e/Core-journeys/voluntary-conversion.cy.js | 3 ++-
.../cypress/pages/projectList.js | 4 ++--
.../cypress/pages/voluntaryProjectTaskList.js | 6 +++---
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
index 0035f47e2..83bf5fa8a 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
@@ -1,5 +1,6 @@
///
import projectList from '../../pages/projectList'
+import voluntaryProjectTaskList from '../../pages/voluntaryProjectTaskList'
var projectName = 'Voluntary Cypress Project'
@@ -13,7 +14,7 @@ describe('Voluntary conversion', { tags: ['@dev', '@stage'] }, () => {
it('TC01: Voluntary conversion journey ', () => {
// Go wild Dan!
-
+ voluntaryProjectTaskList.voluntaryProjectElementsVisible()
})
})
\ No newline at end of file
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
index 6d7cb3d42..8bc0cc4e6 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
@@ -1,4 +1,4 @@
-class ProjectList {
+class projectList {
selectProject() {
cy.login({titleFilter: 'Gloucester school'});
@@ -26,4 +26,4 @@ class ProjectList {
};
};
-export default new ProjectList();
\ No newline at end of file
+export default new projectList();
\ No newline at end of file
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
index ac55af723..aaf289a63 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
@@ -3,7 +3,7 @@ var routeType = 'Voluntary conversion'
var projectOwner = ''
var projectStatus = 'Approved with Conditions'
-class VoluntaryProjectTaskList {
+class voluntaryProjectTaskList {
static voluntaryProjectElementsVisible()
{
@@ -17,9 +17,9 @@ class VoluntaryProjectTaskList {
// Check Project Tabs Section of main Project Page
cy.get('ul[class="moj-sub-navigation__list govuk-!-margin-top-6"]').should('have.length',5)
-
+
}
}
-export default new VoluntaryProjectTaskList
\ No newline at end of file
+export default new voluntaryProjectTaskList
\ No newline at end of file
From 8e5cd7db4d2077f9534fd68547ba71fd005735cc Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 12:51:40 +0100
Subject: [PATCH 08/25] Updated voluntaryProjectTaskList page object so it
could be easily exported
---
.../cypress/pages/voluntaryProjectTaskList.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
index aaf289a63..65c6d5b2a 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
@@ -1,12 +1,13 @@
-var projectName = 'Voluntary Cypress Project'
-var routeType = 'Voluntary conversion'
-var projectOwner = ''
-var projectStatus = 'Approved with Conditions'
+export default class voluntaryProjectTaskList {
+
-class voluntaryProjectTaskList {
-
static voluntaryProjectElementsVisible()
{
+ var projectName = 'Voluntary Cypress Project'
+ var routeType = 'Voluntary conversion'
+ var projectOwner = ''
+ var projectStatus = 'Approved with Conditions'
+
// Check Header section of main Project Page
cy.get('h1[data-cy]').contains(projectName)
cy.get('p[class="govuk-body govuk-!-margin-bottom-1"]').contains('Route: ' + routeType)
@@ -22,4 +23,3 @@ class voluntaryProjectTaskList {
}
}
-export default new voluntaryProjectTaskList
\ No newline at end of file
From 2940c7afeddf8383a7115f913a75589104fb9a17 Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 12:53:42 +0100
Subject: [PATCH 09/25] Made changes to projectList page object so the class is
easily exported
---
.../cypress/pages/projectList.js | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
index 8bc0cc4e6..5aa525adb 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
@@ -1,4 +1,4 @@
-class projectList {
+export default class projectList {
selectProject() {
cy.login({titleFilter: 'Gloucester school'});
@@ -25,5 +25,3 @@ class projectList {
return '';
};
};
-
-export default new projectList();
\ No newline at end of file
From 8c490cbf0d21e9055e00cfc2711e4e44b549ae8e Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 12:57:28 +0100
Subject: [PATCH 10/25] Undid changes to projectList page object so it still
works spawning a new voluntary project
---
.../cypress/pages/projectList.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
index 5aa525adb..8bc0cc4e6 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
@@ -1,4 +1,4 @@
-export default class projectList {
+class projectList {
selectProject() {
cy.login({titleFilter: 'Gloucester school'});
@@ -25,3 +25,5 @@ export default class projectList {
return '';
};
};
+
+export default new projectList();
\ No newline at end of file
From 83939ca08e7bfb318dc658935fe914ff55f40b56 Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 13:06:01 +0100
Subject: [PATCH 11/25] Updated logic when checking the navigation tab
unordered list and number of items
---
.../cypress/pages/voluntaryProjectTaskList.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
index 65c6d5b2a..2fee293b2 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
@@ -14,10 +14,10 @@ export default class voluntaryProjectTaskList {
cy.get('p[class="govuk-body govuk-!-margin-bottom-5"]').contains('Project owner: ' + projectOwner)
cy.get('.empty').contains('Empty')
cy.get('a[class="govuk-link govuk-!-padding-left-50"]').contains('Change')
- cy.get('#project-status-28470').contains(projectStatus)
+ cy.get('strong[class="govuk-tag govuk-tag--green"]').contains(projectStatus)
// Check Project Tabs Section of main Project Page
- cy.get('ul[class="moj-sub-navigation__list govuk-!-margin-top-6"]').should('have.length',5)
+ cy.get('ul').eq(0).find('li').should('have.length',4)
}
From 5b4d39a973871ade2812e2fcb33efac08ab5a0f8 Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 13:14:51 +0100
Subject: [PATCH 12/25] Updated Project details tab to be correct locato in
voluntaryProjectTaskList page object
---
.../cypress/pages/voluntaryProjectTaskList.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
index 2fee293b2..46aee7448 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
@@ -19,6 +19,9 @@ export default class voluntaryProjectTaskList {
// Check Project Tabs Section of main Project Page
cy.get('ul').eq(0).find('li').should('have.length',4)
+ // Check Project details is default tab selected
+ cy.get('a[aria-Current="page"]').contains('Project details')
+
}
}
From 2c2bee71e38e683ea31072956ac8b9be6d37fb00 Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 15:24:43 +0100
Subject: [PATCH 13/25] Added BasePage class for page objects to inherit from
so we have a couple of different viewports we can test from
---
.../cypress/pages/BasePage.js | 11 +++++++++++
.../cypress/pages/projectList.js | 6 ++++--
.../cypress/pages/voluntaryProjectTaskList.js | 4 +++-
3 files changed, 18 insertions(+), 3 deletions(-)
create mode 100644 Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/BasePage.js
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/BasePage.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/BasePage.js
new file mode 100644
index 000000000..eaed67730
--- /dev/null
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/BasePage.js
@@ -0,0 +1,11 @@
+export default class BasePage {
+ static setDesktopViewport()
+ {
+ cy.viewport('macbook-13')
+ }
+
+ static setLargeDesktopViewport()
+ {
+ cy.viewport(1980, 1080)
+ }
+}
\ No newline at end of file
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
index 8bc0cc4e6..5fdbb758e 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
@@ -1,4 +1,6 @@
-class projectList {
+import BasePage from './BasePage'
+
+export default new class projectList extends BasePage {
selectProject() {
cy.login({titleFilter: 'Gloucester school'});
@@ -26,4 +28,4 @@ class projectList {
};
};
-export default new projectList();
\ No newline at end of file
+//export default new projectList();
\ No newline at end of file
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
index 46aee7448..86c9186b1 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
@@ -1,4 +1,6 @@
-export default class voluntaryProjectTaskList {
+import BasePage from './BasePage'
+
+export default class voluntaryProjectTaskList extends BasePage {
static voluntaryProjectElementsVisible()
From 62781dda6791ddde27041c4a30111ddd778f06e4 Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 16:51:19 +0100
Subject: [PATCH 14/25] Adding in Nick's new selectProject function
---
.../cypress/pages/projectList.js | 4 ----
1 file changed, 4 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
index dd5de93a2..a820dad3f 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
@@ -6,10 +6,6 @@ import BasePage from './BasePage'
export default new class projectList extends BasePage {
- selectProject() {
- cy.login({titleFilter: 'Gloucester school'});
- cy.get('[id="school-name-0"]').click();
-
selectProject(projectName = 'Gloucester school') {
this.filterProjectList(projectName);
this.selectFirstItem();
From 9c39a941a96ed3991c725413db8844d59e212c8a Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 16:53:15 +0100
Subject: [PATCH 15/25] Removed unnecessary export comment at EOF on
projectList.js page object
---
.../cypress/pages/projectList.js | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
index a820dad3f..a4d748165 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
@@ -22,6 +22,4 @@ export default new class projectList extends BasePage {
return '';
};
-};
-
-//export default new projectList();
\ No newline at end of file
+};
\ No newline at end of file
From f0bd3d77e97431bded688e4eef8781dffee83f40 Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 17:51:08 +0100
Subject: [PATCH 16/25] Attempted to change call from selectVoluntaryProject to
selectProject to use Nicks function
---
.../cypress/e2e/Core-journeys/voluntary-conversion.cy.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
index 83bf5fa8a..39f6827bf 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
@@ -8,7 +8,7 @@ describe('Voluntary conversion', { tags: ['@dev', '@stage'] }, () => {
beforeEach(() => {
cy.callAcademisationApi('POST', `cypress-data/add-voluntary-project.cy`, "{}")
.then(() => {
- projectList.selectVoluntaryProject(projectName)
+ projectList.selectProject(projectName)
});
})
From ef79c235ac4dd64553c43a4bd6a9f8da48bee936 Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 17:52:30 +0100
Subject: [PATCH 17/25] Put back in checkProjectListPage(),
getNthProjectDeliveryOfficer(), filterProjectList() and selectFirstItem()
Functions I accidentally deleted in the merge conflict
---
.../cypress/pages/projectList.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
index a4d748165..d75f5570d 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
@@ -6,7 +6,7 @@ import BasePage from './BasePage'
export default new class projectList extends BasePage {
- selectProject(projectName = 'Gloucester school') {
+ selectProject(projectName = 'Voluntary Cypress Project') {
this.filterProjectList(projectName);
this.selectFirstItem();
return cy.url().then(url => this.getIdFromUrl(url));
From 2ef1a53a4da967389cb02b95ee115b45bb467afb Mon Sep 17 00:00:00 2001
From: GOOD
Date: Thu, 7 Sep 2023 18:05:17 +0100
Subject: [PATCH 18/25] Reverted to using my original selectVoluntaryProject()
function as I could get it to work. To seek advice from Nick in the morning
---
.../Core-journeys/voluntary-conversion.cy.js | 2 +-
.../cypress/pages/projectList.js | 35 ++++++++++++++++++-
2 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
index 39f6827bf..01b322e06 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
@@ -8,7 +8,7 @@ describe('Voluntary conversion', { tags: ['@dev', '@stage'] }, () => {
beforeEach(() => {
cy.callAcademisationApi('POST', `cypress-data/add-voluntary-project.cy`, "{}")
.then(() => {
- projectList.selectProject(projectName)
+ projectList.selectVoluntaryProject()
});
})
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
index d75f5570d..f1e3b9401 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
@@ -6,12 +6,45 @@ import BasePage from './BasePage'
export default new class projectList extends BasePage {
- selectProject(projectName = 'Voluntary Cypress Project') {
+ checkProjectListPage() {
+ cy.url().should('include', path);
+ }
+
+ getNthProject(n = 0){
+ this.checkProjectListPage();
+ return cy.get(`[id="school-name-${n}"]`);
+ }
+
+ getNthProjectDeliveryOfficer(n = 0){
+ this.checkProjectListPage();
+ return cy.get(`[id="delivery-officer-${n}"]`);
+ }
+
+ filterProjectList( titleFilter ) {
+ const filterQuery = `?Title=${encodeURIComponent(titleFilter)}`;
+ cy.visit(`${Cypress.env('url')}/${path}${filterQuery}`)
+ };
+
+ selectFirstItem(){
+ this.checkProjectListPage();
+ this.getNthProject().click();
+ }
+
+ selectProject(projectName = 'Gloucester School') {
this.filterProjectList(projectName);
this.selectFirstItem();
return cy.url().then(url => this.getIdFromUrl(url));
};
+ selectVoluntaryProject() {
+ cy.login({titleFilter: 'Voluntary Cypress Project'});
+ cy.get('[id="school-name-0"]').click();
+
+ return cy.url().then(url => this.getIdFromUrl(url));
+ };
+
+ se
+
getIdFromUrl(url) {
const urlSplit = url.toString().split('/');
for (let i = urlSplit.length - 1; i > 0; i--) {
From d9a578e09a2ef726961ec095da6a7958926f224f Mon Sep 17 00:00:00 2001
From: GOOD
Date: Fri, 8 Sep 2023 08:23:10 +0100
Subject: [PATCH 19/25] Updated voluntary-conversion specfile to use Nick's
selectProject() function rather than my selectVlountaryProject() function
---
.../cypress/e2e/Core-journeys/voluntary-conversion.cy.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
index 01b322e06..e352f5c4b 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
@@ -8,7 +8,8 @@ describe('Voluntary conversion', { tags: ['@dev', '@stage'] }, () => {
beforeEach(() => {
cy.callAcademisationApi('POST', `cypress-data/add-voluntary-project.cy`, "{}")
.then(() => {
- projectList.selectVoluntaryProject()
+ // projectList.selectVoluntaryProject()
+ projectList.selectProject(projectName)
});
})
From f067e44994eb9ed06d58b466ee94c318c5093b1a Mon Sep 17 00:00:00 2001
From: GOOD
Date: Fri, 8 Sep 2023 10:08:39 +0100
Subject: [PATCH 20/25] Made requested indentation needed for GPP inside it
block in voluntary-conversion.cy.js spec file
---
.../cypress/e2e/Core-journeys/voluntary-conversion.cy.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
index e352f5c4b..7dbbbac1c 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
@@ -15,7 +15,7 @@ describe('Voluntary conversion', { tags: ['@dev', '@stage'] }, () => {
it('TC01: Voluntary conversion journey ', () => {
// Go wild Dan!
- voluntaryProjectTaskList.voluntaryProjectElementsVisible()
+ voluntaryProjectTaskList.voluntaryProjectElementsVisible()
})
})
\ No newline at end of file
From b68c23681a34e85337acfadfa687951b749e4837 Mon Sep 17 00:00:00 2001
From: GOOD
Date: Fri, 8 Sep 2023 10:10:30 +0100
Subject: [PATCH 21/25] Removed comment invloving call to my legacy
projectList.selectVoluntaryProject function I was using before I was able to
make use of Nick's selectProject(projectName) function
---
.../cypress/e2e/Core-journeys/voluntary-conversion.cy.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
index 7dbbbac1c..acefbc0ed 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
@@ -8,7 +8,6 @@ describe('Voluntary conversion', { tags: ['@dev', '@stage'] }, () => {
beforeEach(() => {
cy.callAcademisationApi('POST', `cypress-data/add-voluntary-project.cy`, "{}")
.then(() => {
- // projectList.selectVoluntaryProject()
projectList.selectProject(projectName)
});
})
From 5d72137e4de60f40fcd5bf871c9347b9ecfe99c0 Mon Sep 17 00:00:00 2001
From: GOOD
Date: Fri, 8 Sep 2023 10:12:07 +0100
Subject: [PATCH 22/25] removed random 'se' typo from projectList.js page
object
---
.../cypress/pages/projectList.js | 2 --
1 file changed, 2 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
index f1e3b9401..c910cc644 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/projectList.js
@@ -43,8 +43,6 @@ export default new class projectList extends BasePage {
return cy.url().then(url => this.getIdFromUrl(url));
};
- se
-
getIdFromUrl(url) {
const urlSplit = url.toString().split('/');
for (let i = urlSplit.length - 1; i > 0; i--) {
From 417a7f7efedced8f67a841931e227673a5c640ff Mon Sep 17 00:00:00 2001
From: danielryannimble
Date: Fri, 15 Sep 2023 13:44:58 +0100
Subject: [PATCH 23/25] fix to href
---
.../Pages/Public/CookiePreferences.cshtml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Public/CookiePreferences.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Public/CookiePreferences.cshtml
index c2947014c..4346b8982 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Public/CookiePreferences.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Public/CookiePreferences.cshtml
@@ -30,7 +30,7 @@
- We use cookies for the conversions part of our Prepare conversions and transfers service. We use them to make our service work and to collect information about how you use the service.
+ We use cookies for the conversions part of our Prepare conversions and transfers service. We use them to make our service work and to collect information about how you use the service.
From d63ee298add103e905cb136c7f49dee22eb9ce5c Mon Sep 17 00:00:00 2001
From: danielryannimble
Date: Fri, 15 Sep 2023 17:02:14 +0100
Subject: [PATCH 24/25] href fix
---
.../Dfe.PrepareConversions/Pages/Shared/_CookieBanner.cshtml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_CookieBanner.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_CookieBanner.cshtml
index 870956f0d..8e787d80e 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_CookieBanner.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_CookieBanner.cshtml
@@ -10,7 +10,7 @@
We use cookies to
collect information
- about how you use the conversions part of our service.
+ about how you use the conversions part of our service.