Skip to content

Commit

Permalink
Merge 7c6d048 into a722a17
Browse files Browse the repository at this point in the history
  • Loading branch information
future-pirate-king authored Sep 12, 2024
2 parents a722a17 + 7c6d048 commit 27fce38
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<AkStack class='mt-2' @spacing='2'>
<div {{style width='150px'}}>
<AkSelect
data-test-cy='device-preference-device-type-select'
data-test-projectPreference-deviceTypeSelect
@label={{t 'deviceType'}}
@options={{@dpContext.deviceTypes}}
Expand All @@ -33,6 +34,7 @@

<div {{style width='150px'}}>
<AkSelect
data-test-cy='device-preference-os-version-select'
data-test-projectPreference-osVersionSelect
@label={{t 'osVersion'}}
@selected={{@dpContext.selectedVersion}}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion cypress/support/Actions/common/DynamicScanActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ export default class DynamicScanActions {
*/
doFilePageSanityCheck(file: FileResponseModel, appInfo: AppInformation) {
// check file and app info
cy.findByAltText(`${file.name} - logo`).should('exist');
cy.findByAltText(`${file.name} - logo`, DEFAULT_ASSERT_OPTS).should(
'exist'
);

cy.findByText(file.name).should('exist');

cy.findByText(`${cyTranslate('fileID')} - ${file.id}`).should('exist');
Expand Down
29 changes: 17 additions & 12 deletions cypress/tests/dynamic-scan.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,19 @@ describe('Dynamic Scan', () => {
const platformVersion =
dynamicScanActions.getPlatformVersionText(version);

cy.findByRole('button', {
name: platformVersion,
})
// check device type and platform version texts
cy.findByText(deviceType).should('exist');
cy.findByText(platformVersion).should('exist');

// ref for device os version select
cy.findByTestId('device-preference-os-version-select')
.findByRole('combobox')
.should('exist')
.as('deviceVersionSelect');

cy.findByRole('button', {
name: deviceType,
})
// ref for device type select
cy.findByTestId('device-preference-device-type-select')
.findByRole('combobox')
.should('exist')
.as('deviceTypeSelect');

Expand All @@ -285,13 +289,14 @@ describe('Dynamic Scan', () => {
);
}

cy.findByRole('button', {
name: cyTranslate('anyDevice'),
}).should('exist');
// assert preference is any device & version
cy.get('@deviceTypeSelect').within(() => {
cy.findByText(cyTranslate('anyDevice')).should('exist');
});

cy.findByRole('button', {
name: cyTranslate('anyVersion'),
}).should('exist');
cy.get('@deviceVersionSelect').within(() => {
cy.findByText(cyTranslate('anyVersion')).should('exist');
});
});

cy.findByRole('button', {
Expand Down

0 comments on commit 27fce38

Please sign in to comment.