-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fdToolLayout-wrong-background-color
- Loading branch information
Showing
17 changed files
with
135 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
container/cypress/e2e/test-app/iframe/iframe-cookies.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
describe('Iframe Cookies Test', () => { | ||
const containerSelector = '[data-test-id="iframe-based-container-test"]'; | ||
let stub; | ||
|
||
beforeEach(() => { | ||
cy.visit('http://localhost:8080/iframe/iframe-cookies.html'); | ||
stub = cy.stub(); | ||
}); | ||
|
||
it('should not sent third party cookies request', () => { | ||
cy.on('window:alert', stub); | ||
|
||
cy.get(containerSelector) | ||
.should('have.attr', 'skip-cookie-check') | ||
.and('match', /true/); | ||
cy.get(containerSelector) | ||
.shadow() | ||
.get('iframe') | ||
.then(() => { | ||
cy.wrap(stub).should('not.have.been.calledWith', 'set-third-party-cookies-request'); | ||
cy.getCookie('luigiCookie').should('not.exist'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { LuigiCompoundContainer as default } from "./bundle.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { LuigiContainer as default } from "./bundle.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<html> | ||
<head> | ||
<script type="module"> | ||
import '../bundle.js'; | ||
</script> | ||
</head> | ||
<body> | ||
<h3> | ||
This page is used to test **skip-cookie-check** feature for iFrame based LuigiContainer | ||
</h3> | ||
|
||
<div style="border:solid 1px blue; height: 400px"> | ||
<!-- Luigi Container to test general functionality--> | ||
<luigi-container | ||
data-test-id="iframe-based-container-test" | ||
viewURL="./microfrontend.html" | ||
skip-cookie-check="true" | ||
></luigi-container> | ||
</div> | ||
|
||
<script type="module"> | ||
import Events from '../bundle.js'; | ||
|
||
const luigiContainer = document.querySelector( | ||
'[data-test-id="iframe-based-container-test"]' | ||
); | ||
|
||
// SET_THIRD_PARTY_COOKIES_REQUEST - called on microfrontend startup | ||
luigiContainer.addEventListener(Events.SET_THIRD_PARTY_COOKIES_REQUEST, event => { | ||
console.log(Events.SET_THIRD_PARTY_COOKIES_REQUEST, event); | ||
alert( | ||
Events.SET_THIRD_PARTY_COOKIES_REQUEST, | ||
'message received: ' + JSON.stringify(event.detail.data.data) | ||
); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters