Skip to content

Commit 0bbcce1

Browse files
authored
Revert vue prism component upgrade to v2 since it is not compatible (#7904)
* add failing test Signed-off-by: Amndeep Singh Mann <amann@mitre.org> * need e2e tests to go faster while i iterate - REVERT THIS Signed-off-by: Amndeep Singh Mann <amann@mitre.org> * I think we need to do the scroll before the assessment so that the components are actually generated Signed-off-by: Amndeep Singh Mann <amann@mitre.org> * thought it automatically got the first one but turns out that you need to specify that Signed-off-by: Amndeep Singh Mann <amann@mitre.org> * revert change back to vue-prism-component@1.2.0 since it's the version that supports vue2 Signed-off-by: Amndeep Singh Mann <amann@mitre.org> * Revert "need e2e tests to go faster while i iterate - REVERT THIS" This reverts commit 77fe8b2. --------- Signed-off-by: Amndeep Singh Mann <amann@mitre.org>
1 parent ac91a1b commit 0bbcce1

File tree

5 files changed

+23
-7
lines changed

5 files changed

+23
-7
lines changed

apps/frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"vue-cli-plugin-vuetify": "~2.5.0",
8888
"vue-cookies": "^1.7.4",
8989
"vue-file-agent": "^1.7.3",
90-
"vue-prism-component": "~2.0.0",
90+
"vue-prism-component": "^1.2.0",
9191
"vue-property-decorator": "^9.0.0",
9292
"vue-router": "~3.6.5",
9393
"vue-svg-inline-loader": "^2.0.0",

test/integration/results.cy.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ context('Results', () => {
4141
cy.scrollTo('bottom');
4242
});
4343

44+
it('displays code tab contents for the Acme Overlay Example sample', () => {
45+
uploadModal.loadSample('Acme Overlay Example');
46+
cy.scrollTo('bottom');
47+
resultsPage.openFirstResultCodeTab();
48+
resultsPageVerifier.resultsCodeTabCorrect();
49+
});
50+
4451
it('it displays severity override indicators when present', () => {
4552
// Load sample with severity overrides
4653
uploadModal.loadSample('Small Profile With Severity Overrides');

test/support/pages/ResultsPage.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@ export default class ResultsPage {
22
openProfileInfo(): void {
33
cy.get('[data-cy=profileInfo]').click();
44
}
5+
6+
openFirstResultCodeTab(): void {
7+
cy.get('div.v-card__text.pa-2.font-weight-bold').first().click();
8+
cy.get('a[href="#tab-code"]').click();
9+
}
510
}

test/support/verifiers/ResultsPageVerifier.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export default class ResultsPageVerifier {
2-
resultsFilenameCorrect(name: string): void {
2+
resultsFilenameCorrect(name: string) {
33
cy.get('[data-cy=fileinfo]').contains(`Filename: ${name}`);
44
}
55

6-
resultsDataCorrect(): void {
6+
resultsDataCorrect() {
77
const correctFileInfo: string[] = [
88
'Acme Overlay Example',
99
'4.19.2',
@@ -38,6 +38,10 @@ export default class ResultsPageVerifier {
3838
});
3939
}
4040

41+
resultsCodeTabCorrect() {
42+
cy.get('pre').contains('# Profile name');
43+
}
44+
4145
severityOverridesCorrect() {
4246
const overrideCount = 3;
4347
cy.get('[data-cy=severityOverride]').then((result) => {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18351,10 +18351,10 @@ vue-loader@^17.0.0:
1835118351
hash-sum "^2.0.0"
1835218352
watchpack "^2.4.0"
1835318353

18354-
vue-prism-component@~2.0.0:
18355-
version "2.0.0"
18356-
resolved "https://registry.yarnpkg.com/vue-prism-component/-/vue-prism-component-2.0.0.tgz#eec89c5fe1ea3d8b55b8721d823b29d8b73b2b6d"
18357-
integrity sha512-1ofrL+GCZOv4HqtX5W3EgkhSAgadSeuD8FDTXbwhLy8kS+28RCR8t2S5VTeM9U/peAaXLBpSgRt3J25ao8KTeg==
18354+
vue-prism-component@^1.2.0:
18355+
version "1.2.0"
18356+
resolved "https://registry.npmjs.org/vue-prism-component/-/vue-prism-component-1.2.0.tgz#406252e16979def13b5d28827d95b2b6dc647825"
18357+
integrity sha512-0N9CNuQu+36CJpdsZHrhdq7d18oBvjVMjawyKdIr8xuzFWLfdxECZQYbFaYoopPBg3SvkEEMtkhYqdgTQl5Y+A==
1835818358

1835918359
vue-property-decorator@^9.0.0:
1836018360
version "9.1.2"

0 commit comments

Comments
 (0)