Skip to content

Commit a26d3f4

Browse files
committed
undo pa11y changes
1 parent a9bae38 commit a26d3f4

File tree

6 files changed

+10
-90
lines changed

6 files changed

+10
-90
lines changed

tests/accessibility/.pa11y-ci.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const {
1414
emailTemplateSubmittedPage,
1515
letterTemplateSubmittedPage,
1616
messageTemplatesPage,
17-
messagePlansPage,
1817
nhsAppTemplateSubmittedPage,
1918
previewEmailTemplateErrorPage,
2019
previewEmailTemplatePage,
@@ -114,10 +113,6 @@ const letters = [
114113
previewSubmittedLetterTemplatePage(messageTemplatesUrl),
115114
];
116115

117-
const messagePlans = [
118-
messagePlansPage(`${baseUrl}/message-plans`)
119-
]
120-
121116
const landingPage = [{ url: startUrl, name: 'landing-page' }];
122117

123118
const errors = [
@@ -154,7 +149,6 @@ const allJourneys = {
154149
letters,
155150
userEmails,
156151
errors,
157-
messagePlans,
158152
};
159153

160154
const selectedJourney = process.env.JOURNEY && allJourneys[process.env.JOURNEY]

tests/accessibility/actions/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module.exports = {
88
...require('./email-template-submitted.actions'),
99
...require('./letter-template-submitted.actions'),
1010
...require('./message-templates.actions'),
11-
...require('./message-plans.actions'),
1211
...require('./nhs-app-template-submitted.actions'),
1312
...require('./preview-email-template.actions'),
1413
...require('./preview-letter-template.actions'),

tests/accessibility/actions/message-plans.actions.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

tests/accessibility/pa11y-setup.ts

Lines changed: 4 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -64,34 +64,6 @@ const generateLetterTemplateData = (
6464
};
6565
};
6666

67-
const generateRoutingConfig = ({
68-
clientId,
69-
now,
70-
}: {
71-
clientId: string;
72-
now: string;
73-
}) => ({
74-
owner: `CLIENT#${clientId}`,
75-
id: randomUUID(),
76-
campaignId: 'campaignId',
77-
cascade: [
78-
{
79-
cascadeGroups: ['standard'],
80-
channel: 'EMAIL',
81-
channelType: 'primary',
82-
defaultTemplateId: 'email_id',
83-
},
84-
],
85-
cascadeGroupOverrides: [{ name: 'standard' }],
86-
clientId,
87-
createdAt: now,
88-
createdBy: 'Accessibility tests',
89-
name: 'Accessibility Test',
90-
status: 'DRAFT',
91-
updatedAt: now,
92-
updatedBy: 'Accessibility tests',
93-
});
94-
9567
const setup = async () => {
9668
const backendConfig = BackendConfigHelper.fromTerraformOutputsFile(
9769
path.join(__dirname, '..', '..', 'sandbox_tf_outputs.json')
@@ -176,40 +148,25 @@ const setup = async () => {
176148
),
177149
];
178150

179-
const routingConfigs = [
180-
generateRoutingConfig({ clientId, now: new Date().toISOString() }),
181-
];
182-
183-
await Promise.all([
184-
...templates.map((template) => {
151+
await Promise.all(
152+
templates.map((template) =>
185153
ddbDocClient.send(
186154
new PutCommand({
187155
TableName: backendConfig.templatesTableName,
188156
Item: template,
189157
})
190-
);
191-
}),
192-
...routingConfigs.map((rc) =>
193-
ddbDocClient.send(
194-
new PutCommand({
195-
TableName: backendConfig.routingConfigTableName,
196-
Item: rc,
197-
})
198158
)
199-
),
200-
]);
159+
)
160+
);
201161

202162
const templateIds = Object.fromEntries(
203163
templates.map((t) => [t.templateStatus, t.id])
204164
);
205165

206-
const routingConfigIds = routingConfigs.map((r) => r.id);
207-
208166
const fixtureData = {
209167
email: testEmail,
210168
password: testPassword,
211169
templateIds,
212-
routingConfigIds,
213170
userId,
214171
clientId,
215172
clientName,

tests/accessibility/pa11y-teardown.ts

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { DeleteCommand, DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
55
import { BackendConfigHelper } from 'nhs-notify-web-template-management-util-backend-config';
66
import path from 'node:path';
77

8-
const { email, templateIds, clientId, routingConfigIds } = JSON.parse(
8+
const { email, templateIds, clientId } = JSON.parse(
99
readFileSync('./pa11y-fixtures.json', 'utf8')
1010
);
1111

@@ -18,8 +18,8 @@ const teardown = async () => {
1818
path.join(__dirname, '..', '..', 'sandbox_tf_outputs.json')
1919
);
2020

21-
await Promise.all([
22-
...Object.values(templateIds).map((id) =>
21+
await Promise.all(
22+
Object.values(templateIds).map((id) =>
2323
ddbDocClient.send(
2424
new DeleteCommand({
2525
TableName: backendConfig.templatesTableName,
@@ -29,19 +29,8 @@ const teardown = async () => {
2929
},
3030
})
3131
)
32-
),
33-
...(routingConfigIds as string[]).map((id) =>
34-
ddbDocClient.send(
35-
new DeleteCommand({
36-
TableName: backendConfig.routingConfigTableName,
37-
Key: {
38-
owner: `CLIENT#${clientId}`,
39-
id,
40-
},
41-
})
42-
)
43-
),
44-
]);
32+
)
33+
);
4534

4635
await new TestUserClient(
4736
backendConfig.userPoolId,

tests/accessibility/test-user-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class TestUserClient {
3838
new PutParameterCommand({
3939
Name: `${this.clientSsmPathPrefix}/${clientId}`,
4040
Value: JSON.stringify({
41-
features: { proofing: true, routing: true },
41+
features: { proofing: true },
4242
campaignId: 'accessibility-test-campaign',
4343
} satisfies ClientConfiguration),
4444
Overwrite: true,

0 commit comments

Comments
 (0)